Ask Your Question

Revision history [back]

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.

  1. intializes global variables 2, setup node 3, register subscriber (not the same as waiting for a message) 4, print values of global variables 5, shutdown

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.