ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

laser_assembler and laser.bag issue

asked 2013-12-09 03:23:39 -0500

updated 2013-12-10 04:30:28 -0500

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!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2013-12-09 04:18:45 -0500

dornhege gravatar image

updated 2013-12-10 22:31:29 -0500

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.

edit flag offensive delete link more

Comments

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?

Javier V. Gómez gravatar image Javier V. Gómez  ( 2013-12-09 04:30:53 -0500 )edit

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 :)

Javier V. Gómez gravatar image Javier V. Gómez  ( 2013-12-09 04:42:27 -0500 )edit

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.

dornhege gravatar image dornhege  ( 2013-12-09 05:11:20 -0500 )edit

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?

Javier V. Gómez gravatar image Javier V. Gómez  ( 2013-12-09 05:47:23 -0500 )edit

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.

dornhege gravatar image dornhege  ( 2013-12-09 06:04:54 -0500 )edit

"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?

Javier V. Gómez gravatar image Javier V. Gómez  ( 2013-12-09 06:08:14 -0500 )edit

You/or someone must send the tf message. The laser's frame is a parameter of the laser driver.

dornhege gravatar image dornhege  ( 2013-12-09 22:10:45 -0500 )edit

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.

Javier V. Gómez gravatar image Javier V. Gómez  ( 2013-12-09 22:18:31 -0500 )edit
0

answered 2013-12-10 03:30:45 -0500

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!

edit flag offensive delete link more

Comments

Please do not create answers for discussion or comments. Instead, either edit and append to your original post or use the comment functionality.

dornhege gravatar image dornhege  ( 2013-12-10 04:27:53 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-12-09 03:23:39 -0500

Seen: 610 times

Last updated: Dec 10 '13