ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Transferring Images through rosbridge

asked 2019-01-21 11:12:25 -0600

aks gravatar image

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 ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-04-05 04:42:49 -0600

gonzalocasas gravatar image

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.

edit flag offensive delete link more

Comments

@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)

aks gravatar image aks  ( 2019-09-18 04:13:47 -0600 )edit

you can also use image, of course, but you'd need to adapt it to do the corresponding decoding.

gonzalocasas gravatar image gonzalocasas  ( 2019-09-18 08:58:54 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2019-01-21 11:12:25 -0600

Seen: 1,674 times

Last updated: Apr 05 '19