Page 1 of 1

rosInterfaceTopicPublisherAndSubscriber.ttt and image_view

Posted: 28 Sep 2016, 03:40
by mjedmonds
Hi,

I'm new to V-Rep and trying to evaluate it for my robot platform. I'm going through some tutorials, when I came across this tutorial: http://www.coppeliarobotics.com/helpFil ... Indigo.htm.

Most of it works fine, but with rosInterfaceTopicPublisherAndSubscriber.ttt, I can't view the image in image_view. I get the following:

Code: Select all

$ rosrun image_view image_view image:=/image
[ INFO] [1475029983.085452702]: Using transport "raw"
[ERROR] [1475029983.274937361]: Unable to convert 'rgb8' image for display: 'Image is wrongly formed: step < width * byte_depth * num_channels  or  1 != 64 * 1 * 3'
It's worth noting that this topic is not the same topic as listed in the webpage (/visionSensorData), and it is the only topic besides /rosout, /rosout_agg, and /tf.

Any tips?

Thanks!

Re: rosInterfaceTopicPublisherAndSubscriber.ttt and image_vi

Posted: 28 Sep 2016, 04:36
by mjedmonds
After looking at sensors_msgs/Image, it appears that d['step'] is set incorrectly. The correct (and now working) line in the Vision_sensor child script should be:

Code: Select all

d['step']=w*3

Re: rosInterfaceTopicPublisherAndSubscriber.ttt and image_vi

Posted: 28 Sep 2016, 08:55
by coppelia
Oh, good catch!

Thanks!

Re: rosInterfaceTopicPublisherAndSubscriber.ttt and image_vi

Posted: 17 Nov 2016, 02:56
by sradmard
Hi,

I am having another problem while viewing the published images of this tutorial either in rviz or through image_view. My problem is that the images are flipped when I view them through ROS. Is it typical when using rosInterface or am I doing something wrong?

Thank you so much in advance.

Re: rosInterfaceTopicPublisherAndSubscriber.ttt and image_vi

Posted: 18 Nov 2016, 08:52
by coppelia
Hello,

this is normal. You can flip your image by applying a vision sensor filter.

Cheers