Use the Neatos

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:

    1. Choose your Neato: all of the Neatos should function identically. The onboard brains of each Neato (i.e. the Raspberry Pi and its software) are identical. You should never need to directly modify the code that runs on the Pi. The only thing that will change when switching between Neatos is the IP address that you have to enter to connect to the robot. The IP address for each Neato is printed on a label that is attached to the topside of the Pi's USB ports.
    2. Place Neato on the ground
    3. Power on the Neato by pressing the power button (should be located near the LCD Panel). If the Neato doesn't turn on it is either out of batteries or the on/off switch in the compartment that stores the Pi has been flipped to "off". See troubleshooting section for more details.
    4. Power on the Pi: grab a Limefuel USB battery pack. The Pi should have the micro USB end of the micro to regular USB cable plugged into it. Plug the Lime fuel battery pack into the other end and slide under the Raspberry Pi. Make sure you put the cable in the correct way to the battery pack. If you did it correctly, you will see lights turn on on both the Pi and the battery pack.
    5. Wait a while for the Pi to boot up (should be about 1 minute). You can check on the progress of the bootup from your laptop by trying to ping the Pi (using the IP address on the label).
    6. Connect to the Pi through ros. Now from your laptop, run
      1. roslaunch neato_node bringup.launch host:=IP_ADDRESS_OF_THE_PI
    7. (where the IP address is printed on the label that is attached to the Pi). If everything worked you will hear the Lidar of the neato spin up.

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:

    1. Startup rviz by executing rosrun rviz rviz
    2. Add a display for the scan topic by clicking "add" on the display panel of rviz and clicking on the "by topic" tab and then selecting the "scan" topic.
    3. Make sure that the global options fixed frame is set to "odom"

Create a map of your environment:

    1. Startup hector mapping by running roslaunch neato_2dnav hector_mapping_neato.launch
    2. Startup rviz by executing rosrun rviz rviz
    3. Add a display for the scan topic by clicking "add" on the display panel of rviz and clicking on the "by topic" tab and then selecting the "scan" topic.
    4. Add a display for the map topic by clicking "add" on the display panel of rviz and clicking on the "by topic" tab and then selecting the "map" topic.
    5. Make sure that the global options fixed frame is set to "map"

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

    • Always, make sure to return your Neato to its charging station after use. Be sure to flip the switch (if your Neato has one) inside the Raspberry Pi compartment to "on" (or else the Neato won't charge).
    • Always return your USB battery pack to the table and connect it to the charger (make sure you have inserted the cable correctly or else it won't charge).
    • Always shutdown your Neato properly (this leads to less corrupted SD cards, and higher Neato availability)

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).