Hi, I am using ROSInterface to streaming VisionSensor data to ROS. However, when I run the demo scene rosInterfaceTopicPublisherAndSubscriber.ttt from VREP official ROS tutorial, the image published to ros is upside down.
I never change any code from the template. The passive vision sensor is having a normal display. But the image_view and Rviz all shows upside down.
Why is this happen? How to solve this problem?
BTW, I saw a previous discussion to add a "flip image vertically" filter. But that will also flip the display in the VREP, which influence the simulation effect.
The problem is similar in this ROS answer but I don't quite understand what they mean.
Image upside down when streaming to ROS
Re: Image upside down when streaming to ROS
Hello,
you can flip the retrieved image buffer with following:
Cheers
you can flip the retrieved image buffer with following:
Code: Select all
local data,w,h=sim.getVisionSensorCharImage(activeVisionSensor)
sim.transformImage(data,{w,h},4)