Publishing CV2 image message in ROS2 rclpy
I have an image matrix in python3 CV2, which is actually just a numpy ndarray message in the shape of (width, height, rgb channels) that I want to publish as a message. In ROS1, there are standard message such as Image, compressed image and even variable arrays that can accomplish this. There are some example like ros2/demo git that shows cam2img but this is for cpp rclcpp. This seems like the simplest example but I cannot find any example, documentation on sending images in ROS2 python3 rclpy environment. I was actually able to turn the entire array into string and send it but this is nasty and the parsing done are unnecessary. How can I send three dimensional ndarray in rclpy in a "clean" fashion?