0
$\begingroup$

Rosanswers logo

Hello,

I am using NAO robot right now. And I need to get the laser data, but the current NAO stack doesn't provide that. The NAO that I use is NAO with laser head. The laser is Hokuyo URG-04LX.

I want to create node which publish LaserScan topic that I get from NaoQi SDK. From the NaoQi, I can get this information :

  • Min/Max Degree
  • Min/Max Distance
  • Array of Distance (size about : +/- 700)

Can I use that information to create the node that publish LaserScan topic ? If yes, can someone provide me the example of Hokuyo URG-04LX laser header, angle_increment, etc ?

If it is possible, I also want the example from the Hokuyo URG-04LX in the *.bag file.

Thank you :)

Update : thanks to the comment, I already can get the information via NaoQi SDK.

I put my code here, in case someone want to use it.

https://gist.github.com/rexcoder21/5957465


Originally posted by noob_coder on ROS Answers with karma: 5 on 2013-07-03

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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!


Originally posted by allenh1 with karma: 3055 on 2013-07-04

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by noob_coder on 2013-07-04:
I see... but from the SDK I just can get this info :

  • min degree & max degree
  • min distance & max distance
  • ranges array I don't know how to get the other information that I need to publish my own laser. Btw, I can't open NAO head to access hokuyo. They didn't give me the permission :(

Comment by Procópio on 2013-07-04:
I think you can get pretty much all that info from the datasheet of your laser, the most important thing that you need are the ranges array, which contain the actual measurements. the other fields are all static.

Comment by gaussian on 2015-02-06:
I have all the deatils.. How do I publish all of them together!?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.