ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

Hardware Accelerated Depth Camera Simulation


#1

Hello,

I’ve made a depth camera simulation that utilizes OpenGL for hardware acceleration, but otherwise has fairly minimal dependencies. It is most useful when you want to quickly simulate depth scans but don’t really need the full blown power of Gazebo.

I welcome feedback and contributions.

I wonder if any others users have need of a headless (or offscreen) rendering tools. Maybe machine learning applications?


#2

Hi Jonathan,

Some years ago I developed a very similar library [1], in the context of my PhD thesis. The library also used OpenGL for fast computation of virtual laser scanners on a 3D environment. These virtual scans were used as “expected measurements” and were compared with actual measurements for a particle filter map-based localization [2]. The tool worked pretty well, and very fast, allowing to update hundreds of particles at rates of 5-10Hz.

I also developed the version for depth cameras, which I wanted to use later for camera-gripper calibration for robot manipulator applications, see picture below:

The main feature of this package, specially designed for 2D lidar simulation, was that the rendering window, which can be obviously hidden, was set with a size according to the resolution of the sensor you want to simulate, so no extra pixels are rendered. This resulted with very small windows to simulate lidars, since they typically have lower angular resolutions than cameras. Small rendering windows lead to fast renderings, so fast depth computations.

Just wanted to post here, so we can be in touch, and to point out two potential applications of this approach (mobile robot map-based localization and camera-hand calibration)

If I have some time I’ll try to dive a little bit in your code. Feel free to contact me for further discussion.

best

Andreu

Math details about the library can be found in the SIMPAR’2010 publication:
Corominas Murtra, A., Trulls, E., Mirats Tur, J.M., Sanfeliu, A. Efficient Use of 3D Environment Models for Mobile Robot Simulation and Localization. Lecture Notes in Artificial Intelligence -LNAI6472. International Conference on Simulation, Modelling and Programming for Autonomous Robots (SIMPAR’10). Darmstadt, Germany. November 2010.