0
$\begingroup$

Rosanswers logo

I'm developing a vehicle that's fitted with a GPS, IMU and a lidar that will be able to make a map and localise itself in it. To do so various coordinate transforms need to take place, for instance a fixed 'map' frame where the map would be created, a body fixed frame (base_link) for the chassis of the vehicle and then various transforms from the body fixed frame for the IMU/GPS/Lidar to assist in the building of the point cloud map.

My question is, what tf or tf2 tool would I use where?

Are static transforms used for rigid links? For example the IMU/lidar to the base_link (vehicle) etc.

Are the broadcaster/listener combinations used for transforms that vary? For example from the map (world) frame to the base_link.

Thanks for any help, just getting alittle lost with the terminology.


Originally posted by TheMilkman on ROS Answers with karma: 17 on 2018-07-10

Post score: 0


Original comments

Comment by jayess on 2018-07-11:
Have you seen the URDF tutorials, especially the Create your own URDF file and the ...

Comment by jayess on 2018-07-11:
robot_state publisher tutorial?

Comment by TheMilkman on 2018-07-11:
From what I've read it seemed like the URDF approach was more aligned with manipulator arms and visualizing them etc. Whereas our system should be quite straightforward in that regard

Comment by Reamees on 2018-07-17:
I would also suggest looking into URDF and xacro's for the model/TFs of your robot description. I guess you can technically describe your robots TFs with static transforms, but I see no real advantage to this approach in the long run.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Yes, you can use static transforms for rigid links(chassis to sensors, chassis to sensor mounts then sensor mounts to senors etc..) and the broadcaster/listener combinations for the other transforms(like map/odom to base_link, map to odom...). This can be done with tf (I have used only tf for my mobile robot) but you can also use tf2 if you prefer. I have not looked into tf2 much but according to the description it should provide more efficiently the same feature set of tf as well as adding a few new features.

If you are interested more in the changes made between tf and tf2 you can read this.


Originally posted by pavel92 with karma: 1655 on 2018-07-11

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by TheMilkman on 2018-07-12:
Thanks for confirming my head was in roughly the right space. At the moment I've got the gps worling in NED for the world to base_link and it seems to be working really well. Though I'm having trouble using my IMU data to change the orientation of my rigid links (base_link), any pointers?

Comment by TheMilkman on 2018-07-12:
Ideally it would be something like this, where the orientation of the imu is translated through base_link from imu_link (static) altering base_links orientation.

transform.setRotation(q)

br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "world", "imu_link"));

*q is imu quarterion

Comment by TheMilkman on 2018-07-12:
but this doesn't work like it does in my head. Thanks for you help!

Comment by pavel92 on 2018-07-12:
Not sure if it will help but you can look into this method lookupTransform from tf and use to get the right transform between two frames.

$\endgroup$

Your Answer

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