How to create subscriber to get USB2 camera images

asked 2019-05-24 03:12:47 -0500

massyp gravatar image

Hello every body,

I'm working with Arducam camera, which is an USB2 camera, in ROS and I'm following this tutorial : https://github.com/ArduCAM/ArduCAM_US...

And in this tutorial, they are programming a publisher node and a lauch file to work this camera, when I do rostopic info <some topic=""> it gives me that there are no subscriber.

In my application I wan't to save the image provided by the camera; so the publisher returns ROS images. what I want is to use a subscriber to recover the images in mat format with openCV; in this Ros forum they suggest to use cv_bridge and cv_transport : https://answers.ros.org/question/3047...

I understood the main problem. But I don't knew if in my case I can use this issue with my camera !! And I want also to knew if I have to perform a new node as a subscriber or I will include a subscriber node in the same node as the publisher.

Thank you at advance. I wish some one could reply me.

edit retag flag offensive close merge delete

Comments

Can you already visualise the image data in image_view as suggested in the link you added?

curi_ROS gravatar image curi_ROS  ( 2019-05-24 04:13:00 -0500 )edit

No, It display a white window when I do "rosrun image_view image_view image:=my_publishing_topic" But I search about my output messages it says me that it publish a sensor_msgs/Image So the node publish images

massyp gravatar image massyp  ( 2019-05-24 04:37:20 -0500 )edit

You need to do rosrun image_view image_view image:=/cam0/arducam/camera/image_raw. Image_view subscribes to topic image and the camera driver publishes /cam0/arducam/camera/image_raw, hence the topic needs to be remapped using image:=/cam0/arducam/camera/image_raw in order to view it with image_view.

curi_ROS gravatar image curi_ROS  ( 2019-05-24 04:45:26 -0500 )edit

Yes, It's what I did but it gives me white window and this message after excuting : [ INFO] [1558691297.866054361]: Using transport "raw"

And since it gives me this, I would to open it with my own program by transforming this ros image to Mat::Image

massyp gravatar image massyp  ( 2019-05-24 04:51:40 -0500 )edit