The completed project in action.
Below is a comprehensive video tutorial on how to setup and test your LIDAR as well as how to start gmapping on the robotino.
Robotinos generally ship with the Hokuyo RG-04LX-UG01. However, the LIDAR used for this project is the Hokuyo URG-04LX. Both systems use the same communication protocol however the URG-04LX has an additional port for serial communication. Additionally the URG-04LX can not be powered through the USB port so it was necessary to spice the power cables from the serial chord into USB chord as can be seen below. This way the LIDAR can be easily powered through the Robtino's battery.
Upon examination and much troubleshooting it was found that the LIDAR
'must' register as tty/ACM0. In order to ensure that it registered as ACM0 plug the LIDAR into the robotino before any other USB device.
At this point it would be advisable to see if your robotino node is broadcasting “scan” data. Start your robotino_node with the following command.
roslaunch robotino_node robotino_node.launch hostname:=<insert your robotino's ip address here>
Next check that the robotino is broadcasting scan data by entering the following in a new terminal window
rostopic echo scan
You should see massive amounts of data in your screen. If not check to make sure that your liar is powered on and that the machine recognizes it. Unplug all USB devices and then plug in only the liar. Use ssh to access your robotino
ssh root@<your robotino ip>
you will be prompted for the password. it is: dorp6
Now enter the following to see your USB devices.
ls -l /dev/ttyA*
you should see.
crw-rw---- 1 root dialout 166, 0 2014-01-13 22:52 /dev/ttyACM0
Since ROS groovy is being used for this tutorial a minor modification to the launch file needs to be made. Before the gapping node can be launched open the rviz.launch file located in robotino/robotino_navigation/ . After you open the file comment out the following line.
node pkg="rviz" type="rviz" name="rviz" args="-d $(find robotino_navigation)/config/rviz.vcg" unless="$(arg isgroovy)"/>
Make sure you have a robotino node running and then start gapping by entering the following.
roslaunch robotino_navigation gmapping.launch
Next start up rviz
rosrun rviz rviz
and open the robotino.rviz file found at
The rotational odometry data sill is reading much less than the actual rotation of the vehicle. You can see this effect in the demo video above. The live laser data will diverge from the mapped data quickly during rotation.
I have explored the robotino api2 source code and it seems that the odometry data is done at a lower level than the api. So I can find no way to modify it to correct this error. I will attempt to modify the ros package to send odometry data as multiplied by a scaling factor.