Ask Your Question

Error with an image subscriber !

asked 2019-05-28 03:58:53 -0600

massyp gravatar image

Hello ROS community,

I'm working with a USB2 camera module (Arducam AR0134), for the moment I use some of the constructor libraries to make my publisher and it work good and it gives me also ROS sensor_msgs/image.

I'm able to see my image stream with "image_view". And for the moment, I'm trying to add a subscriber in python to recover my images and save it. Since I'm working in this, I'm facing a lot of problems but I resolved the most but without receiving image in my subscriber because of some errors :

When using python I found in ros.tutorial that they use this instruction import roslib, roslib.load_manifest('my_package' ) so in my case I don't knew which kind of package I will use !!!!

Another problem, can we implement a ros publisher for the camera in python and subscriber in cpp !!!

Than you for answer

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-05-28 04:42:47 -0600

You shouldn't need to use roslib.load_manifest anywhere to get this working. Have a look at this minimal example which subscribes to a topic and saves JPG images. You should be able to run this example successfully by only changing the image_topic variable.

Secondly yes you can publish and image with python and subscribe to it with cpp and the other way around, the messages are completely language agnostic.

edit flag offensive delete link more


Thank you very much, my program is working now without error. I will just search were it save the images

massyp gravatar imagemassyp ( 2019-05-28 05:06:48 -0600 )edit

If you run the node from a launch file they will be saved in /home/<user_name>/.ros/ if started by rosrun they will be saved in the current path of the terminal.

Can you accept this answer by clicking the tick if it helped you solve the problem, thanks.

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2019-05-28 05:16:26 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-05-28 03:58:53 -0600

Seen: 30 times

Last updated: May 28 '19