What is the proper way to create a Header with python?
I seem unable to find what the proper procedure is to fill a std_msgs/Header field in a message using python.
I have found this for C++:
my_message message; // using a std_msgs/Header called header message.header.stamp = ros::Time::now(); message.header.seq++;
This example builds its own timestamp, increases the sequence number (which was not predefined), and ignores the frame field. Is this correct, and, more importantly, what is the equivalent Python code?
You should not set the sequence field, it is set when you publish a message containing the Header.
Hi @RafBerkvens , @jbohren , I'm facing the same problem, seq is incremented by publisher and I set
message.header.stamp = ros::Time::now(); in a callback function and i don't see anything in stamp while publishing. Please help