How to create subscriber to get USB2 camera images
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_USB_Camera_Shield/tree/master/ROS/arducam_usb2_ros
And in this tutorial, they are programming a publisher node and a lauch file to work this camera, when I do rostopic info
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 cvbridge and cvtransport : https://answers.ros.org/question/304777/new-in-ros-sensor_msgsimage-in-opencv/
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.
Asked by massyp on 2019-05-24 03:12:47 UTC
Comments
Can you already visualise the image data in image_view as suggested in the link you added?
Asked by curi_ROS on 2019-05-24 04:13:00 UTC
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
Asked by massyp on 2019-05-24 04:37:20 UTC
You need to do
rosrun image_view image_view image:=/cam0/arducam/camera/image_raw
. Image_view subscribes to topicimage
and the camera driver publishes/cam0/arducam/camera/image_raw
, hence the topic needs to be remapped usingimage:=/cam0/arducam/camera/image_raw
in order to view it with image_view.Asked by curi_ROS on 2019-05-24 04:45:26 UTC
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
Asked by massyp on 2019-05-24 04:51:40 UTC