0
$\begingroup$

Rosanswers logo

I am using the rosbridge websocket server to establish communication between ROS and an environment simulation tool. I can easily exchange scalar values like the object list and the control signals. Now I want to transfer the images from the camera of the environment simulation tool to ROS, also through the rosbridge.

Is there a small example ?


Originally posted by aks on ROS Answers with karma: 667 on 2019-01-21

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

roslibpy works exactly the same as roslibjs, so you could -most likely- check this example using roslibjs for video publishing (using message type sensor_msgs/CompressedImage) and adapt it to roslibpy, all the subscribing part should be almost identical, then the decoding will be python-specific, but it should not be any problem.


Originally posted by gonzalocasas with karma: 180 on 2019-04-05

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by aks on 2019-09-18:
@gonzalocasas thank you for this example. One question here... is it necessary to use the (sensor_msgs/CompressedImage) as the message type ? Cant i use the normal (sensor_msgs/Image)

Comment by gonzalocasas on 2019-09-18:
you can also use image, of course, but you'd need to adapt it to do the corresponding decoding.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.