ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Replying to your question and subsequent comments: A custom message type which includes a sensor_msgs/image
field will do everything you ask for apart from being visible in rqt_bag. An example .msg file for this would be
# my custom message type
# embedded image message
sensor_msgs/image myImage
# the extra fields needed
string name
int8 number
rqt_bag will only display sensor_msgs/image messages as images, it will not show any custom message types unless you make a plugin to extend its functionality. This is also true if you make a custom message type that has the same structure as sensor_msgs/image
ROS still considers that a different type of message.
If you really need to view these images in rqt_bag then you could publish a normal sensor_msgs/image
message at the same time as your custom message. This way you could view them in rqt_bag and use the custom message in the other nodes that use that information.