The Neato is going to be our robotic platform of choice! For details on our modified Neato's architecture and a note about the possibility of bringing in other platforms for the final project see this page. If you are interested in making your own modded Neato see this page (note: under construction).
Steps to turn on and connect to the Neato:
roslaunch neato_node bringup.launch host:=IP_ADDRESS_OF_THE_PI
Moving the Neato around:
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
Viewing Images from the Camera:
rosrun image_view image_view image:=/camera/image_raw
Viewing the Laser Scan Data:
rosrun rviz rviz
Create a map of your environment:
roslaunch neato_2dnav hector_mapping_neato.launch
rosrun rviz rviz
Shutting Down Your Neato
In order to avoid corrupting the SD cards of the Pis, you should properly shutdown before unplugging the batter from the Pi. Before you shutdown your neato_node (this is vital), run:
$ ~/comprobo2014/shutdown_pi.sh
The Lidar should spin down and then the Pi should turn off (for instance the wifi dongle will stop blinking).
Switching the Wireless Mode on the Neato
The Neatos now support two modes of wireless connection. The first is what we have been using so far this semester. That is, both the Neato and your laptop connect to an access point which mediates the connection. Now, there is also a mode that you can switch the Neato into that uses an ad-hoc network to directly connect the Pi and your laptop. This can be useful for things like having the Neato traveling over long distances (you just have to follow the Neato at about 100 feet), or in situations where the Wifi access points are congested. One downside to ad-hoc mode is you will not be able to use the Internet while connected in this fashion (although if you have a ethernet cable you can plug in and do both).
Switching from Normal (the default when the Pi starts up) to Ad-hoc:
With neato_node
running, execute the following command: (replace the IP address below with the IP of your Neato)
$ sudo ~/comprobo2014/adhoc_wireless.sh 192.168.17.204
Once you start seeing successful pings (this should take about 30 seconds), shutdown your old connection to the Neato by hitting control-c in the window where you ran neato_node bringup.launch
. I recommend you leave the ping command running as the Pi can sometimes detach from the adhoc network if it doesn't see network traffic for an extended period of time (if you are running the neato_node
this will also prevent the connection from dropping). Next, execute roslaunch neato_node bringup.launch host:=192.168.17.204
to reconnect to the Neato.
NOTE: if you put the Neato into adhoc mode that means that your laptop has also been reconfigured to use adhoc mode. This means that you have to put your computer back into normal wireless mode if you want to connect to the a conventional wifi networks. To do so, follow the instructions below for switching from ad-hoc to normal mode (you can do this step to reconfigure your laptop even if you have already shutdown the Pi).
Switching from Ad-hoc to Normal:
With neato_node
running, execute:
$ sudo ~/comprobo2014/normal_wireless.sh
Once you have waited a sufficient time for the wifi to reconfigure (this should take about 30 seconds), shutdown your old connection to the Neato by hitting control-c in the window where you ran neato_node bringup.launch
. Next, execute roslaunch neato_node bringup.launch host:=192.168.17.204
to reconnect to the Neato.
Switching the video mode on the Neato:
With neato_node
running, execute:
$ ~/comprobo2014/set_video_mode.sh "video_mode_parameters_here"
Where "video_mode_parameters" are the parameters you want to use to configure the raspberry Pi camera. The complete list of options is here. For example, if you want to configure the raspberry Pi camera to turn off white-balancing and enable sports mode (to reduce motion blur use):
$ ~/comprobo2014/set_video_mode.sh "-ex sports -awb off -h 480 -w 640 -fps 15"
You can also edit set_video_mode.sh to specify the parameters for the camera in there. Once you have executed the set_video_mode.sh script, you will need to restart neato_node.
Neato Etiquette
Neato Troubleshooting
Problem: Cannot turn the Neato on
Checklist: Make sure the Neato has charge. Make sure that the on/off switch (located in the same compartment as the Raspberry Pi) is set to on (note: not all of the Neatos have this switch).
Problem: Raspberry Pi won't turn on
Checklist: check to make sure the USB cable from the lime fuel is connected properly and the battery pack is not out of charge
Problem: Cannot ping the Raspberry Pi
Checklist: make sure the Micro USB card is fully inserted into the raspberry Pi (the card slot is on the underneath of the Pi on the opposite side from the USB ports). Make sure the Wifi dongle is inserted fully into the Pi
Problem: When launching Neato bringup we get errors when trying to turn on the laser scanner. For instance you might see this error:
SETTING TEST MODE TO on
setldsrotation on
Traceback (most recent call last):
File "/home/pruvolo/catkin_ws/src/neato_robot/neato_node/nodes/neato.py", line 163, in <module>
robot = NeatoNode()
File "/home/pruvolo/catkin_ws/src/neato_robot/neato_node/nodes/neato.py", line 56, in __init__
self.robot = xv11(self.port)
File "/home/pruvolo/catkin_ws/src/neato_robot/neato_driver/src/neato_driver/neato_driver.py", line 152, in __init__
self.setLDS("on")
File "/home/pruvolo/catkin_ws/src/neato_robot/neato_driver/src/neato_driver/neato_driver.py", line 168, in setLDS
self.port.send("setldsrotation " + value + '\r\n')
socket.error: [Errno 32] Broken pipe
[neato-2] process has died [pid 21733, exit code 1, cmd /home/pruvolo/catkin_ws/src/neato_robot/neato_node/nodes/neato.py __name:=neato __log:=/home/pruvolo/.ros/log/4e76c77c-386a-11e4-9646-0c84dc631348/neato-2.log].
log file: /home/pruvolo/.ros/log/4e76c77c-386a-11e4-9646-0c84dc631348/neato-2*.log
Checklist: make sure the mini USB cable is plugged into both the Pi and the USB port on the Neato. Make sure the Neato is turned on (the light around the power button should be illuminated). Wait 60 seconds to let any old socket connections to the Pi timeout, and then try to connect again. If you still get the error above, try one more time (there is actually a good reason that the second try might fix the problem!).
Problem: the video from gstreamer doesn't work.
Checklist: make sure the ribbon cable between the Pi and the Pi camera is connected properly on both ends (see this video for a demonstration).