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

IMU yaw + laser scan + laser geometry = point cloud ?

asked 2011-07-20 07:23:00 -0600

patrick_hammer gravatar image

updated 2011-07-20 07:23:24 -0600

I would like to use the yaw from my IMU published as sensor_msgs/Imu to turn laser scans into point clouds. My imu_link and laser_link are joined together in my urdf file. I think I need to transform imu_link with the Imu.orientation.z field but I don't know how to! Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-07-20 08:50:42 -0600

You need a tf broadcaster, check this tutorial is very easy to understand: tf broadcaster

The IMU message publish "orientation" which is a geometry_msgs/Quaternion so, in the node where you do the tf broadcast just add a subscriber to this IMU message, get the orientation, transform it using tf::quaternionMsgToTF(geometry_msgs::Quaternion, tf::Quaternion) and pass it straight to the transform.setRotation(tf::Quaternion)

Take into account you have to choose well your frame_id's, if you have already a tf with the urdf file which joins laser and imu, then you should transform from, for example, "world" to "imu_link".

Resuming you need a node with a subscriber to the IMU message and a tf broadcaster. In this node you have to transform the imu message orientation to a tf::Quaternion and then do the rotation and publish it.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-07-20 07:23:00 -0600

Seen: 1,636 times

Last updated: Jul 20 '11