ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Quick question: is the code you posted in your question inside a callback? If so, you need to not create the TransformListener object inside of it. Try making it a member variable if it's a class or a global variable otherwise and see if that helps.
If it doesn't, then there might be one or two other issues (at least that I noticed). Here's what I did:
Here's what I found:
So, without running your whole system, my best guess is that something is blocking the processing of your incoming data, i.e., you get a pose message, but then a large amount of time passes before you attempt to transform it, at which point the transforms are too old. Try doing what I suggested above with your TransformListener (assuming this is in a callback) and also adding a frame_id to your /pose topic.
2 | No.2 Revision |
Quick question: is the code you posted in your question inside a callback? If so, you need to not create the TransformListener object inside of it. Try making it a member variable if it's a class or a global variable otherwise and see if that helps.
If it doesn't, then there might be one or two other issues (at least that I noticed). Here's what I did:
static_transform_publisher
roscore/pose
and /odom
topics.rosbag play bagfile.bag --clock -r 0.01
.Here's what I found:
/pose
topic has no frame_id
. Not sure how you're getting your pose_world
object above, but you might want to check that. So, without running your whole system, my best guess is that something is blocking the processing of your incoming data, i.e., you get a pose message, but then a large amount of time passes before you attempt to transform it, at which point the transforms are too old. Try doing what I suggested above with your TransformListener (assuming this is in a callback) and also adding a frame_id to your /pose topic.