Depth sensor not returing NAN.

Typically: "How do I... ", "How can I... " questions
Post Reply
sradmard
Posts: 11
Joined: 06 Oct 2016, 00:39

Depth sensor not returing NAN.

Post by sradmard »

Hi,
I am using a kinect sensor model which has a depth camera, and publishing it to ROS through rosinterface. My problem is that, when there is nothing in front of the camera, the depth image returns maximum range (far clipping plane) in the depth image. However, in reality, it should return NAN. This causes problem when for example a mapping algorithms in ROS that uses those data do not confuse it with depth of an object at the maximum range. Is there any setting that I am missing so that it would return NAN.

Thank you so much in advance.

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

Re: Depth sensor not returing NAN.

Post by coppelia »

Hello,

not sure which kinect model exactly you are referring to. But in the end, it is entirely up to you to decide how to format the data. So in the child script attached to your sensor model, you could introduce a threshold that ignores depth values above a certain range.

Cheers

Post Reply