rosInterfaceTopicPublisherAndSubscriber.ttt and image_view

Report crashes, strange behaviour, or apparent bugs
Post Reply
mjedmonds
Posts: 3
Joined: 24 Sep 2016, 01:42

rosInterfaceTopicPublisherAndSubscriber.ttt and image_view

Post 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!

mjedmonds
Posts: 3
Joined: 24 Sep 2016, 01:42

Re: rosInterfaceTopicPublisherAndSubscriber.ttt and image_vi

Post 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

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: rosInterfaceTopicPublisherAndSubscriber.ttt and image_vi

Post by coppelia »

Oh, good catch!

Thanks!

sradmard
Posts: 11
Joined: 06 Oct 2016, 00:39

Re: rosInterfaceTopicPublisherAndSubscriber.ttt and image_vi

Post 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.

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: rosInterfaceTopicPublisherAndSubscriber.ttt and image_vi

Post by coppelia »

Hello,

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

Cheers

Post Reply