ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Your program is not waiting for a message to be received before it is printing out the pose information from the global variable. In order what your program is doing.
If you try printing out the values of the global pose variable in a 1 second loop, then you will see the correct values from messages being printed after the first message has been received. It might be a good idea to put a print in your callback, to confirm messages are being received too.
Hope this helps.