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

Revision history [back]

It seems you are just "routing" what you receive on the input odometry topic through to the tf broadcast. Do a rostopic echo on the input odometry and check what you have in the pose field. I'm guessing this is all zero (and 1 for the orientation.w).

You'll have to integrate the pose given the velocities of the input odometry topic. Check the lines 30-55 in the link you provided.

It seems you are just "routing" what you receive on the input odometry topic through to the tf broadcast. Do a rostopic echo on the input odometry and check what you have in the pose field. I'm guessing this is all zero (and 1 for the orientation.w).

You'll have to integrate the pose given the velocities of the input odometry topic. Check the lines 30-55 in the link you provided.


EDIT

Hmm, maybe some timing issue. I see that you declare the transform_broadcaster only in the callback. It could be, that you try to broadcast when this is not connected properly, and as you do this in each step, this never gets properly updated...

Can you try declaring it not in the callback but as a class member?

It seems you are just "routing" what you receive on the input odometry topic through to the tf broadcast. Do a rostopic echo on the input odometry and check what you have in the pose field. I'm guessing this is all zero (and 1 for the orientation.w).

You'll have to integrate the pose given the velocities of the input odometry topic. Check the lines 30-55 in the link you provided.


EDIT

Hmm, maybe some timing issue. I see that you declare the transform_broadcasterodom_broadcaster only in the callback. It could be, that you try to broadcast when this is not connected properly, and as you do this in each step, this never gets properly updated...

Can you try declaring it not in the callback but as a class member?

It seems you are just "routing" what you receive on the input odometry topic through to the tf broadcast. Do a rostopic echo on the input odometry and check what you have in the pose field. I'm guessing this is all zero (and 1 for the orientation.w).

You'll have to integrate the pose given the velocities of the input odometry topic. Check the lines 30-55 in the link you provided.


EDIT

Hmm, maybe some timing issue. I see that you declare the odom_broadcaster only in the callback. It could be, that you try to broadcast when this is not connected properly, connected/advertised properly at the rosmaster, and as you do this in each step, this never gets properly updated...sent out...

Can you try declaring it not in the callback but as a class member?