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

transform broadcaster for multiple senors

asked 2013-07-08 00:42:28 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello all,

I'm a new user to ros navigation stack. I've a kurt2 robot to work on with 6 super sonic sensors and 8 infrared sensors on it. I'd as per the tutorial in navigation if I've 1 sensor the code as per the tutorial.

int main(int argc, char** argv){
  ros::init(argc, argv, "robot_tf_publisher");
  ros::NodeHandle n;
  ros::Rate r(100);
  tf::TransformBroadcaster broadcaster;
        tf::Transform(tf::Quaternion(0, 0, 0, 1), tf::Vector3(0.1, 0.0, 0.2)),
        ros::Time::now(),"base_link", "base_laser"));

How about my case with 6 Sonar n 8 IR sensors? Please let me know

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-07-08 10:13:26 -0600

David Lu gravatar image

The best solution would be to use a urdf and the robot state publisher

Watch me ramble on the subject here

edit flag offensive delete link more


Oooh! I like this =) (I'm leaving my answer as it has a lower threshold to get working, but this is far superior)

lindzey gravatar image lindzey  ( 2013-07-08 11:16:02 -0600 )edit

answered 2013-07-08 07:20:53 -0600

lindzey gravatar image

If I understand your question correctly, you need to broadcast the transforms from /base_link to each sensor, and these transforms will not be changing over time. In this case, you don't even need to write a ROS node - just give each sensor a unique name, and use the static transform publisher.

edit flag offensive delete link more

Question Tools


Asked: 2013-07-08 00:42:28 -0600

Seen: 1,046 times

Last updated: Jul 08 '13