Page 1 of 1

simVision problem

Posted: 07 Jan 2020, 14:31
by lyz
Hi,
I am using CoppeliaSim API to publish kinect depth data. Previously, when I used vrep 3.6.2, image processing was done through the Image processing and triggering to output depth image in GUI. Equivalent to " Work image to output depth image" in Image processing and triggering in vrep. Because the image in vrep has an inverted relationship with the image displayed by rviz, I need to use vertical processing for the image and output depth image.
Since Image processing and triggering function in CoppeliaSim is written in code instead of GUI setting in vrep, the laser and vision model in vrep I built cannot be used, so I need to write image processing code instead, But I noticed that the function was missing: workImg to Depth image in CoppeliaSim.(http://www.coppeliarobotics.com/helpFil ... essing.htm)

Thank you in advance.

Sincerely,

lyz

Re: simVision problem

Posted: 08 Jan 2020, 09:18
by coppelia
Hello Lyz,

indeed, that was removed, since we believed that it doesn't really make sense to overwrite the depth buffer of a vision sensor.
In your case, a workaround would be to transform the depth map via sim.transformImage:

Code: Select all

    local depthBuff=sim.getVisionSensorDepthBuffer(inData.handle+sim.handleflag_codedstring)
    sim.transformImage(depthBuff,inData.resolution,1+4)
    -- here you could publish your depth buffer which has been flipped vertically
But in next revision or release, you'll find simVision.workImgToSensorDepthMap too.

Cheers

Re: simVision problem

Posted: 09 Jan 2020, 03:58
by lyz
Okay, Many thanks! It really works.

Re: simVision problem

Posted: 13 Jan 2020, 07:38
by coppelia
Hello again,

rev3 of release V4.0.0 (available for download now) introduces the missing filter component simVision.workImgToSensorDepthMap

Cheers

Re: simVision problem

Posted: 15 Jan 2020, 03:50
by lyz
Okay, thanks a lot!