0
$\begingroup$

Rosanswers logo

Hello everyone,

I successfully completed and understood the tutorial http://wiki.ros.org/laser_assembler/Tutorials/HowToAssembleLaserScans

However, there is something I cannot understand: the laser.bag file has the laserScans and the transformations (tf). When I visualize the tilt_scan messages in RVIZ these appear already transformed (scans tilted). What I expected was to see the laser scans changing in the same horizontal plane, since these scans are not transformed (or at least that is what I understood). I am using base_link as fixed_frame in rviz.

What could be wrong? Thank you!

EDIT: Ok, I have readed more info and now (finally) I understand how it works and how the frame is "attached" to the LaserScan. Now the question is:

I saw that I can set which frame_id the laser is in. In my case I will be updating this frame since it will be rotating. Do I need to publish the new tf/laser AND call the dynamic reconfigure of the laser to update the tf of the laser scan or just publish the new tf/laser? Thank you!


Originally posted by Javier V. Gómez on ROS Answers with karma: 1305 on 2013-12-09

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think you might not have understood the tutorial or the purpose of the laser_assembler correctly. All transformation information must already be there from some other tf source. The assembler doesn't solve this problem and assumes it is already there.

It will also not even touch the laser scans. Thus what you see in rviz - the correctly transformed scans is actually the input for the laser_assembler. The desired output is: Take a bunch of those single scans (bunch is defined by time stamps) and merge them into one single point cloud in an arbitrary fixed frame.

Laser scans (input) should appear in rviz continuously, the assembled point cloud as a single message once the assembler has assembled one.

Ad edit: The input the laser_assembler needs is laser scans + matching tf. That is what your robot needs to send. Configure the laser with a frame once when starting and just keep sending that. The tf transform to that laser should represent the current position.


Originally posted by dornhege with karma: 31395 on 2013-12-09

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Javier V. Gómez on 2013-12-09:
Then what about http://wiki.ros.org/laser_assembler and http://answers.ros.org/question/10102/laser-assembler-with-hokuyo-utm-30lx/?answer=14794#post-id-14794 ? Laser_assembler gets laserscans, transforms them according tf topic and save them as you mention. What is the utility otherwise?

Comment by Javier V. Gómez on 2013-12-09:
Checking the code I guess you are right :S But the documentation is confusing! Do I need to transform all the scans of the laser before using the laser_assembler? What is the best way to do this? Isn't there any node that takes scans and tf and convert to 3D? Because that would be very useful :)

Comment by dornhege on 2013-12-09:
You don't need to send laser scans transformed in a fixed, but you need to provide the information to be able to transform them to tf. Scans + tf -> 3D = laser_assembler.

Comment by Javier V. Gómez on 2013-12-09:
There is something I'm not understanding at all. If I publish scans and also tf, laser_assembler will transform the laser scans, yes or no? If yes, how to specify with tf? Since, as I say, tf is a tree of frames and transformations (but this is another question). What does laser.bag contains?

Comment by dornhege on 2013-12-09:
You specify a fixed_frame to the laser_assembler. The scans itself have their frame in the message. Laser_assembler will transform the scans to this fixed_frame.

Comment by Javier V. Gómez on 2013-12-09:
"scans itself have their frame in the message" that is in the laser.bag, but it is always like that? If I fix a Hokuyo to a motor, and publish scan messages, how do I specify those frames from the motor angle?

Comment by dornhege on 2013-12-09:
You/or someone must send the tf message. The laser's frame is a parameter of the laser driver.

Comment by Javier V. Gómez on 2013-12-09:
I really thank you for your help, but there is something that I am missing. I will try to go deeper and ask more detailed questions.

$\endgroup$

Your Answer

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