|
1 | 1 | # ROS2 Elevation Mapping Cupy |
2 | | - **Status**: Under Development 🚧 |
3 | | -## Features |
4 | | -- **Point cloud-based map update**: *Functional* |
5 | | -- **Image-based map update**: *Ongoing development* |
6 | | -- **C++ Node**: *Functional* |
7 | | -- **Python Node**: *Functional* |
8 | | -- **Docker & VS Code Devcontainer**: *Provided* |
9 | | - |
10 | | -<!--  --> |
11 | | - |
12 | | -## Installation |
13 | | -A docker file, installation and build scripts, and a VS Code Dev Container have all been provided to ease integration and development. |
14 | | -This has been tested with Ubuntu 22.04, ROS 2 Humble, Zenoh RMW, CUDA 12.1, and PyTorch 2.6.0. |
15 | | -Some dependency issues with numpy, transforms3d, scipy, and ros2_numpy arose during setup so if versions of any of these packages are changed you may run into issues. |
16 | | -The package.xml has been updated to ensure most dependencies are automatically installed via rosdep and some extra rosdep entries are provided to ensure proper versioning. |
17 | | -This is not possible for some packages, e.g. pytorch, due to need for providing an --extra-index-url during installation. |
18 | | -Therefore, this requirement is satsified inside of the docker build. |
19 | | - |
20 | | -To test out this package with the turtlebot3 Gazebo (classic) simulation you will need to install: |
21 | | -- VS Code |
22 | | -- Docker |
23 | | -- NVIDIA Container Toolkit |
24 | | -- NVIDIA CUDA Toolkit |
25 | | - |
26 | | -### Visual Studio Code |
27 | | -```bash |
28 | | -sudo snap install --classic code |
29 | | -``` |
30 | | - |
31 | | -### Docker Installation |
32 | | -```bash |
33 | | -# Add Docker's official GPG key |
34 | | -sudo apt-get update |
35 | | -sudo apt-get install ca-certificates curl gnupg -y |
36 | | -sudo install -m 0755 -d /etc/apt/keyrings |
37 | | -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
38 | | -sudo chmod a+r /etc/apt/keyrings/docker.gpg |
39 | | - |
40 | | -# Add Docker repository |
41 | | -echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
42 | | -sudo apt-get update |
43 | | - |
44 | | -# Install Docker |
45 | | -sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y |
46 | | - |
47 | | -``` |
48 | | - |
49 | | -### NVIDIA Container Toolkit Installation |
50 | | -```bash |
51 | | -# Configure the repository |
52 | | -curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg |
53 | | -curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list |
54 | | - |
55 | | -# Update and install |
56 | | -sudo apt-get update |
57 | | -sudo apt-get install -y nvidia-container-toolkit |
58 | | - |
59 | | -# Configure Docker for NVIDIA |
60 | | -sudo nvidia-ctk runtime configure --runtime=docker |
61 | | -sudo systemctl restart docker |
62 | | - |
63 | | -# Change Docker root folder |
64 | | -cd |
65 | | -mkdir docker |
66 | | -sudo tee /etc/docker/daemon.json > /dev/null <<EOT |
67 | | -{ |
68 | | - "data-root": "$HOME/docker", |
69 | | - "runtimes": { |
70 | | - "nvidia": { |
71 | | - "args": [], |
72 | | - "path": "nvidia-container-runtime" |
73 | | - } |
74 | | - } |
75 | | -} |
76 | | -EOT |
77 | | -``` |
78 | | - |
79 | | -### NVIDIA CUDA-Toolkit install |
80 | | -Use the following link for install install instructions: |
81 | | -https://developer.nvidia.com/cuda-12-1-0-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local |
82 | | - |
83 | | -### Docker Configuration and Workspace Cloning |
84 | | -```bash |
85 | | -sudo usermod -aG docker ${USER} |
86 | | -# Use gituser.sh for Git credential setup |
87 | | -``` |
88 | | -### Restart Your Computer |
89 | | -- After completing the setup and configuration steps, it is necessary to restart your computer to ensure that all changes take effect. |
90 | | - |
91 | | ---------------------------------------------------------- |
92 | | - |
93 | | -### Run the Container |
94 | | - |
95 | | -#### Clone the Elevation Mapping CUPY Repository |
96 | | -```bash |
97 | | -cd /home/<USERNAME>/ |
98 | | -git clone -b ros2_humble https://github.com/jwag/elevation_mapping_cupy.git |
99 | | -``` |
100 | | - |
101 | | -#### Building the Docker Workspace Container |
102 | | -- Open the folder with VS Code |
103 | | -- Select **"Dev Containers: Reopen in container"** in the bottom left from the blue button which will build the docker image. |
104 | | -- Setup the workspace |
105 | | - ```bash |
106 | | - ./docker/setup.sh |
107 | | - ``` |
108 | | -- Build the workspace |
109 | | - ```bash |
110 | | - ./docker/build.sh |
111 | | - |
112 | | -#### Run The Turtlebot3 Demo |
113 | | -The docker should set the environmental variable `TURTLEBOT3_MODEL=waffle_realsense_depth` to select the correct version of the turtlebot to simulate. |
114 | | - |
115 | | -In the first terminal start the zenoh router: |
116 | | -```bash |
117 | | -ros2 run rmw_zenoh_cpp rmw_zenohd |
118 | | -``` |
119 | | - |
120 | | -In a second terminal launch the turtlebot3 in Gazebo with the following command: |
121 | | -```bash |
122 | | -ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py |
123 | | -``` |
124 | | - |
125 | | -In a third terminal launch the elevation mapping node with the configs for the turtle. Set use_python_node to true to override the default use of the cpp node if you wish: |
126 | | -```bash |
127 | | -ros2 launch elevation_mapping_cupy elevation_mapping_turtle.launch.py use_python_node:=false |
128 | | -``` |
129 | | - |
130 | | -In a fourth terminal run the turtlebot3 teleop node if you want to drive the turtlebot around using the keyboard: |
131 | | -```bash |
132 | | -ros2 run turtlebot3_teleop teleop_keyboard |
133 | | -``` |
134 | | - |
135 | | ---- |
136 | | - |
137 | | -# Elevation Mapping cupy (*Instructions Not Updated for ROS2*) |
138 | | - |
| 2 | + |
139 | 3 |  |
140 | 4 |
|
141 | 5 | [Documentation](https://leggedrobotics.github.io/elevation_mapping_cupy/) |
|
0 commit comments