Ask Your Question

Empty transforms using Robot State Publisher

asked 2015-09-12 15:16:45 -0600

kritchie gravatar image

Hi guys,

I'm trying to broadcast moving joint states using my robot state publisher. I echoed the topic on which I broadcast my state, all I get is :

transforms: []

Here's my code section responsible for broadcasting the state :

auto transforms = std::map<std::string, double>();
        while (publish) {
            transforms.insert(std::make_pair("base_link", controller->getJointCurrentAngle(
            transforms.insert(std::make_pair("joint_1", controller->getJointCurrentAngle(
            transforms.insert(std::make_pair("joint_2", controller->getJointCurrentAngle(
            transforms.insert(std::make_pair("joint_3", controller->getJointCurrentAngle(

When I use publishFixedTransform("") instead of publishTransforms, I get my transforms correctly published to the topic, but I cannot move them since I use a KDL tree from an URDF file to create my robot model.

Do you guys have any tip of what I'm doing wrong ?

Thanks !

edit retag flag offensive close merge delete


Did you find an answer to your issue, I am in the same situation and cannot figure this out... Joints are published, but transforms are empty, subscriptions are all correct: robot->joints->robot_state_publisher->tf.

Solenoid gravatar image Solenoid  ( 2016-08-19 05:17:09 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-09-13 02:34:50 -0600

gvdhoorn gravatar image

Out of curiosity (and not an answer): any particular reason that you are trying to directly publish TF frames in this way? Typical setups publish JointState msgs, and the robot_state_publisher then does all the hard work. That would seem to make things much easier (but adds a node).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-09-12 15:16:45 -0600

Seen: 242 times

Last updated: Sep 12 '15