This is the ROS1 wrapper of nvblox, intended to make nvblox usable for the wider robotics community (especially for research). This is a work in progress by Turcan Tuna and Helen Oleynikova.
Everything below this line still needs to be cleaned up/edited.
See the TODO list for a complete list.
Isaac ROS Nvblox contains ROS 1 packages for 3D reconstruction. The mapping pipeline is mainly designed to work with stereo cameras, which provide a depth image, and the corresponding pose uses GPU acceleration to compute 3D reconstruction and 2D costmaps using nvblox. However, this ROS 1 wrapper also supports LiDAR point cloud input.
nvblox_ros1
builds the reconstructed map in the form of a TSDF (Truncated Signed Distance Function) stored in a 3D voxel grid. This approach is similar to 3D occupancy grid mapping approaches in which occupancy probabilities are stored at each voxel. However, TSDF-based approaches like nvblox store the (signed) distance to the closest surface at each voxel. The surface of the environment can then be extracted as the zero-level set of this voxelized function. Typically, TSDF-based reconstructions provide higher quality surface reconstructions.
In addition to their use in reconstruction, distance fields are also useful for path planning because they provide an immediate means of checking whether potential future robot positions are in collision.
People are common obstacles for mobile robots, and while part of a costmap, people should not be part of the 3D reconstruction. Planners that provide behavioral awareness by navigating differently depending on their proximity to people, benefit from a costmap for people. Person segmentation is computed using the color image, with the resulting mask applied to the depth image separating depth into scene depth and person depth images. The scene depth image is forwarded to TSDF mapping as explained above, the depth image for people is processed to an occupancy grid map.
To relax the assumption that occupancy grid maps only capture static objects, Nvblox applies an occupancy decay step. At a fixed frequency, all voxel occupancy probabilities are decayed towards 0.5 over time. This means that the state of the map (occupied or free) becomes less certain after it has fallen out of the field of view, until it becomes unknown (0.5 occupancy probability).
Update 2023-07-01: Adaptations from ROS 2 to ROS 1.
This package is designed and tested to be compatible with ROS 1 Noetic running on Jetson or an x86_64 system with an NVIDIA GPU.
Note: Versions of ROS 1 earlier than Noetic are not tested.
Platform | Hardware | Software | Notes |
---|---|---|---|
Jetson | Jetson Orin Jetson Xavier |
JetPack 5.1.1 | For best performance, ensure that power settings are configured appropriately. |
x86_64 | NVIDIA GPU | Ubuntu 20.04+ CUDA 11.8+ |
To simplify development, we strongly recommend leveraging the Isaac ROS Dev Docker images by following these steps. This will streamline your development environment setup with the correct versions of dependencies on both Jetson and x86_64 platforms.
Note: All Isaac ROS Quickstarts, tutorials, and examples have been designed with the Isaac ROS Docker images as a prerequisite.
-
nvblox_ros1 requies an up-to-date compiler. Make sure your system has one. For example, on Ubuntu 20.04, you can install gcc-9 and gcc-11 with:
sudo apt update && sudo apt install -y build-essential sudo apt install gcc-11
Furthermore, CMake version >3.20. You can install it with:
- Download the latest source distribution tar archive from https://cmake.org/download/ for your operating system (e.g. cmake-3.24.1.tar.gz).
- Extract it by doing 'tar -xf cmake-.tar.gz', where can for example be 3.24.1.
- Then install this cmake version by doing:
cd cmake-<version>-rc4.tar.gz ./configure make -j$(nproc) sudo make install
-
Set up your development environment by following the instructions here.
-
Clone this repository and its dependencies under
~/workspaces/isaac_ros-dev/src
.cd ~/workspaces/isaac_ros-dev/src
git clone --recurse-submodules https://github.com/ethz-asl/nvblox_ros1.git && \ cd nvblox_ros1 && git lfs pull
-
Pull down a ROS Bag of sample data:
cd ~/workspaces/isaac_ros-dev/src/nvblox_ros1 && \ git lfs pull -X "" -I "nvblox_ros/test/test_cases/rosbags/nvblox_pol"
-
Inside the container, install package-specific dependencies via
rosdep
:cd /workspaces/isaac_ros-dev/ && \ rosdep install -i -r --from-paths src --rosdistro noetic -y --skip-keys "libopencv-dev libopencv-contrib-dev libopencv-imgproc-dev python-opencv python3-opencv nvblox"
-
Build and source the workspace:
cd /workspaces/isaac_ros-dev && \ catkin build && \ source devel/setup.bash
-
(Optional) Run tests to verify complete and correct installation: (TODO[TT] Convert to cmake tests or remove.)
catkin test --executor sequential
-
In a current terminal inside the Docker container, run the launch file for Nvblox:
source /workspaces/isaac_ros-dev/devel/setup.bash && \ roslaunch nvblox_ros nvblox_ros.launch
-
Open a second terminal inside the docker container:
cd ~/workspaces/isaac_ros-dev/src/isaac_ros_common && \ ./scripts/run_dev.sh
-
In the second terminal, play the ROS Bag:
rosbag play --pause --clock -s 0 -r 1 <your-favorite-rosbag>.bag
You should see the robot reconstructing a mesh, with the 2d esdf slice overlaid on top.
To customize your development environment, reference this guide.
- nvblox_msgs: Custom messages for transmitting the output distance map slice and mesh over ROS 1.
- nvblox_ros: The ROS 1 wrapper for the core reconstruction library and the nvblox node.
- nvblox_rviz_plugin: A plugin for displaying nvblox's (custom) mesh type in RVIZ.
- [submodule] nvblox: The core (ROS independent) reconstruction library.
Find all available ROS 1 parameters here.
Find all ROS 1 subscribers, publishers and services here.
Currently, the nvblox_ros1 package is only tested on Ubuntu 20.04 with ROS 1 Noetic. The LiDAR depth input known to be unstable in terms of robustness.
For solutions to problems with Isaac ROS, please check here.
Date | Changes |
---|---|
2023-07-01 | ROS 2 to ROS 1 port is done. |