ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You shouldn't have to use the NaoQi SDK. Hokuyo lasers are very well supported in ROS, due to their popularity. You can find documentation for the Hokuyo node here. To use it, do the following:
rosrun hokuyo_node hokuyo_node /dev/ttyACM0
If there are permission errors, run the below command and try the above again.
sudo chmod 777 -R /dev/ttyACM0
However, if you are interested in writing your own driver (understandable, for it's a good exercise), you need to publish the laser inside a sensor_msgs/LaserScan
message.
In order to do so, you will need to fill in the header with the current ROS time and frame_id (probably laser
).
You will need to fill in the angle_min
and angle_max
with the start and end angles of the scan with respect to the positive Z-axis. You will need to include the angle_increment
and scan_time
(time between scans).
Then, you will need to set the range_min
and range_max
to the shortest measurable distance and largest measurable distance respectively.
The next container is the ranges array. Fill the array with each individual range measurement from angle_min
to angle_max
. Then, the intensities (if provided). If your laser does not have intensities, then you may omit this array.
Best of luck!