ROS2 Message generation in python package
Hi, I have a python package with multiple nodes and I need to send a message from one node to another.
Currently the message type is from std_msgs.msg import Int16MultiArray
, but I need to add a header to this message. The message contains the encoder values from 3 wheels and are transferred from the hardware driver node
to the odom node
. This message should have the frame id base_link
and must contain the time. So I need a Int16MultiArrayStamped
or I would call it EncoderStamped
or something like that.
Now I would like to generate a custom message, but I can't find documentation on how this should work inside a python package. I mean I can just create a new CMake package which just contains the new message type with message generation, but I want this to be self contained, because this belongs to this package.
So my question is: Is it possible to have custom message generation in a python package in ROS2 Foxy?