How to use the data from sensor_msg/image message type

asked 2020-03-10 20:02:14 -0500

Osman gravatar image

So I have a topic that publishes that message type and I am wondering how would I go about displaying let's say the depth value at a certain pixel. (from my understanding this message type is an x pixel by y pixel matrix with depth values at each point). after setting up a subscriber, what would I put in the callback function to extract the data I need? probably a dumb question but I am a beginner..

Also can someone confirm I am even understanding the message type correctly? this is the page I found http://docs.ros.org/melodic/api/senso...

edit retag flag offensive close merge delete

Comments

Quick comment: take a look at image_transport and the associated tutorials / packages.

Do not use a regular Subscriber for image related topics.

gvdhoorn gravatar image gvdhoorn  ( 2020-03-11 03:15:59 -0500 )edit