simVision problem

Typically: "How do I... ", "How can I... " questions
Post Reply
lyz
Posts: 57
Joined: 07 Mar 2019, 07:34

simVision problem

Post 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

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

Re: simVision problem

Post 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

lyz
Posts: 57
Joined: 07 Mar 2019, 07:34

Re: simVision problem

Post by lyz »

Okay, Many thanks! It really works.

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

Re: simVision problem

Post by coppelia »

Hello again,

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

Cheers

lyz
Posts: 57
Joined: 07 Mar 2019, 07:34

Re: simVision problem

Post by lyz »

Okay, thanks a lot!

Post Reply