Sensor Cart
This is a cart setup for testing sensors and sensor calibration.
Components
Sensors
A Tilting Hokuyo_TOP-URG
A mount for 2xFlea2 Cameras for stereo
Computing
- Cappuccino PC
- Name: prc0
- IP: 10.0.0.170
Controllers
- Etherdrive motor controller
- IP: 192.168.0.100
- Connected to eth3 of prc0
Relevant ROS Packages
- ros-pkg/drivers/laser/urg_driver
- ros-pkg/drivers/laser/hokuyourg_player
- ros-pkg/drivers/motor/etherdrive
- ros-pkg/drivers/robot/pr2/tilting_laser
- ros-pkg/drivers/cam/ptgrey/flea2
Before you can use the cart
- Get an account on prc0 (Ask Jeremy or Scott Hassan to help you with this)
- Make sure your account is in the groups: dialout, disk, video
Set up an ssh key on the cart (this lets you use remote roslaunch without sticking your password in an xml file)
ssh-keygen -t dsa scp ~/.ssh/id_dsa.pub prc0:.ssh/authorized_keys2
Make sure you have installed ROS on both prc0 and your local machine following the directions at ROS/Installation
- NOTE: prc0 uses a local disk rather than your shared nfs home directory so you will have to explicitly checkout ROS on prc0
Build sensor cart on both prc0 and your local machine. Type the following command on BOTH machines:
rosmake sensor_cart
Using the cart
- Plug in the cart powerstrip
- Plug in the cart ethernet, it should run to prc0 eth0 (port at the back of the computer)
- Make sure the Hokuyo is level (its initial position when etherdrive is turned on is considered to be the angle 0)
- Power on the cart (red button on the power strip)
- Power on prc0 (power button on front of computer) and wait for it to boot
- Power on the etherdrive board if it is not already on
ssh into prc0 and check to see if the necessary firewire modules are loaded by running: lsmod | grep 1394.
If you don't see:
raw1394 31096 0 video1394 19800 0 ohci1394 36528 1 video1394 ieee1394 96312 4 raw1394,video1394,sbp2,ohci1394
then you will need to unplug and replug the firewire cable from the computer. (It would be nice to do this in software, but just loading the modules doesn't do the trick.)
- On your local machine, open up 3 terminals
In the first, start roscore
roscore
In the second, launch the sensors:
export ROS_MASTER_URI=http://<your_machine_name>:11311 roscd sensor_cart roslaunch sensors.xml
NOTE: It will take the sensor 10-15 seconds to actually start moving. This is because of the timing calibration stage of the hokuyo.In the third, launch the recorder
roscd sensor_cart roslaunch recorder.xml
Three windows should pop up:- cam_view is the view from the firefly camera
- intensity_view is the intensity image from the tilting hokuyo
- range_view is the range image from the tilting hokuyo
The saved files will go into a directory called recordings_<date and time>
- When done, stop processes by hitting control-c in each of the opened terminals
Shutdown prc0:
ssh prc0 sudo shutdown -h now
- When you hear the computer turn off, the cart can be turned off by flipping the red switch on the power strip
Configuration
There are some configurable parameters in the file: ~/ros-pkg/drivers/robot/sensor_cart/sensors.xml If these are changed you will need to re-launch the sensors.
- urglaser/min_ang and urglaser/max_ang are the minimum and maximum angles of the horizontal field of of view (IN DEGREES)
- urglaser/cluster will downsample the urg readings in the horizontal direction
- urglaser/skip will skip N scans between each scan it returns
- NOTE: If your horizontal field of view is greater than 140 degrees you will likely need to downsample spatially or temporally or else the hokuyo tries to send too much data, resulting in instability of the messages received
- ethedrive/pulse_per_rad is dependent on the physical mechanism in use and should not be changed
- tilting_laser/num_scans is the number of scans the tilting laser will take in the vertical direction
- tilting_laser/min_ang and tilting_laser/max_ang define the minimum and maximum vertical field of view (IN DEGREES)
Debugging
- If the etherdrive process dies on running roslaunch sensors.xml, kill any orphaned etherdrive processes on prc0 and try again.
- If all the processes are dying, check the sensors.xml file and make sure the rosroot and rospkg directories are set correctly.