Day Eight – A Few Complications

After the success of last week, the beginning of the second week of the project has brought a major problem to light:

The initial plan for this week was to introduce the Asus Xtion Pro Live into the mix, which would incorporate depth and colour information, thus allowing us to more elegantly avoid obstacles and detect people. However, after a lot of work attempting to compile OpenNI drivers and get them working with our version of ROS (Fuerte), it became apparent that it was not achievable within our current set-up. This became apparent after doing a bit of research and searching for previous examples of this trying to be achieved (reference here) on our set-up of Raspbian and ROS fuerte. In order to get this working, it would be required that we change both our version of ROS and downgrade to Electric and also change the Raspberry Pi operating system to another version of Debian. For these reasons, we decided to instead work with a laser range finder (more on that later!) and a standard RGB webcam (As shown in the example set-up below!)

However! A few positive things are to be reported as well…

Hokuyo Laser Range Finder

Some progress has been made towards getting the laser range finder to work with ROS. The process of setting it up was relatively easy and simply required the drivers to be compiled within ROS and a few parameters to be set before the laser scanner was displaying within Rviz. Detailed instructions for how to get this working are listed below:

1. Checkout SVN copy of the driver

– Checkout from: http://www.ros.org/wiki/hokuyo_node
cd ~/ros_workspace OR roscd OR Any place where $ROS_PACKAGE_PATH points to
svn co https://code.ros.org/svn/ros-pkg/stacks/laser_drivers/trunk/hokuyo_node

2. Get Dependencies and compile

rosdep install hokuyo_node rviz
rosmake hokuyo_node rviz

3. Power on Hokuyo laser scanner and ensure power light is on.

4. Configure Hokuyo laser scanner

Make sure that hokuyo_node will be able to access the laser scanner itself.
– List permissions using ls -l /dev/ttyACM0
– You should see something similar to this:
crw-rw-rw- 1 root dialout 166, 0 Aug 30 15:31 /dev/ttyACM0
– If you don’t see this or only see crw-rw---- you need to run:
sudo chmod a+rw /dev/ttyACM0

5. Open a new terminal and run roscore

6. Set-up hokuyo parameters correctly

– The hokuyo node needs to be set-up such that the right port is set and can be done so by running the following:
rosparam set hokuyo_node/calibrate_time false
rosparam set hokuyo_node/port /dev/ttyACM0

7. In a new terminal, run the Hokuyo node

Run:
rosrun hokuyo_node hokuyo_node

You should see something like the following if it is working correctly:
[INFO] [1346330858.255866180]: Connected to device with ID: H0613856
[INFO] [1346330858.664850549]: Streaming data.

8. Viewing the data

To see that everything is working and being published in ROS, in a new terminal run:
rosrun rviz rviz -d `rospack find hokuyo_node`/hokuyo_test.vcg
Zoom out in the center viewing area and zoom into the grid to see the LaserScan streaming.
 

 

As you can see, the range finder is situated in the center of the screen pointed towards the corner of the room. The line represents the wall, where the laser scanner has received a distance reading at each point in it’s field of view. The colour in the line represents the distance from the range finder. This sort of information can quite easily help with obstacle avoidance and will ideally mean that the robot never hits an obstacle.

 

Webcam Setup

Currently, GScam is being set-up to work with an external webcam and will hopefully soon be able to send the live images through ROS and onto the host PC. In an ideal world, the robot should send the video stream to the host PC to be displayed on screen for demonstration purposes. When this has been completed we will give another update again, however it is currently not working due to something configured on the Pi which only enables two ROS topics to be sent instead of all of them.

 

Leave a Reply

Your email address will not be published. Required fields are marked *