0
$\begingroup$

Rosanswers logo

Hey,

I've got a small problem: I have three laser scanners mounted at my robot with -> frames:

(name -> tf frame)

  • Hokuyo 1 -> hokuyo1_frame
  • Hokuyo 2 -> hokuyo2_frame
  • Another 4 layer Laser scanner -> Scanner_frame1

these laserscanners are translational and rotational shifted together. Which leads to me to use some tf transformations. So I flew over the tutorials and just gut confused which would be the best practice to convert them all do a static frame at the robot. Also i dont have a baselink at my robot for now so how do i create one in the origin of my robot? If I print the current frames with rosrun tf view_frames I just see the Scanner_frame1 and not the two hokuyo frames, however I can watch the data in rviz by hand typing the fixed frame as hokuyo1/2_frame.

Can someone give me some hints about this?

Best regards


Originally posted by schultza on ROS Answers with karma: 232 on 2015-11-24

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The key here is understanding that with /tf the geometry of your system must be specified as a tree. Importantly, every frame can have unlimited children, but only a single parent. The edges between the nodes in the tree are the transform information from the parent to the child. There is no concept of "world" frame, unless you specifically add a "world" frame to your tree.

For your system, there are several ways you could specify the geometry of your robot:

  1. You could arbitrarily choose one of your laser frames to be the "root" of your tree. For example, let's choose hokuyo1_frame as the root. Then you would want to create two static transform publishers; one from hokuyo1_frame -> hokuyo2_frame and one from hokuyo1_frame->Scanner_frame1. Alternatively the second transform could go from hokuyo2_frame->Scanner_frame1. It doesn't matter as long as all 3 frames are in your tree, and none of the frames has more than one parent.
  2. If you would like your robot to have a base_link frame, then you could make that the root of your tree, and then specify static transforms from base_link to all three laser frames.
  3. Probably the most-standard way of doing this is to create a URDF that represents the geometry of your robot and lasers, and then use the robot_state_publisher to send the /tf information.

Originally posted by jarvisschultz with karma: 9031 on 2015-11-24

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by schultza on 2015-11-25:
Hi, thanks jarvis for you nice summary! Really good, I really like option 2) and 3), could you provide some more information on how to create a baselink as center of my robot? I will try to create a URDF file of my robot and use it with robot_state_pub but still want to keep an eye on 2) :)

Comment by schultza on 2015-11-25:
I accomplished to build my own urdf and let a joint_state_publisher and robot_state_publisher run, but now i dont know what to do with the real coordinate frames on my real system as mentionend above the 3 laser scanners

$\endgroup$

Your Answer

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