ifm / o3d3xx-ros

IFM Efector O3D3xx ToF Camera ROS Package
Apache License 2.0
20 stars 15 forks source link

Incorporate filtering at a ROS node/driver level #39

Open shaun-edwards opened 7 years ago

shaun-edwards commented 7 years ago

I would like to incorporate my own filtering techniques on the sensor outputs (pointclouds and potentially 2D images). In order to achieve the best performance, this can be done in two ways:

There are more filtering options with 2D images. Ideally, these would be applied to the 2D images and then the pointcloud recalculated. However, as near as I can tell, the point cloud is calculated on the sensor and not in the ROS node.

shaun-edwards commented 7 years ago

@GarrettPlace

tpanzarella commented 7 years ago

Per your note above, I think the proper approach is to provide a nodelet interface and not have these specific filters (and their parameterizations) creep into the driver. To that end, I do not have plans to provide a nodelet interface in this library (PRs are welcome if you would like to do it). However, in the coming weeks ifm3d-ros will provide a nodelet interface.

As an aside, if you really need performance and are working with the O3D, you may want to consider running your code directly on the camera and using our low-latency framegrabber -- albeit, this will not be ROS.

Some other comments related to your post above...

spatial averaging (average, median, bi-lateral) ...

This can be achieved today, on the camera itself. You can specify it directly in the libo3d3xx JSON dump. The specific constants that map to the filter type can be found here

as near as I can tell, the point cloud is calculated on the sensor and not in the ROS node.

It depends. If your PCIC schema specifies it (which is the default for this ROS node), the Cartesian data will be computed on the camera and streamed over the wire. However, the point cloud data can always be reconstructed from the Unit Vectors (published on a latched topic), Radial Distance Image, and the Extrinsic Calibration. For concrete examples you can see this C++ example or even look at the ROS unit tests for a Python example.

shaun-edwards commented 7 years ago

@tpanzarella, thanks for the quick reply.

I wasn't aware of the ifm3d-ros project. Does it replace this project? Thanks for the pointer to the onboard library. I'll take a deeper look. The type of filtering I want to do could definitely be done on-board.

I know that spatial filtering can be done on board via config, but the noise around edges negatively effects the filtering. My approach is to remove the noise before applying the spatial filter. Because of this, I would have to apply the filter myself.

tpanzarella commented 7 years ago

I wasn't aware of the ifm3d-ros project. Does it replace this project?

Yes. ifm3d and ifm3d-ros will ultimately replace libo3d3xx and o3d3xx-ros. The ifm3d ecosystem is basically a generalization of the libo3d3xx ecosystem. For example, it currently supports both the O3D and O3X cameras from ifm.

Thanks for the pointer to the onboard library. I'll take a deeper look. The type of filtering I want to do could definitely be done on-board.

No problem. Yes, we run the filters you are talking about (and much more) directly on the O3D for various applications. However, you should know that the internal processor of the O3D is a bit constrained, so, running things like the PCL SOR filter won't be free.

sara192 commented 4 years ago

Según su nota anterior, creo que el enfoque adecuado es proporcionar una interfaz de nodo y no tener estos filtros específicos (y sus parametrizaciones) en el controlador. Para ese fin, no tengo planes de proporcionar una interfaz de nodo en esta biblioteca (los RP son bienvenidos si desea hacerlo). Sin embargo, en las próximas semanas ifm3d-ros proporcionará una interfaz de nodo.

Por otro lado, si realmente necesita rendimiento y está trabajando con el O3D, puede considerar ejecutar su código directamente en la cámara y usar nuestro capturador de fotogramas de baja latencia , aunque esto no será ROS.

Algunos otros comentarios relacionados con su publicación anterior ...

Promedio espacial (promedio, mediana, bilateral) ...

This can be achieved today, on the camera itself. You can specify it directly in the libo3d3xx JSON dump. The specific constants that map to the filter type can be found here

as near as I can tell, the point cloud is calculated on the sensor and not in the ROS node.

It depends. If your PCIC schema specifies it (which is the default for this ROS node), the Cartesian data will be computed on the camera and streamed over the wire. However, the point cloud data can always be reconstructed from the Unit Vectors (published on a latched topic), Radial Distance Image, and the Extrinsic Calibration. For concrete examples you can see this C++ example or even look at the ROS unit tests for a Python example.

Hey

@GarrettPlace

Hey