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

use a single static_transform_publisher for multiple sensors

asked 2011-07-29 09:53:34 -0500

akhernar gravatar image

Hello everyone,

I just started using ros to build a sonar sensor array composed of 16 sensors. I was wondering if there is a way to use a single static_transform_publisher to broadcast all the sensors frames to tf instead of creating a node for each sensors, which i think would introduce some overhead (16 processes vs. 1).

Please correct me if i'm wrong, or suggest an alternative solution to static_transform_publisher if it isn't the best way to do this.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-07-29 11:13:22 -0500

tfoote gravatar image

As @arebgun mentioned you can publish them all manually. Or if you create a URDF and use robot_state_publisher it will publish them all for you.

edit flag offensive delete link more

Comments

Completely forgot about robot_state_publisher and URDF. I think that would be the best long term solution.
arebgun gravatar image arebgun  ( 2011-07-29 13:34:16 -0500 )edit
I tried this solution, but TransformListener can't find the frames I defined in the URDF file, while they show up correctly in tf_monitor and tf_echo...
akhernar gravatar image akhernar  ( 2011-07-30 09:08:59 -0500 )edit
What do you mean it can't find the frames? I suggest you ask a new question explaining what you did and what errors you get.
tfoote gravatar image tfoote  ( 2011-07-31 19:57:57 -0500 )edit
1

answered 2011-07-29 10:09:49 -0500

arebgun gravatar image

You could just write a single node that publishes all 16 TF transforms from one process. Here's a tutorial on how to write a TF broadcaster in C++, or you can use static_transform_publisher source code as an example.

edit flag offensive delete link more

Comments

if you look at the source of the static transform publisher all the work is done by a helper class.
tfoote gravatar image tfoote  ( 2011-07-29 11:11:55 -0500 )edit

Question Tools

Stats

Asked: 2011-07-29 09:53:34 -0500

Seen: 1,482 times

Last updated: Jul 29 '11