Skip to content

Commit cb57082

Browse files
committed
Updating READMEs with installation and demo instructions
1 parent 3853149 commit cb57082

File tree

2 files changed

+132
-24
lines changed

2 files changed

+132
-24
lines changed

README.md

Lines changed: 131 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,140 @@
1-
## ROS2 Elevation Mapping Cupy
1+
# ROS2 Elevation Mapping Cupy
22
**Status**: Under Development 🚧
3-
### Features
3+
## Features
44
- **Point cloud-based map update**: *Functional*
55
- **Image-based map update**: *Ongoing development*
6+
- **C++ Node**: *Functional*
7+
- **Python Node**: *Functional*
8+
- **Docker & VS Code Devcontainer**: *Provided*
9+
10+
<!-- ![Elevation Map in ROS 2 Humble with Gazebo ](https://github.com/user-attachments/assets/0dd9ebbe-a90d-486f-9871-81921308fab9) -->
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.
690

7-
### Dependencies -
8-
- **ROS 2 Humble**
9-
- **CUDA 12.4**
10-
- **PyTorch 2.4.0**
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+
```
11134

12-
![Elevation Map in ROS 2 Humble with Gazebo ](https://github.com/user-attachments/assets/0dd9ebbe-a90d-486f-9871-81921308fab9)
135+
---
13136

14-
# Elevation Mapping cupy
137+
# Elevation Mapping cupy (*Instructions Not Updated for ROS2*)
15138

16139
![python tests](https://github.com/leggedrobotics/elevation_mapping_cupy/actions/workflows/python-tests.yml/badge.svg)
17140

elevation_mapping_cupy/README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
1-
## Example 1: Turtle Simple Example
2-
Install the realsense wrapper for [TurtleBot3]([ros2_turtlebot3_waffle_intel_realsense](https://github.com/mlherd/ros2_turtlebot3_waffle_intel_realsense)) and place the model in your home .gazebo/models/ folder.
3-
You can launch the turtlebot3 in Gazebo with the following command:
4-
```bash
5-
ros2 launch elevation_mapping_cupy turtle_simple_example.launch.py
6-
```
7-
You can also maunally spawn the robot in Gazebo.
8-
9-
10-
Launch the elevation mapping node:
11-
```bash
12-
ros2 launch elevation_mapping_cupy turtle_simple_example.launch.py
13-
```
14-
15-
16-
## (Corrected) Example 1: Turtle Simple Example
1+
# Example 1: Turtle Simple Example
172
Set the env in the Dockerfile
183
```dockerfile
194
ENV TURTLEBOT3_MODEL=waffle_realsense_depth

0 commit comments

Comments
 (0)