├── scripts ├── docker-config │ ├── jetson_multimedia_api.csv │ └── daemon.json ├── README.md ├── fix_jetson_docker.sh └── build_docker.sh ├── remote_viewer ├── rviz_zedm.png ├── rviz_realsense.png ├── README.md ├── install_zed.sh ├── install_realsense.sh ├── remote_view_zed.rviz └── remote_view.rviz ├── .gitignore ├── .github ├── dependabot.yml ├── ci_builder.sh └── workflows │ └── docker-builder.yml ├── 01-argus_camera ├── argus_camera.rosinstall ├── README.md └── Dockerfile ├── 03-zed_camera ├── zed_camera.rosinstall ├── README.md ├── isaac_ros_zed │ ├── CMakeLists.txt │ ├── package.xml │ ├── launch │ │ └── isaac_ros_zed.launch.py │ └── config │ │ └── common.yaml └── Dockerfile ├── 02-realsense_camera ├── realsense_camera.rosinstall ├── README.md ├── isaac_ros_realsense │ ├── CMakeLists.txt │ ├── package.xml │ └── launch │ │ └── isaac_ros_realsense.launch.py └── Dockerfile ├── 04-oakd_camera ├── oakd_camera.rosinstall ├── README.md ├── isaac_ros_oakd │ ├── CMakeLists.txt │ ├── package.xml │ └── launch │ │ └── isaac_ros_oakd.launch.py └── Dockerfile ├── 00-isaac_ros_base ├── isaac_ros_base.rosinstall └── Dockerfile ├── isaac_ros_runner ├── docker-compose.yml ├── README.md └── installer.sh ├── LICENSE └── README.md /scripts/docker-config/jetson_multimedia_api.csv: -------------------------------------------------------------------------------- 1 | dir, /usr/src/jetson_multimedia_api 2 | -------------------------------------------------------------------------------- /remote_viewer/rviz_zedm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbonghi/isaac_ros_tutorial/HEAD/remote_viewer/rviz_zedm.png -------------------------------------------------------------------------------- /remote_viewer/rviz_realsense.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbonghi/isaac_ros_tutorial/HEAD/remote_viewer/rviz_realsense.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | matrix.json 2 | .env 3 | isaac_ros_runner/github-actions/* 4 | isaac_ros_runner/actions-runner-files/* 5 | 6 | # remote view 7 | remote_viewer/build 8 | remote_viewer/install 9 | remote_viewer/log 10 | remote_viewer/src -------------------------------------------------------------------------------- /scripts/docker-config/daemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimes": { 3 | "nvidia": { 4 | "path": "nvidia-container-runtime", 5 | "runtimeArgs": [] 6 | } 7 | }, 8 | 9 | "default-runtime": "nvidia" 10 | } -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: docker 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 10 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | # Check for updates to GitHub Actions every weekday 12 | interval: "daily" 13 | -------------------------------------------------------------------------------- /01-argus_camera/argus_camera.rosinstall: -------------------------------------------------------------------------------- 1 | - git: 2 | local-name: isaac_ros_common 3 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git 4 | - git: 5 | local-name: isaac_ros_image_pipeline 6 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_image_pipeline.git 7 | - git: 8 | local-name: isaac_ros_argus_camera 9 | uri: https://github.com/rbonghi/isaac_ros_argus_camera.git -------------------------------------------------------------------------------- /03-zed_camera/zed_camera.rosinstall: -------------------------------------------------------------------------------- 1 | - git: 2 | local-name: isaac_ros_common 3 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git 4 | - git: 5 | local-name: isaac_ros_image_pipeline 6 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_image_pipeline.git 7 | - git: 8 | local-name: isaac_ros_visual_slam 9 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_visual_slam.git -------------------------------------------------------------------------------- /02-realsense_camera/realsense_camera.rosinstall: -------------------------------------------------------------------------------- 1 | - git: 2 | local-name: isaac_ros_common 3 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git 4 | - git: 5 | local-name: isaac_ros_image_pipeline 6 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_image_pipeline.git 7 | - git: 8 | local-name: isaac_ros_visual_slam 9 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_visual_slam.git -------------------------------------------------------------------------------- /04-oakd_camera/oakd_camera.rosinstall: -------------------------------------------------------------------------------- 1 | - git: 2 | local-name: isaac_ros_common 3 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git 4 | - git: 5 | local-name: isaac_ros_image_pipeline 6 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_image_pipeline.git 7 | - git: 8 | local-name: isaac_ros_visual_odometry 9 | uri: https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_visual_odometry.git -------------------------------------------------------------------------------- /02-realsense_camera/README.md: -------------------------------------------------------------------------------- 1 | # Isaac ROS - Realsense camera 2 | 3 | # Build 4 | 5 | ``` 6 | bash scripts/build_docker.sh 02-realsense_camera 7 | ``` 8 | 9 | 10 | 11 | # Run docker 12 | 13 | ``` 14 | docker run --runtime nvidia --network host --privileged rbonghi/isaac-ros-tutorial:realsense-camera 15 | ``` 16 | 17 | Option explained: 18 | * --runtime nvidia will use the NVIDIA container runtime while running the l4t-base container 19 | * --network host To read all topics outside the container need to share the same network to the host 20 | * -v is the mounting directory 21 | * --privileged Allow access to host -------------------------------------------------------------------------------- /scripts/README.md: -------------------------------------------------------------------------------- 1 | # Scripts 2 | 3 | In this folder there are all scripts to works with NVIDIA Isaac ROS GEMs. 4 | 5 | ## Fix NVIDIA Jetson to build Isaac ROS packages 6 | 7 | To build Isaac ROS on your board, you need to add a special attribute on the docker builder, to enable the **jetson multimedia api** and set the default runtime `"default-runtime": "nvidia"` 8 | 9 | **Please note:** This script will **restart** the docker service. 10 | 11 | ``` 12 | bash scripts/fix_jetson_docker.sh 13 | ``` 14 | 15 | ## Build and push docker 16 | 17 | If you want build one of the tutorial in this page, please run: 18 | 19 | ``` 20 | bash scripts/build_docker.sh 21 | ``` 22 | 23 | You need to select which folder you want build. -------------------------------------------------------------------------------- /00-isaac_ros_base/isaac_ros_base.rosinstall: -------------------------------------------------------------------------------- 1 | - git: 2 | local-name: pcl_msgs 3 | version: ros2 4 | uri: https://github.com/ros-perception/pcl_msgs.git 5 | - git: 6 | local-name: perception_pcl 7 | uri: https://github.com/ros-perception/perception_pcl.git 8 | - git: 9 | local-name: common_interfaces 10 | version: 2.2.3 11 | uri: https://github.com/ros2/common_interfaces.git 12 | - git: 13 | local-name: diagnostics 14 | version: foxy 15 | uri: https://github.com/ros/diagnostics.git 16 | - git: 17 | local-name: xacro 18 | version: ros2 19 | uri: https://github.com/ros/xacro.git 20 | - git: 21 | local-name: image_common 22 | version: 3.0.0 23 | uri: https://github.com/ros-perception/image_common.git -------------------------------------------------------------------------------- /01-argus_camera/README.md: -------------------------------------------------------------------------------- 1 | # Isaac ROS - Argus camera 2 | 3 | Example to setup a Dockerfile with all Isaac ROS packages to run an Isaac ROS argus camera 4 | 5 | This demo start your MIPI camera and rectify the image, the output is in `/image_raw` 6 | 7 | 8 | 9 | # Build 10 | 11 | ``` 12 | bash scripts/build_docker.sh 01-argus_camera 13 | ``` 14 | 15 | # Run docker 16 | 17 | ``` 18 | docker run -v /tmp/argus_socket:/tmp/argus_socket --runtime nvidia --network host rbonghi/isaac-ros-tutorial:argus-camera 19 | ``` 20 | 21 | Option explained: 22 | * --runtime nvidia will use the NVIDIA container runtime while running the l4t-base container 23 | * --network host To read all topics outside the container need to share the same network to the host 24 | * -v is the mounting directory 25 | -------------------------------------------------------------------------------- /03-zed_camera/README.md: -------------------------------------------------------------------------------- 1 | # Isaac ROS - ZED camera 2 | 3 | # Build 4 | 5 | ``` 6 | bash scripts/build_docker.sh 03-zed_camera 7 | ``` 8 | 9 | # Run docker 10 | 11 | ``` 12 | docker run --runtime nvidia --network host --privileged rbonghi/isaac-ros-tutorial:zed-camera 13 | ``` 14 | 15 | Option explained: 16 | * --runtime nvidia will use the NVIDIA container runtime while running the l4t-base container 17 | * --network host To read all topics outside the container need to share the same network to the host 18 | * -v is the mounting directory 19 | * --privileged Allow access to host 20 | 21 | ## Hack docker from this folder 22 | 23 | ``` 24 | docker run --network host --privileged -v $HOME/isaac_ros_tutorial/03-zed_camera/isaac_ros_zed:/opt/ros_ws/src/isaac_ros_zed -it --rm rbonghi/isaac-ros-tutorial:zed-camera 25 | ``` -------------------------------------------------------------------------------- /remote_viewer/README.md: -------------------------------------------------------------------------------- 1 | # Remote view 2 | 3 | Install the minimal packages to run rviz2 and show the camera on board 4 | 5 | # Install realsense ros2 package 6 | 7 | build realsense ROS2 package 8 | 9 | ``` 10 | bash install_realsense.sh 11 | ``` 12 | 13 | ## Run rviz2 14 | 15 | ``` 16 | source install/setup.bash 17 | rviz2 -d remote_view.rviz 18 | ``` 19 | 20 | ![zedm rviz](rviz_realsense.png) 21 | 22 | # Install ZED ros2 package 23 | 24 | You need yo install the ZED SDK, if is missing on your desktop: 25 | 26 | ``` 27 | bash -c "$(curl -fsSL https://download.stereolabs.com/getzed)" 28 | ``` 29 | 30 | Build **zed-ros2-wrapper** 31 | 32 | ``` 33 | bash install_zed_wrapper.sh 34 | ``` 35 | 36 | ## Run rviz2 37 | 38 | ``` 39 | source install/setup.bash 40 | rviz2 -d remote_view_zed.rviz 41 | ``` 42 | 43 | ![zedm rviz](rviz_zedm.png) -------------------------------------------------------------------------------- /isaac_ros_runner/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.3' 2 | 3 | services: 4 | worker: 5 | image: myoung34/github-runner:latest 6 | restart: always 7 | environment: 8 | REPO_URL: https://github.com/rbonghi/isaac_ros_tutorial 9 | RUNNER_NAME: ${GITHUB_ACTIONS_RUNNER_NAME} 10 | ACCESS_TOKEN: ${GITHUB_ACTIONS_ACCESS_TOKEN} 11 | RUNNER_WORKDIR: ${PWD}/github-actions 12 | RUNNER_SCOPE: 'repo' 13 | LABELS: linux,gpu,Jetson 14 | volumes: 15 | - '/var/run/docker.sock:/var/run/docker.sock' 16 | - '${PWD}/github-actions:${PWD}/github-actions' 17 | # note: a quirk of docker-in-docker is that this path 18 | # needs to be the same path on host and inside the container, 19 | # docker mgmt cmds run outside of docker but expect the paths from within 20 | - '/var/lib/dpkg/status:/var/lib/dpkg/status' -------------------------------------------------------------------------------- /04-oakd_camera/README.md: -------------------------------------------------------------------------------- 1 | # Isaac ROS - OAK-D camera 2 | 3 | # Build 4 | 5 | Remind, before to build add an extra cache 6 | 7 | ``` 8 | bash scripts/build_docker.sh 04-oakd_camera 9 | ``` 10 | 11 | # Run docker 12 | 13 | ``` 14 | docker run --runtime nvidia --network host --privileged rbonghi/isaac-ros-tutorial:oakd-camera 15 | ``` 16 | 17 | Option explained: 18 | * --runtime nvidia will use the NVIDIA container runtime while running the l4t-base container 19 | * --network host To read all topics outside the container need to share the same network to the host 20 | * -v is the mounting directory 21 | * --privileged Allow access to host 22 | 23 | ## Hack docker from this folder 24 | 25 | ``` 26 | docker run --network host --privileged -v $HOME/isaac_ros_tutorial/04-oakd_camera/isaac_ros_oakd:/opt/ros_ws/src/isaac_ros_oakd -it --rm rbonghi/isaac-ros-tutorial:oakd-camera bash 27 | ``` -------------------------------------------------------------------------------- /04-oakd_camera/isaac_ros_oakd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | 3 | project(isaac_ros_oakd) 4 | 5 | ################################################################################ 6 | # Find ament packages and libraries for ament and system dependencies 7 | ################################################################################ 8 | find_package(ament_cmake REQUIRED) 9 | 10 | ################################################################################ 11 | # Install 12 | ################################################################################ 13 | install( 14 | DIRECTORY launch 15 | DESTINATION share/${PROJECT_NAME} 16 | ) 17 | 18 | ################################################################################ 19 | # Macro for ament package 20 | ################################################################################ 21 | ament_package() -------------------------------------------------------------------------------- /03-zed_camera/isaac_ros_zed/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | 3 | project(isaac_ros_zed) 4 | 5 | ################################################################################ 6 | # Find ament packages and libraries for ament and system dependencies 7 | ################################################################################ 8 | find_package(ament_cmake REQUIRED) 9 | 10 | ################################################################################ 11 | # Install 12 | ################################################################################ 13 | install( 14 | DIRECTORY launch config 15 | DESTINATION share/${PROJECT_NAME} 16 | ) 17 | 18 | ################################################################################ 19 | # Macro for ament package 20 | ################################################################################ 21 | ament_package() -------------------------------------------------------------------------------- /02-realsense_camera/isaac_ros_realsense/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | 3 | project(isaac_ros_realsense) 4 | 5 | ################################################################################ 6 | # Find ament packages and libraries for ament and system dependencies 7 | ################################################################################ 8 | find_package(ament_cmake REQUIRED) 9 | 10 | ################################################################################ 11 | # Install 12 | ################################################################################ 13 | install( 14 | DIRECTORY launch 15 | DESTINATION share/${PROJECT_NAME} 16 | ) 17 | 18 | ################################################################################ 19 | # Macro for ament package 20 | ################################################################################ 21 | ament_package() -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a 4 | copy of this software and associated documentation files (the "Software"), 5 | to deal in the Software without restriction, including without limitation 6 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | and/or sell copies of the Software, and to permit persons to whom the 8 | Software is furnished to do so, subject to the following conditions: 9 | The above copyright notice and this permission notice shall be included in 10 | all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | DEALINGS IN THE SOFTWARE -------------------------------------------------------------------------------- /remote_viewer/install_zed.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | 22 | main() 23 | { 24 | mkdir -p src 25 | 26 | # Clone zed2 wrapper package 27 | cd src 28 | git clone --recursive https://github.com/stereolabs/zed-ros2-wrapper.git 29 | 30 | cd .. 31 | # Build ros2 packages 32 | source /opt/ros/foxy/setup.bash 33 | colcon build --packages-up-to zed_wrapper zed_interfaces 34 | } 35 | 36 | main $@ 37 | #EOF -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # isaac_ros_tutorial [![build](https://github.com/rbonghi/isaac_ros_tutorial/actions/workflows/docker-builder.yml/badge.svg)](https://github.com/rbonghi/isaac_ros_tutorial/actions/workflows/docker-builder.yml) 2 | 3 | A set of tutorial to define and setup your docker for each package 4 | 5 | Basic reference: 6 | * [Isaac ROS GEMs](https://developer.nvidia.com/isaac-ros-gems) 7 | * [Repositories](https://github.com/NVIDIA-ISAAC-ROS) 8 | * [Jetson containers](https://github.com/dusty-nv/jetson-containers) 9 | 10 | # Tutorial 11 | 12 | * [01-argus_camera](01-argus_camera/README.md) 13 | * [02-realsense_camera](02-realsense_camera/README.md) 14 | * [03-zed_camera](03-zed_camera/README.md) 15 | * [04-oakd_camera](03-oakd_camera/README.md) - **In draft** 16 | 17 | # Install 18 | 19 | Follow the instructions to: 20 | 21 | 1. [scripts](scripts/README.md) folder 22 | 2. Install [isaac_ros_runner](isaac_ros_runner/README.md) on your Jetson 23 | 24 | # View remotely 25 | 26 | To install the robot description on your remote machine, follow the readme 27 | 28 | * [remote_viewer](remote_viewer/README.md) folder 29 | 30 | You will be able to see the an output like 31 | 32 | ![zedm rviz](remote_viewer/rviz_realsense.png) 33 | 34 | # Pre-built Container Images 35 | 36 | | Container tag | L4T version | 37 | |-----------------------------------------------|-------------| 38 | | `rbonghi/isaac-ros-tutorial:isaac-ros-base` | R32.6.1 | 39 | | `rbonghi/isaac-ros-tutorial:argus-camera` | R32.6.1 | 40 | | `rbonghi/isaac-ros-tutorial:realsense-camera` | R32.6.1 | 41 | | `rbonghi/isaac-ros-tutorial:zed-camera` | R32.6.1 | 42 | -------------------------------------------------------------------------------- /isaac_ros_runner/README.md: -------------------------------------------------------------------------------- 1 | # isaac_ros_runner 2 | 3 | Github actions server runner based from [Docker Github Actions Runner](https://github.com/myoung34/docker-github-actions-runner) 4 | 5 | # Before install 6 | 7 | You need a [Github token PAT](https://developer.github.com/v3/actions/self_hosted_runners/#create-a-registration-token) 8 | 9 | the following scopes are selected: 10 | 11 | * repo (all) 12 | * workflow 13 | * admin:org (all) (**mandatory for organization-wide runner**) 14 | * admin:public_key - read:public_key 15 | * admin:repo_hook - read:repo_hook 16 | * admin:org_hook 17 | * notifications 18 | 19 | # Install 20 | 21 | Before to run the `installer.sh` script you need install and setup your NVIDIA Jetson to work with docker-compose. If you did not install **python3 pip**, please run this script on your *NVIDIA Jetson* otherwhise skip this first step. 22 | 23 | ``` 24 | sudo apt-get install -y python3-pip 25 | ``` 26 | 27 | Install docker-compose on your NVIDIA Jetson: 28 | 29 | ``` 30 | sudo apt-get install -y libffi-dev python-openssl libssl-dev 31 | sudo -H pip3 install -U pip 32 | sudo pip3 install -U docker-compose 33 | ``` 34 | 35 | Second step you need to add docker permission in your user: 36 | ``` 37 | sudo usermod -aG docker $USER 38 | ``` 39 | **PLEASE NOTE** You need to reboot your board! 40 | 41 | Follow the installer running, from **`isaac_ros_runner`** folder: 42 | 43 | ``` 44 | bash installer.sh 45 | ``` 46 | 47 | # Run github action runner 48 | 49 | from **`isaac_ros_runner`** folder: 50 | 51 | ``` 52 | docker-compose up -d 53 | ``` 54 | 55 | # Stop Github action runner 56 | 57 | from **`isaac_ros_runner`** folder: 58 | 59 | ``` 60 | docker-compose down 61 | ``` -------------------------------------------------------------------------------- /remote_viewer/install_realsense.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | 22 | main() 23 | { 24 | 25 | mkdir -p src 26 | 27 | cd src 28 | 29 | # Clone realsense ros2 package 30 | git clone --depth 1 --branch `git ls-remote --tags https://github.com/IntelRealSense/realsense-ros.git | grep -Po "(?<=tags/)3.\d+\.\d+" | sort -V | tail -1` https://github.com/IntelRealSense/realsense-ros.git 31 | 32 | cd .. 33 | # Build ros2 packages 34 | source /opt/ros/foxy/setup.bash 35 | colcon build --packages-up-to realsense2_description 36 | } 37 | 38 | main $@ 39 | #EOF -------------------------------------------------------------------------------- /03-zed_camera/isaac_ros_zed/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | isaac_ros_zed 25 | 0.1.0 26 | NVIDIA Isaac ROS demo launcer for ZED camera 27 | 28 | Raffaello Bonghi 29 | Raffaello Bonghi 30 | MIT 31 | 32 | https://developer.nvidia.com/isaac-ros-gems 33 | https://github.com/rbonghi/isaac_ros_tutorial 34 | https://github.com/rbonghi/isaac_ros_tutorial/issues 35 | 36 | ament_cmake 37 | 38 | ament_lint_auto 39 | ament_lint_common 40 | 41 | 42 | ament_cmake 43 | 44 | -------------------------------------------------------------------------------- /04-oakd_camera/isaac_ros_oakd/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | isaac_ros_oakd 25 | 0.1.0 26 | NVIDIA Isaac ROS demo launcer for OAK-D camera 27 | 28 | Raffaello Bonghi 29 | Raffaello Bonghi 30 | MIT 31 | 32 | https://developer.nvidia.com/isaac-ros-gems 33 | https://github.com/rbonghi/isaac_ros_tutorial 34 | https://github.com/rbonghi/isaac_ros_tutorial/issues 35 | 36 | ament_cmake 37 | 38 | ament_lint_auto 39 | ament_lint_common 40 | 41 | 42 | ament_cmake 43 | 44 | -------------------------------------------------------------------------------- /02-realsense_camera/isaac_ros_realsense/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | isaac_ros_realsense 25 | 0.1.0 26 | NVIDIA Isaac ROS demo launcer for Intel Realsense d435i 27 | 28 | Raffaello Bonghi 29 | Raffaello Bonghi 30 | MIT 31 | 32 | https://developer.nvidia.com/isaac-ros-gems 33 | https://github.com/rbonghi/isaac_ros_tutorial 34 | https://github.com/rbonghi/isaac_ros_tutorial/issues 35 | 36 | ament_cmake 37 | 38 | ament_lint_auto 39 | ament_lint_common 40 | 41 | 42 | ament_cmake 43 | 44 | -------------------------------------------------------------------------------- /.github/ci_builder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | 22 | bold=`tput bold` 23 | red=`tput setaf 1` 24 | green=`tput setaf 2` 25 | yellow=`tput setaf 3` 26 | reset=`tput sgr0` 27 | 28 | 29 | main() 30 | { 31 | local start_from=1 32 | local local_folder=$(pwd) 33 | local json_file="matrix.json" 34 | # Build a list of folder available 35 | declare -a dirs 36 | local i=1 37 | for d in $local_folder/*/ 38 | do 39 | # Exlude scripts folder 40 | if [[ $d =~ [$start_from-9] ]] ; then 41 | dirs[i++]="${d%/}" 42 | fi 43 | done 44 | 45 | echo "There are ${green}${#dirs[@]} tutorials${reset} in the current path" 46 | 47 | # https://github.blog/changelog/2020-04-15-github-actions-new-workflow-features/ 48 | # https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson 49 | echo -n "{\"include\":[" > $json_file 50 | # Worker to build all docker file 51 | for((i=1;i<=${#dirs[@]};i++)) 52 | do 53 | local folder=${dirs[i]} 54 | echo "- ${bold}$i${reset} tutorial: ${green}$folder${reset}" 55 | # Run build docker 56 | # bash $local_folder/scripts/build_docker.sh $folder 57 | 58 | local separator="," 59 | if [ $i = ${#dirs[@]} ] ; then 60 | separator="]" 61 | fi 62 | echo -n "{\"project\": \"$(basename $folder)\"}$separator" >> $json_file 63 | done 64 | echo -n "}" >> $json_file 65 | 66 | } 67 | 68 | main $@ 69 | # EOF -------------------------------------------------------------------------------- /01-argus_camera/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the "Software"), 5 | # to deal in the Software without restriction, including without limitation 6 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | # and/or sell copies of the Software, and to permit persons to whom the 8 | # Software is furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | # DEALINGS IN THE SOFTWARE. 20 | 21 | # Start from Isaac ROS base 22 | ARG BASE_IMAGE="rbonghi/isaac-ros-tutorial:isaac-ros-base" 23 | FROM ${BASE_IMAGE} 24 | 25 | ################ BUILD & INSTALL ISAAC ROS packages #################### 26 | 27 | # Build Isaac ROS package 28 | ENV ISAAC_ROS_WS /opt/isaac_ros_ws 29 | ARG ROSINSTALL=argus_camera.rosinstall 30 | # Copy wstool rosinstall 31 | COPY ${ROSINSTALL} ${ROSINSTALL} 32 | 33 | RUN apt-get update && \ 34 | apt-get install python3-vcstool python3-pip -y && \ 35 | mkdir -p ${ISAAC_ROS_WS}/src && \ 36 | vcs import ${ISAAC_ROS_WS}/src < ${ROSINSTALL} && \ 37 | rm -rf /var/lib/apt/lists/* 38 | # Pull LFS files 39 | RUN cd ${ISAAC_ROS_WS}/src/isaac_ros_common && git lfs pull && \ 40 | cd ${ISAAC_ROS_WS}/src/isaac_ros_image_pipeline && git lfs pull && \ 41 | cd ${ISAAC_ROS_WS}/src/isaac_ros_argus_camera && git lfs pull 42 | 43 | # Change workdir 44 | WORKDIR $ISAAC_ROS_WS 45 | 46 | # Build Isaac ROS 47 | RUN . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 48 | colcon build --symlink-install \ 49 | --cmake-args \ 50 | -DCMAKE_BUILD_TYPE=Release 51 | 52 | ################ Final enviroment setup #################### 53 | 54 | # source ros package from entrypoint 55 | RUN sed --in-place --expression \ 56 | '$isource "$ISAAC_ROS_WS/install/setup.bash"' \ 57 | /ros_entrypoint.sh 58 | 59 | # run ros package launch file 60 | CMD ["ros2", "launch", "isaac_ros_argus_camera_mono", "isaac_ros_argus_camera_mono_launch.py"] -------------------------------------------------------------------------------- /scripts/fix_jetson_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | 22 | main() 23 | { 24 | SCRIPTS_DIR=$(cd $(dirname ${BASH_SOURCE:-$0}); pwd) 25 | local PLATFORM="$(uname -m)" 26 | # Check if is running on NVIDIA Jetson platform 27 | if [[ $PLATFORM != "aarch64" ]]; then 28 | echo "${red}Run this script only on ${bold}${green}NVIDIA${reset}${red} Jetson platform${reset}" 29 | exit 33 30 | fi 31 | 32 | while :; do 33 | read -p "Do you wish to fix docker to works with isaac-ros? [Y/n] " yn 34 | case $yn in 35 | [Yy]* ) # Break and install jetson_stats 36 | break;; 37 | [Nn]* ) exit;; 38 | * ) echo "Please answer yes or no.";; 39 | esac 40 | done 41 | 42 | # Make sure the nvidia docker runtime will be used for builds 43 | DEFAULT_RUNTIME=$(docker info | grep "Default Runtime: nvidia" ; true) 44 | if [[ -z "$DEFAULT_RUNTIME" ]]; then 45 | echo "${yellow} - Set runtime nvidia on /etc/docker/daemon.json${reset}" 46 | sudo mv /etc/docker/daemon.json /etc/docker/daemon.json.bkp 47 | sudo cp ${SCRIPTS_DIR}/docker-config/daemon.json /etc/docker/daemon.json 48 | fi 49 | 50 | local PATH_HOST_FILES4CONTAINER="/etc/nvidia-container-runtime/host-files-for-container.d" 51 | echo "${green} - Enable dockers to build jetson_multimedia api folder${reset}" 52 | sudo cp ${SCRIPTS_DIR}/docker-config/jetson_multimedia_api.csv $PATH_HOST_FILES4CONTAINER/jetson_multimedia_api.csv 53 | 54 | echo "${yellow} - Restart docker server${reset}" 55 | sudo systemctl restart docker.service 56 | } 57 | 58 | main $@ 59 | #EOF 60 | -------------------------------------------------------------------------------- /04-oakd_camera/isaac_ros_oakd/launch/isaac_ros_oakd.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the "Software"), 5 | # to deal in the Software without restriction, including without limitation 6 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | # and/or sell copies of the Software, and to permit persons to whom the 8 | # Software is furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | # DEALINGS IN THE SOFTWARE. 20 | 21 | import os 22 | import launch 23 | from launch_ros.actions import ComposableNodeContainer, Node 24 | from launch_ros.descriptions import ComposableNode 25 | from ament_index_python.packages import get_package_share_directory 26 | 27 | 28 | def generate_launch_description(): 29 | 30 | visual_odometry_node = ComposableNode( 31 | name='visual_odometry_node', 32 | package='isaac_ros_visual_odometry', 33 | plugin='isaac_ros::visual_odometry::VisualOdometryNode', 34 | namespace='camera', 35 | parameters=[{ 36 | 'enable_rectified_pose': False, 37 | 'denoise_input_images': False, 38 | 'rectified_images': True, 39 | 'enable_debug_mode': False, 40 | 'enable_imu': False, 41 | 'debug_dump_path': '/tmp/elbrus', 42 | 'left_camera_frame': f"left_camera_frame", 43 | 'right_camera_frame': f"right_camera_frame", 44 | 'fixed_frame': 'odom', 45 | 'current_smooth_frame': 'base_link_smooth', 46 | 'current_rectified_frame': 'base_link_rectified' 47 | }], 48 | remappings=[('stereo_camera/left/camera_info', 49 | f"left/camera_info"), 50 | ('stereo_camera/right/camera_info', 51 | f"right/camera_info"), 52 | ('stereo_camera/left/image', 53 | f"left/image_rect_gray"), 54 | ('stereo_camera/right/image', 55 | f"right/image_rect_gray")], 56 | ) 57 | 58 | visual_odometry_launch_container = ComposableNodeContainer( 59 | name='visual_odometry_launch_container', 60 | namespace='camera', 61 | package='rclcpp_components', 62 | executable='component_container', 63 | composable_node_descriptions=[ 64 | visual_odometry_node 65 | ], 66 | output='screen' 67 | ) 68 | 69 | return launch.LaunchDescription([visual_odometry_launch_container]) 70 | -------------------------------------------------------------------------------- /04-oakd_camera/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the "Software"), 5 | # to deal in the Software without restriction, including without limitation 6 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | # and/or sell copies of the Software, and to permit persons to whom the 8 | # Software is furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | # DEALINGS IN THE SOFTWARE. 20 | 21 | # Start from Isaac ROS base 22 | ARG BASE_IMAGE="rbonghi/isaac-ros-tutorial:isaac-ros-base" 23 | FROM ${BASE_IMAGE} 24 | 25 | ################ INSTALL OAK-D drivers ################################# 26 | 27 | # From https://github.com/luxonis/depthai-ros/tree/main 28 | RUN wget -qO- https://raw.githubusercontent.com/luxonis/depthai-ros/main/install_dependencies.sh | bash 29 | RUN rm -rf /var/lib/apt/lists/* 30 | 31 | # Build OAK-D driver in ROS2 32 | RUN mkdir -p /opt/ros/foxy/src && \ 33 | wget https://raw.githubusercontent.com/luxonis/depthai-ros/main/underlay.repos && \ 34 | vcs import /opt/ros/foxy/src < underlay.repos && \ 35 | . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 36 | cd /opt/ros/foxy && \ 37 | colcon build --merge-install 38 | 39 | ################ BUILD & INSTALL ISAAC ROS packages #################### 40 | 41 | # Build Isaac ROS package 42 | ENV ISAAC_ROS_WS /opt/isaac_ros_ws 43 | ARG ROSINSTALL=oakd_camera.rosinstall 44 | # Copy wstool rosinstall 45 | COPY ${ROSINSTALL} ${ROSINSTALL} 46 | 47 | RUN mkdir -p ${ISAAC_ROS_WS}/src && \ 48 | vcs import ${ISAAC_ROS_WS}/src < ${ROSINSTALL} 49 | # Pull LFS files 50 | RUN cd ${ISAAC_ROS_WS}/src/isaac_ros_common && git lfs pull && \ 51 | cd ${ISAAC_ROS_WS}/src/isaac_ros_image_pipeline && git lfs pull && \ 52 | cd ${ISAAC_ROS_WS}/src/isaac_ros_visual_odometry && git lfs pull 53 | 54 | # Change workdir 55 | WORKDIR $ISAAC_ROS_WS 56 | 57 | # Build Isaac ROS 58 | RUN . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 59 | colcon build --symlink-install \ 60 | --cmake-args \ 61 | -DCMAKE_BUILD_TYPE=Release 62 | 63 | ################ PROJECT PKG ############################### 64 | 65 | # Download and build ros workspace 66 | ENV ROS_WS /opt/ros_ws 67 | RUN mkdir -p ${ROS_WS}/src 68 | 69 | ADD isaac_ros_oakd $ROS_WS/src/isaac_ros_oakd 70 | 71 | # Change workdir 72 | WORKDIR $ROS_WS 73 | 74 | # Build Isaac ROS 75 | RUN . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 76 | . $ISAAC_ROS_WS/install/setup.sh && \ 77 | colcon build --symlink-install \ 78 | --cmake-args \ 79 | -DCMAKE_BUILD_TYPE=Release 80 | 81 | ################ Final enviroment setup #################### 82 | 83 | # source ros package from entrypoint 84 | RUN sed --in-place --expression \ 85 | '$isource "$ROS_WS/install/setup.bash"' \ 86 | /ros_entrypoint.sh 87 | 88 | # run ros package launch file 89 | CMD ["ros2", "launch", "isaac_ros_oakd", "isaac_ros_oakd.launch.py"] 90 | -------------------------------------------------------------------------------- /isaac_ros_runner/installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | 22 | bold=`tput bold` 23 | red=`tput setaf 1` 24 | green=`tput setaf 2` 25 | yellow=`tput setaf 3` 26 | reset=`tput sgr0` 27 | 28 | usage() 29 | { 30 | if [ "$1" != "" ]; then 31 | echo "${red}$1${reset}" >&2 32 | fi 33 | 34 | local name=$(basename ${0}) 35 | echo "nanosaur-jetson-runner installer." >&2 36 | echo "" >&2 37 | echo "Options:" >&2 38 | echo " -h|--help | This help" >&2 39 | echo " -y | Run this script silent" >&2 40 | } 41 | 42 | main() 43 | { 44 | local PLATFORM="$(uname -m)" 45 | # Check if is running on NVIDIA Jetson platform 46 | if [[ $PLATFORM != "aarch64" ]]; then 47 | echo "${red}Run this script only on ${bold}${green}NVIDIA${reset}${red} Jetson platform${reset}" 48 | exit 33 49 | fi 50 | 51 | local SILENT=false 52 | # Decode all information from startup 53 | while [ -n "$1" ]; do 54 | case "$1" in 55 | -h|--help) # Load help 56 | usage 57 | exit 0 58 | ;; 59 | -y) 60 | SILENT=true 61 | ;; 62 | *) 63 | usage "[ERROR] Unknown option: $1" >&2 64 | exit 1 65 | ;; 66 | esac 67 | shift 1 68 | done 69 | 70 | while ! $SILENT; do 71 | read -p "Do you wish to install isaac-ros-jetson-runner? [Y/n] " yn 72 | case $yn in 73 | [Yy]* ) # Break and install jetson_stats 74 | break;; 75 | [Nn]* ) exit;; 76 | * ) echo "Please answer yes or no.";; 77 | esac 78 | done 79 | 80 | # Setup enviroment 81 | if [ ! -f .env ] ; then 82 | touch .env 83 | echo "GITHUB_ACTIONS_RUNNER_NAME=$HOSTNAME" >> .env 84 | read -p "Enter GitHub Action token: " TOKEN 85 | echo "GITHUB_ACTIONS_ACCESS_TOKEN=$TOKEN" >> .env 86 | fi 87 | 88 | if ! getent group docker | grep -q "\b$USER\b" ; then 89 | echo " - Add docker permissions to ${bold}${green}user=$USER${reset}" 90 | sudo usermod -aG docker $USER 91 | fi 92 | 93 | # Check if is installed docker-compose 94 | if ! command -v docker-compose &> /dev/null ; then 95 | echo " - ${bold}${green}Install docker-compose${reset}" 96 | sudo apt-get install -y libffi-dev python-openssl libssl-dev 97 | sudo -H pip3 install -U pip 98 | sudo pip3 install -U docker-compose 99 | fi 100 | } 101 | 102 | main $@ 103 | #EOF -------------------------------------------------------------------------------- /02-realsense_camera/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the "Software"), 5 | # to deal in the Software without restriction, including without limitation 6 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | # and/or sell copies of the Software, and to permit persons to whom the 8 | # Software is furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | # DEALINGS IN THE SOFTWARE. 20 | 21 | # Start from Isaac ROS base 22 | ARG BASE_IMAGE="rbonghi/isaac-ros-tutorial:isaac-ros-base" 23 | FROM ${BASE_IMAGE} 24 | 25 | ################ INSTALL REALSENSE ####################### 26 | 27 | # Install Realsense 28 | RUN apt-get update && \ 29 | apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || \ 30 | apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE && \ 31 | add-apt-repository -y "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u && \ 32 | apt-get install -y rsync librealsense2-utils librealsense2-dev && \ 33 | rm -rf /var/lib/apt/lists/* 34 | 35 | # Install ros2 realsense pkg 36 | RUN mkdir -p /opt/ros/foxy/src && \ 37 | cd /opt/ros/foxy/src && \ 38 | git clone --depth 1 --branch `git ls-remote --tags https://github.com/IntelRealSense/realsense-ros.git | grep -Po "(?<=tags/)3.\d+\.\d+" | sort -V | tail -1` https://github.com/IntelRealSense/realsense-ros.git && \ 39 | . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 40 | cd /opt/ros/foxy && \ 41 | colcon build --merge-install --packages-up-to realsense2_camera realsense2_description && \ 42 | rm -Rf src logs build 43 | 44 | ################ BUILD & INSTALL ISAAC ROS packages #################### 45 | 46 | # Build Isaac ROS package 47 | ENV ISAAC_ROS_WS /opt/isaac_ros_ws 48 | ARG ROSINSTALL=realsense_camera.rosinstall 49 | # Copy wstool rosinstall 50 | COPY ${ROSINSTALL} ${ROSINSTALL} 51 | 52 | RUN mkdir -p ${ISAAC_ROS_WS}/src && \ 53 | vcs import ${ISAAC_ROS_WS}/src < ${ROSINSTALL} 54 | # Pull LFS files 55 | RUN cd ${ISAAC_ROS_WS}/src/isaac_ros_common && git lfs pull && \ 56 | cd ${ISAAC_ROS_WS}/src/isaac_ros_image_pipeline && git lfs pull && \ 57 | cd ${ISAAC_ROS_WS}/src/isaac_ros_visual_slam && git lfs pull 58 | 59 | # Change workdir 60 | WORKDIR $ISAAC_ROS_WS 61 | 62 | # Build Isaac ROS 63 | RUN . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 64 | colcon build --symlink-install \ 65 | --cmake-args \ 66 | -DCMAKE_BUILD_TYPE=Release 67 | 68 | ################ PROJECT PKG ############################### 69 | 70 | # Download and build ros workspace 71 | ENV ROS_WS /opt/ros_ws 72 | RUN mkdir -p ${ROS_WS}/src 73 | 74 | ADD isaac_ros_realsense $ROS_WS/src/isaac_ros_realsense 75 | 76 | # Change workdir 77 | WORKDIR $ROS_WS 78 | 79 | # Build Isaac ROS 80 | RUN . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 81 | . $ISAAC_ROS_WS/install/setup.sh && \ 82 | colcon build --symlink-install \ 83 | --cmake-args \ 84 | -DCMAKE_BUILD_TYPE=Release 85 | 86 | ################ Final enviroment setup #################### 87 | 88 | # source ros package from entrypoint 89 | RUN sed --in-place --expression \ 90 | '$isource "$ROS_WS/install/setup.bash"' \ 91 | /ros_entrypoint.sh 92 | 93 | # run ros package launch file 94 | CMD ["ros2", "launch", "isaac_ros_realsense", "isaac_ros_realsense.launch.py"] -------------------------------------------------------------------------------- /.github/workflows/docker-builder.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: [push, workflow_dispatch] 4 | 5 | # https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency 6 | concurrency: 7 | group: ${{ github.ref }} 8 | cancel-in-progress: true 9 | 10 | jobs: 11 | matrix-builder: 12 | runs-on: ubuntu-latest 13 | outputs: 14 | matrix: ${{ steps.set-matrix.outputs.matrix }} 15 | steps: 16 | - name: Checkout code 17 | uses: actions/checkout@v3 18 | - name: Extract matrix 19 | id: set-matrix 20 | run: | 21 | TERM=xterm bash .github/ci_builder.sh 22 | echo "::set-output name=matrix::$(cat matrix.json)" 23 | 24 | isaac-ros-base: 25 | runs-on: self-hosted 26 | steps: 27 | - name: Extract tag name 28 | id: extract_tag 29 | shell: bash 30 | run: | 31 | if ${{ startsWith(github.ref, 'refs/tags/') }} ; then 32 | echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} 33 | else 34 | echo ::set-output name=tag::${GITHUB_REF/refs\/heads\//} 35 | fi 36 | - name: Checkout code 37 | uses: actions/checkout@v3 38 | - name: Docker info 39 | shell: bash 40 | run: docker info 41 | - name: "Build docker 00-isaac_ros_base" 42 | run: | 43 | echo "run 00-isaac_ros_base" 44 | TERM=xterm bash scripts/build_docker.sh 00-isaac_ros_base -ci 45 | - name: Login to DockerHub 46 | uses: docker/login-action@v2.0.0 47 | with: 48 | username: ${{ secrets.DOCKERHUB_USERNAME }} 49 | password: ${{ secrets.DOCKERHUB_TOKEN }} 50 | - name: Push Docker 51 | shell: bash 52 | id: docker_push 53 | run: | 54 | BRANCH_NAME=${{ steps.extract_tag.outputs.tag }} 55 | TERM=xterm bash scripts/build_docker.sh 00-isaac_ros_base --push --branch $BRANCH_NAME 56 | - name: Push Latest Docker 57 | if: startsWith(github.ref, 'refs/tags/') 58 | shell: bash 59 | run: | 60 | BRANCH_NAME=${{ steps.extract_tag.outputs.tag }} 61 | TERM=xterm bash scripts/build_docker.sh 00-isaac_ros_base --push --branch $BRANCH_NAME --latest 62 | 63 | isaac-ros-tutorial: 64 | needs: [matrix-builder, isaac-ros-base] 65 | runs-on: self-hosted 66 | strategy: 67 | matrix: ${{fromJson(needs.matrix-builder.outputs.matrix)}} #variable: project 68 | steps: 69 | - name: Extract tag name 70 | id: extract_tag 71 | shell: bash 72 | run: | 73 | if ${{ startsWith(github.ref, 'refs/tags/') }} ; then 74 | echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} 75 | else 76 | echo ::set-output name=tag::${GITHUB_REF/refs\/heads\//} 77 | fi 78 | - name: Checkout code 79 | uses: actions/checkout@v3 80 | - name: Docker info 81 | shell: bash 82 | run: docker info 83 | - name: "Build docker ${{ matrix.project }}" 84 | run: | 85 | echo "run ${{ matrix.project }}" 86 | TERM=xterm bash scripts/build_docker.sh ${{ matrix.project }} -ci 87 | - name: Login to DockerHub 88 | uses: docker/login-action@v2.0.0 89 | with: 90 | username: ${{ secrets.DOCKERHUB_USERNAME }} 91 | password: ${{ secrets.DOCKERHUB_TOKEN }} 92 | - name: Push Docker 93 | shell: bash 94 | id: docker_push 95 | run: | 96 | BRANCH_NAME=${{ steps.extract_tag.outputs.tag }} 97 | TERM=xterm bash scripts/build_docker.sh ${{ matrix.project }} --push --branch $BRANCH_NAME 98 | - name: Push Latest Docker 99 | if: startsWith(github.ref, 'refs/tags/') 100 | shell: bash 101 | run: | 102 | BRANCH_NAME=${{ steps.extract_tag.outputs.tag }} 103 | TERM=xterm bash scripts/build_docker.sh ${{ matrix.project }} --push --branch $BRANCH_NAME --latest 104 | 105 | make_release: 106 | name: Upload release 107 | if: startsWith(github.ref, 'refs/tags/') 108 | runs-on: ubuntu-latest 109 | needs: [isaac-ros-tutorial] 110 | steps: 111 | - name: Extract tag name 112 | id: extract_tag 113 | shell: bash 114 | run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} 115 | - name: Release # https://github.com/softprops/action-gh-release 116 | uses: softprops/action-gh-release@v1 117 | with: 118 | token: ${{ secrets.GITHUB_TOKEN }} 119 | tag_name: ${{ github.ref }} 120 | name: Release ${{ steps.extract_tag.outputs.tag }} 121 | generate_release_notes: true 122 | draft: false 123 | prerelease: false -------------------------------------------------------------------------------- /03-zed_camera/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the "Software"), 5 | # to deal in the Software without restriction, including without limitation 6 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | # and/or sell copies of the Software, and to permit persons to whom the 8 | # Software is furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | # DEALINGS IN THE SOFTWARE. 20 | 21 | # Start from Isaac ROS base 22 | ARG BASE_IMAGE="rbonghi/isaac-ros-tutorial:isaac-ros-base" 23 | FROM ${BASE_IMAGE} 24 | # ZED version 25 | ARG ZED_SDK_MAJOR=3 26 | ARG ZED_SDK_MINOR=7 27 | 28 | ################ INSTALL ZED Camera drivers ################################# 29 | 30 | #This environment variable is needed to use the streaming features on Jetson inside a container 31 | # install options: silent, runtime_only, skip_tools, skip_od_module, skip_python 32 | # Example link: https://download.stereolabs.com/zedsdk/3.7/l4t32.7/jetsons 33 | ENV LOGNAME root 34 | RUN apt-get update -y && \ 35 | apt-get install --no-install-recommends lsb-release wget less udev sudo apt-transport-https build-essential cmake -y && \ 36 | echo "# R32 (release), REVISION: ${L4T_MINOR_VERSION}" > /etc/nv_tegra_release && \ 37 | wget -q --no-check-certificate -O ZED_SDK_Linux_JP.run https://download.stereolabs.com/zedsdk/${ZED_SDK_MAJOR}.${ZED_SDK_MINOR}/l4t${L4T}/jetsons && \ 38 | chmod +x ZED_SDK_Linux_JP.run ; ./ZED_SDK_Linux_JP.run silent skip_tools skip_python skip_od_module && \ 39 | rm -rf /usr/local/zed/resources/* \ 40 | rm -rf ZED_SDK_Linux_JP.run && \ 41 | rm -rf /var/lib/apt/lists/* 42 | 43 | #This symbolic link is needed to use the streaming features on Jetson inside a container 44 | RUN ln -sf /usr/lib/aarch64-linux-gnu/tegra/libv4l2.so.0 /usr/lib/aarch64-linux-gnu/libv4l2.so 45 | 46 | # Download and build zed ROS2 47 | RUN mkdir -p /opt/ros/foxy/src && \ 48 | cd /opt/ros/foxy/src && \ 49 | git clone --recursive https://github.com/stereolabs/zed-ros2-wrapper.git && \ 50 | . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 51 | cd /opt/ros/foxy && \ 52 | colcon build --merge-install --cmake-args -DCMAKE_BUILD_TYPE=Release && \ 53 | rm -Rf src logs build 54 | 55 | ################ BUILD & INSTALL ISAAC ROS packages #################### 56 | 57 | # Build Isaac ROS package 58 | ENV ISAAC_ROS_WS /opt/isaac_ros_ws 59 | ARG ROSINSTALL=zed_camera.rosinstall 60 | # Copy wstool rosinstall 61 | COPY ${ROSINSTALL} ${ROSINSTALL} 62 | 63 | RUN apt-get update && \ 64 | apt-get install python3-vcstool python3-pip -y && \ 65 | mkdir -p ${ISAAC_ROS_WS}/src && \ 66 | vcs import ${ISAAC_ROS_WS}/src < ${ROSINSTALL} 67 | # Pull LFS files 68 | RUN cd ${ISAAC_ROS_WS}/src/isaac_ros_common && git lfs pull && \ 69 | cd ${ISAAC_ROS_WS}/src/isaac_ros_image_pipeline && git lfs pull && \ 70 | cd ${ISAAC_ROS_WS}/src/isaac_ros_visual_slam && git lfs pull 71 | 72 | # Change workdir 73 | WORKDIR $ISAAC_ROS_WS 74 | 75 | # Build Isaac ROS 76 | RUN . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 77 | colcon build --symlink-install \ 78 | --cmake-args \ 79 | -DCMAKE_BUILD_TYPE=Release 80 | 81 | ################ PROJECT PKG ############################### 82 | 83 | # Download and build ros workspace 84 | ENV ROS_WS /opt/ros_ws 85 | RUN mkdir -p ${ROS_WS}/src 86 | 87 | # Download and build ros workspace 88 | ADD isaac_ros_zed $ROS_WS/src/isaac_ros_zed 89 | 90 | # Change workdir 91 | WORKDIR $ROS_WS 92 | 93 | # Build Isaac ROS 94 | RUN . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 95 | . $ISAAC_ROS_WS/install/setup.sh && \ 96 | colcon build --symlink-install \ 97 | --cmake-args \ 98 | -DCMAKE_BUILD_TYPE=Release 99 | 100 | ################ Final enviroment setup #################### 101 | 102 | # source ros package from entrypoint 103 | RUN sed --in-place --expression \ 104 | '$isource "$ROS_WS/install/setup.bash"' \ 105 | /ros_entrypoint.sh 106 | 107 | # run ros package launch file 108 | CMD ["ros2", "launch", "isaac_ros_zed", "isaac_ros_zed.launch.py"] 109 | -------------------------------------------------------------------------------- /02-realsense_camera/isaac_ros_realsense/launch/isaac_ros_realsense.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the "Software"), 5 | # to deal in the Software without restriction, including without limitation 6 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | # and/or sell copies of the Software, and to permit persons to whom the 8 | # Software is furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | # DEALINGS IN THE SOFTWARE. 20 | 21 | import os 22 | import launch 23 | from launch_ros.actions import ComposableNodeContainer, Node 24 | from launch_ros.descriptions import ComposableNode 25 | from ament_index_python.packages import get_package_share_directory 26 | 27 | import xacro 28 | import tempfile 29 | 30 | def to_urdf(xacro_path, parameters=None): 31 | """Convert the given xacro file to URDF file. 32 | * xacro_path -- the path to the xacro file 33 | * parameters -- to be used when xacro file is parsed. 34 | """ 35 | urdf_path = tempfile.mktemp(prefix="%s_" % os.path.basename(xacro_path)) 36 | 37 | # open and process file 38 | doc = xacro.process_file(xacro_path, mappings=parameters) 39 | # open the output file 40 | out = xacro.open_output(urdf_path) 41 | out.write(doc.toprettyxml(indent=' ')) 42 | 43 | return urdf_path 44 | 45 | def generate_launch_description(): 46 | """Launch file which brings up visual odometry node configured for RealSense.""" 47 | realsense_camera_node = Node( 48 | package='realsense2_camera', 49 | node_executable='realsense2_camera_node', 50 | namespace='camera', 51 | parameters=[{ 52 | 'infra_height': 360, 53 | 'infra_width': 640, 54 | 'enable_color': False, 55 | 'enable_depth': False, 56 | 'stereo_module.emitter_enabled': 2, #https://github.com/IntelRealSense/realsense-ros/issues/817 57 | 'infra_fps': 90.0, 58 | 'unite_imu_method': 'linear_interpolation' # copy | linear_interpolation 59 | }], 60 | ) 61 | 62 | visual_slam_node = ComposableNode( 63 | name='visual_slam_node', 64 | package='isaac_ros_visual_slam', 65 | namespace='camera', 66 | plugin='isaac_ros::visual_slam::VisualSlamNode', 67 | parameters=[{ 68 | 'enable_rectified_pose': False, 69 | 'denoise_input_images': False, 70 | 'rectified_images': True, 71 | 'enable_debug_mode': False, 72 | 'debug_dump_path': '/tmp/elbrus', 73 | 'enable_slam_visualization': True, 74 | 'enable_landmarks_view': True, 75 | 'enable_observations_view': True, 76 | 'enable_imu': True, 77 | 'map_frame': 'map', 78 | 'odom_frame': 'odom', 79 | 'base_frame': 'base_link', 80 | 'input_imu_frame': 'camera_imu_optical_frame', 81 | 'input_left_camera_frame': 'camera_infra1_frame', 82 | 'input_right_camera_frame': 'camera_infra2_frame' 83 | }], 84 | remappings=[('stereo_camera/left/image', 'infra1/image_rect_raw'), 85 | ('stereo_camera/left/camera_info', 'infra1/camera_info'), 86 | ('stereo_camera/right/image', 'infra2/image_rect_raw'), 87 | ('stereo_camera/right/camera_info', 'infra2/camera_info'), 88 | ('visual_slam/imu', 'imu')] 89 | ) 90 | 91 | vslam_launch_container = ComposableNodeContainer( 92 | name='vslam_launch_container', 93 | namespace='camera', 94 | package='rclcpp_components', 95 | executable='component_container', 96 | composable_node_descriptions=[ 97 | visual_slam_node 98 | ], 99 | output='screen' 100 | ) 101 | 102 | xacro_path = os.path.join(get_package_share_directory('realsense2_description'), 'urdf', 'test_d435i_camera.urdf.xacro') 103 | urdf = to_urdf(xacro_path, {'use_nominal_extrinsics' : 'true', 'add_plug' : 'true'}) 104 | 105 | model_node = Node( 106 | node_name='model_node', 107 | package='robot_state_publisher', 108 | executable='robot_state_publisher', 109 | namespace='', 110 | output='screen', 111 | arguments = [urdf] 112 | ) 113 | 114 | return launch.LaunchDescription([vslam_launch_container, realsense_camera_node, model_node]) -------------------------------------------------------------------------------- /00-isaac_ros_base/Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the "Software"), 5 | # to deal in the Software without restriction, including without limitation 6 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | # and/or sell copies of the Software, and to permit persons to whom the 8 | # Software is furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | # DEALINGS IN THE SOFTWARE. 20 | 21 | # Jetpack 4.6.1 22 | # Docker file for aarch64 based Jetson device 23 | FROM dustynv/ros:foxy-ros-base-l4t-r32.7.1 24 | # L4T variables 25 | ENV L4T=32.7 26 | ENV L4T_MINOR_VERSION=7.1 27 | # Configuration CUDA 28 | ENV CUDA=10.2 29 | 30 | # Disable terminal interaction for apt 31 | ENV DEBIAN_FRONTEND=noninteractive 32 | 33 | # Install OpenCV dependencies 34 | RUN apt-get update && apt-get install -y \ 35 | libavformat-dev \ 36 | libjpeg-dev \ 37 | libopenjp2-7-dev \ 38 | libpng-dev \ 39 | libpq-dev \ 40 | libswscale-dev \ 41 | libtbb2 \ 42 | libtbb-dev \ 43 | libtiff-dev \ 44 | pkg-config \ 45 | yasm && \ 46 | rm -rf /var/lib/apt/lists/* 47 | 48 | # Install additional packages needed for ROS2 dependencies 49 | RUN apt-get update && apt-get install -y \ 50 | python3-distutils \ 51 | libboost-all-dev \ 52 | libboost-dev \ 53 | libpcl-dev \ 54 | libode-dev \ 55 | lcov \ 56 | python3-zmq \ 57 | libxaw7-dev \ 58 | libgraphicsmagick++1-dev \ 59 | graphicsmagick-libmagick-dev-compat \ 60 | libceres-dev \ 61 | libsuitesparse-dev \ 62 | libncurses5-dev \ 63 | libassimp-dev \ 64 | libyaml-cpp-dev \ 65 | libpcap-dev && \ 66 | rm -rf /var/lib/apt/lists/* 67 | 68 | # Install Git-LFS and other packages 69 | RUN apt-get update && apt-get install -y \ 70 | git-lfs \ 71 | software-properties-common && \ 72 | rm -rf /var/lib/apt/lists/* 73 | 74 | # Fix cuda info 75 | ARG DPKG_STATUS 76 | # Add nvidia repo/public key and install VPI libraries 77 | RUN echo "$DPKG_STATUS" >> /var/lib/dpkg/status && \ 78 | curl https://repo.download.nvidia.com/jetson/jetson-ota-public.asc > /etc/apt/trusted.gpg.d/jetson-ota-public.asc && \ 79 | echo "deb https://repo.download.nvidia.com/jetson/common r${L4T} main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list && \ 80 | apt-get update && apt-get install -y libnvvpi1 vpi1-dev && \ 81 | rm -rf /var/lib/apt/lists/* 82 | 83 | # Update environment 84 | ENV LD_LIBRARY_PATH="/opt/nvidia/vpi1/lib64:${LD_LIBRARY_PATH}" 85 | ENV LD_LIBRARY_PATH="/usr/lib/aarch64-linux-gnu/tegra:${LD_LIBRARY_PATH}" 86 | ENV LD_LIBRARY_PATH="/usr/local/cuda-${CUDA}/targets/aarch64-linux/lib:${LD_LIBRARY_PATH}" 87 | ENV LD_LIBRARY_PATH="/usr/lib/aarch64-linux-gnu/tegra-egl:${LD_LIBRARY_PATH}" 88 | 89 | # Install pcl_conversions & sensor_msgs_py 90 | ARG ROSINSTALL=isaac_ros_base.rosinstall 91 | # Copy wstool rosinstall 92 | COPY ${ROSINSTALL} ${ROSINSTALL} 93 | 94 | # Fix image transport to v3.0.0 95 | # https://github.com/stereolabs/zed-ros2-wrapper/issues/66 96 | RUN apt-get update && \ 97 | apt-get install python3-vcstool python3-pip -y && \ 98 | mkdir -p ${ROS_ROOT}/src && \ 99 | vcs import ${ROS_ROOT}/src < ${ROSINSTALL} && \ 100 | rm -rf /var/lib/apt/lists/* 101 | RUN . /opt/ros/$ROS_DISTRO/install/setup.sh && \ 102 | cd ${ROS_ROOT} && \ 103 | rosdep install -y --ignore-src --from-paths src --rosdistro foxy && \ 104 | colcon build --merge-install --packages-up-to pcl_conversions sensor_msgs_py diagnostic_updater xacro \ 105 | camera_calibration_parsers image_transport image_common camera_info_manager && \ 106 | rm -Rf src logs build 107 | 108 | # Install gcc8 for cross-compiled binaries from Ubuntu 20.04 109 | RUN apt-get update && \ 110 | add-apt-repository -y ppa:ubuntu-toolchain-r/test && \ 111 | apt-get install -y gcc-8 g++-8 libstdc++6 && \ 112 | update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8 && \ 113 | update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8 && \ 114 | rm -rf /usr/bin/aarch64-linux-gnu-gcc /usr/bin/aarch64-linux-gnu-g++ \ 115 | /usr/bin/aarch64-linux-gnu-g++-7 /usr/bin/aarch64-linux-gnu-gcc-7 && \ 116 | update-alternatives --install /usr/bin/aarch64-linux-gnu-gcc aarch64-linux-gnu-gcc \ 117 | /usr/bin/gcc-8 8 && \ 118 | update-alternatives --install /usr/bin/aarch64-linux-gnu-g++ aarch64-linux-gnu-g++ \ 119 | /usr/bin/g++-8 8 && \ 120 | rm -rf /var/lib/apt/lists/* 121 | 122 | ################ Final enviroment setup #################### 123 | 124 | # Restore using the default Foxy DDS middleware: FastRTPS 125 | ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp 126 | 127 | # source ros package from entrypoint 128 | RUN sed --in-place --expression \ 129 | '$isource "$ROS_ROOT/install/setup.bash"' \ 130 | /ros_entrypoint.sh 131 | 132 | # https://docs.docker.com/engine/reference/builder/#stopsignal 133 | # https://hynek.me/articles/docker-signals/ 134 | STOPSIGNAL SIGINT -------------------------------------------------------------------------------- /scripts/build_docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a 5 | # copy of this software and associated documentation files (the "Software"), 6 | # to deal in the Software without restriction, including without limitation 7 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | # and/or sell copies of the Software, and to permit persons to whom the 9 | # Software is furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in 12 | # all copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | # DEALINGS IN THE SOFTWARE. 21 | 22 | bold=`tput bold` 23 | red=`tput setaf 1` 24 | green=`tput setaf 2` 25 | yellow=`tput setaf 3` 26 | reset=`tput sgr0` 27 | 28 | # Get the entry in the dpkg status file corresponding to the provied package name 29 | # Prepend two newlines so it can be safely added to the end of any existing 30 | # dpkg/status file. 31 | get_dpkg_status() { 32 | echo -e "\n" 33 | awk '/Package: '"$1"'/,/^$/' /var/lib/dpkg/status 34 | } 35 | 36 | usage() 37 | { 38 | if [ "$1" != "" ]; then 39 | echo "${red}$1${reset}" >&2 40 | fi 41 | 42 | local name=$(basename ${0}) 43 | echo "Isaac_ros docker builder" >&2 44 | echo "" >&2 45 | echo "Commands:" >&2 46 | echo " -v | Verbose. Schow extra info " >&2 47 | echo " -ci | Build docker without cache " >&2 48 | echo " --push | Push docker. Need to be logged in " >&2 49 | echo " --latest | Tag and push latest release" >&2 50 | echo " --repo REPO_NAME | Set repository to push " >&2 51 | echo " --no-pull-base-image | Pull the base image " >&2 52 | echo " --branch BRANCH_DISTRO | Set tag from branch " >&2 53 | echo " --base-image BASE_IMAGE | Change base image to build. Default=${bold}$BASE_IMAGE_DEFAULT${reset}" >&2 54 | } 55 | 56 | main() 57 | { 58 | local PLATFORM="$(uname -m)" 59 | # Check if is running on NVIDIA Jetson platform 60 | if [[ $PLATFORM != "aarch64" ]]; then 61 | echo "${red}Run this script only on ${bold}${green}NVIDIA${reset}${red} Jetson platform${reset}" 62 | exit 33 63 | fi 64 | 65 | local REPO_NAME="rbonghi/isaac_ros_tutorial" 66 | local FOLDER=$1 67 | 68 | local PUSH=false 69 | local VERBOSE=false 70 | local CI_BUILD=false 71 | local PULL_IMAGE=true 72 | local BRANCH_DISTRO="" 73 | local LATEST=false 74 | # Base image 75 | local BASE_IMAGE="" 76 | # Decode all information from startup 77 | while [ -n "$2" ]; do 78 | case "$2" in 79 | -h|--help) # Load help 80 | usage 81 | exit 0 82 | ;; 83 | -v) 84 | VERBOSE=true 85 | ;; 86 | -ci) 87 | CI_BUILD=true 88 | ;; 89 | --repo) 90 | REPO_NAME=$3 91 | shift 1 92 | ;; 93 | --branch) 94 | BRANCH_DISTRO=$2 95 | shift 1 96 | ;; 97 | --latest) 98 | LATEST=true 99 | shift 1 100 | ;; 101 | --no-pull-base-image) 102 | PULL_IMAGE=false 103 | ;; 104 | --push) 105 | PUSH=true 106 | ;; 107 | --base-image) 108 | BASE_IMAGE=$3 109 | shift 1 110 | ;; 111 | *) 112 | usage "[ERROR] Unknown option: $2" >&2 113 | exit 1 114 | ;; 115 | esac 116 | shift 1 117 | done 118 | 119 | if [[ -z $FOLDER ]] ; then 120 | echo "${red}Please write one of the tutorial folder you want build${reset}" 121 | exit 33 122 | fi 123 | 124 | # replace all blanks 125 | REPO_NAME=${REPO_NAME//_/-} 126 | 127 | # Extract tag name 128 | local TAG=${FOLDER#*-} 129 | # Strip "/" 130 | TAG=${TAG%"/"} 131 | # replace all blanks 132 | TAG=${TAG//_/-} 133 | 134 | if ! $PUSH ; then 135 | # Extract Libraries info 136 | local DPKG_STATUS=$(get_dpkg_status cuda-cudart-10-2)$(get_dpkg_status libcufft-10-2) 137 | if $VERBOSE ; then 138 | echo "${yellow} Libraries ${reset}" 139 | echo "$DPKG_STATUS" 140 | fi 141 | 142 | local CI_OPTIONS="" 143 | if $CI_BUILD ; then 144 | # Set no-cache and pull before build 145 | # https://newbedev.com/what-s-the-purpose-of-docker-build-pull 146 | CI_OPTIONS="--no-cache" 147 | fi 148 | 149 | local PULL_OPTION="" 150 | if $PULL_IMAGE ; then 151 | PULL_OPTION="--pull" 152 | fi 153 | 154 | # move to folder 155 | cd $FOLDER 156 | if $VERBOSE ; then 157 | echo "${yellow}- Change folder: $FOLDER ${reset}" 158 | ls 159 | fi 160 | 161 | echo "- Build repo ${green}$REPO_NAME:$TAG${reset}" 162 | docker build $CI_OPTIONS $PULL_OPTION -t $REPO_NAME:$TAG --build-arg "DPKG_STATUS=$DPKG_STATUS" $BASE_IMAGE_ARG . || { echo "${red}docker build failure!${reset}"; exit 1; } 163 | 164 | if $CI_BUILD ; then 165 | echo "- ${bold}Prune${reset} old docker images" 166 | docker image prune -f 167 | fi 168 | else 169 | echo "- Push repo ${green}$REPO_NAME:$TAG${reset}" 170 | docker image push $REPO_NAME:$TAG 171 | fi 172 | } 173 | 174 | main $@ 175 | # EOF 176 | -------------------------------------------------------------------------------- /03-zed_camera/isaac_ros_zed/launch/isaac_ros_zed.launch.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. 2 | # 3 | # Permission is hereby granted, free of charge, to any person obtaining a 4 | # copy of this software and associated documentation files (the "Software"), 5 | # to deal in the Software without restriction, including without limitation 6 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, 7 | # and/or sell copies of the Software, and to permit persons to whom the 8 | # Software is furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | # DEALINGS IN THE SOFTWARE. 20 | 21 | import os 22 | import launch 23 | from launch.actions import IncludeLaunchDescription 24 | from launch.launch_description_sources import PythonLaunchDescriptionSource 25 | from launch_ros.actions import ComposableNodeContainer, Node 26 | from launch_ros.descriptions import ComposableNode 27 | from ament_index_python.packages import get_package_share_directory 28 | 29 | 30 | def generate_launch_description(): 31 | 32 | # From https://github.com/stereolabs/zed-ros2-examples/blob/master/zed_display_rviz2/launch/display_zedm.launch.py 33 | 34 | pkg_zed = get_package_share_directory('zed_wrapper') 35 | pkg_tutorial = get_package_share_directory('isaac_ros_zed') 36 | 37 | # Camera model 38 | # use: 39 | # - 'zed' for "ZED" camera 40 | # - 'zedm' for "ZED mini" camera 41 | # - 'zed2' for "ZED2" camera 42 | # - 'zed2i' for "ZED2i" camera 43 | camera_model = 'zedm' 44 | camera_name = camera_model 45 | 46 | publish_urdf = 'true' # Publish static frames from camera URDF 47 | 48 | # Robot base frame. Note: overrides the parameter `pos_tracking.base_frame` in `common.yaml`. 49 | base_frame = 'base_link' 50 | # Position X of the camera with respect to the base frame [m]. 51 | cam_pos_x = '0.0' 52 | # Position Y of the camera with respect to the base frame [m]. 53 | cam_pos_y = '0.0' 54 | # Position Z of the camera with respect to the base frame [m]. 55 | cam_pos_z = '0.0' 56 | # Roll orientation of the camera with respect to the base frame [rad]. 57 | cam_roll = '0.0' 58 | # Pitch orientation of the camera with respect to the base frame [rad]. 59 | cam_pitch = '0.0' 60 | # Yaw orientation of the camera with respect to the base frame [rad]. 61 | cam_yaw = '0.0' 62 | 63 | # ZED Configurations from local config 64 | config_common_path = os.path.join(pkg_tutorial, 'config', 'common.yaml') 65 | 66 | if(camera_model != 'zed'): 67 | config_camera_path = os.path.join(pkg_zed, 'config', camera_model + '.yaml') 68 | else: 69 | config_camera_path = '' 70 | 71 | # URDF/xacro file to be loaded by the Robot State Publisher node 72 | xacro_path = os.path.join(pkg_zed, 'urdf', 'zed_descr.urdf.xacro') 73 | 74 | # ZED Wrapper node 75 | zed_wrapper_launch = IncludeLaunchDescription( 76 | launch_description_source=PythonLaunchDescriptionSource([ 77 | get_package_share_directory('zed_wrapper'), 78 | '/launch/include/zed_camera.launch.py' 79 | ]), 80 | launch_arguments={ 81 | 'camera_model': camera_model, 82 | 'camera_name': camera_name, 83 | 'node_name': 'zed_node', 84 | 'config_common_path': config_common_path, 85 | 'config_camera_path': config_camera_path, 86 | 'publish_urdf': publish_urdf, 87 | 'xacro_path': xacro_path, 88 | 'svo_path': '', 89 | 'base_frame': base_frame, 90 | 'cam_pos_x': cam_pos_x, 91 | 'cam_pos_y': cam_pos_y, 92 | 'cam_pos_z': cam_pos_z, 93 | 'cam_roll': cam_roll, 94 | 'cam_pitch': cam_pitch, 95 | 'cam_yaw': cam_yaw 96 | }.items() 97 | ) 98 | 99 | visual_slam_node = ComposableNode( 100 | name='visual_slam_node', 101 | package='isaac_ros_visual_slam', 102 | namespace='camera', 103 | plugin='isaac_ros::visual_slam::VisualSlamNode', 104 | parameters=[{ 105 | 'enable_rectified_pose': False, 106 | 'denoise_input_images': False, 107 | 'rectified_images': True, 108 | 'enable_debug_mode': False, 109 | 'debug_dump_path': '/tmp/elbrus', 110 | 'enable_slam_visualization': True, 111 | 'enable_landmarks_view': True, 112 | 'enable_observations_view': True, 113 | 'enable_imu': True, 114 | 'map_frame': 'map', 115 | 'odom_frame': 'odom', 116 | 'base_frame': 'base_link', 117 | 'input_imu_frame': f"{camera_name}_imu_link", 118 | 'input_left_camera_frame': f"{camera_name}_left_camera_frame", 119 | 'input_right_camera_frame': f"{camera_name}_right_camera_frame" 120 | }], 121 | remappings=[('stereo_camera/left/image', f"/{camera_name}/zed_node/left/image_rect_gray"), 122 | ('stereo_camera/left/camera_info', f"/{camera_name}/zed_node/left/camera_info"), 123 | ('stereo_camera/right/image', f"/{camera_name}/zed_node/right/image_rect_gray"), 124 | ('stereo_camera/right/camera_info', f"/{camera_name}/zed_node/right/camera_info"), 125 | ('visual_slam/imu', f"/{camera_name}/zed_node/imu/data")] 126 | ) 127 | 128 | vslam_launch_container = ComposableNodeContainer( 129 | name='vslam_launch_container', 130 | namespace='camera', 131 | package='rclcpp_components', 132 | executable='component_container', 133 | composable_node_descriptions=[ 134 | visual_slam_node 135 | ], 136 | output='screen' 137 | ) 138 | 139 | return launch.LaunchDescription([zed_wrapper_launch, vslam_launch_container]) 140 | -------------------------------------------------------------------------------- /remote_viewer/remote_view_zed.rviz: -------------------------------------------------------------------------------- 1 | Panels: 2 | - Class: rviz_common/Displays 3 | Help Height: 78 4 | Name: Displays 5 | Property Tree Widget: 6 | Expanded: 7 | - /Global Options1 8 | - /Status1 9 | - /RobotModel1 10 | - /TF1 11 | Splitter Ratio: 0.5 12 | Tree Height: 747 13 | - Class: rviz_common/Selection 14 | Name: Selection 15 | - Class: rviz_common/Tool Properties 16 | Expanded: 17 | - /2D Goal Pose1 18 | - /Publish Point1 19 | Name: Tool Properties 20 | Splitter Ratio: 0.5886790156364441 21 | - Class: rviz_common/Views 22 | Expanded: 23 | - /Current View1 24 | Name: Views 25 | Splitter Ratio: 0.5 26 | Visualization Manager: 27 | Class: "" 28 | Displays: 29 | - Alpha: 0.5 30 | Cell Size: 1 31 | Class: rviz_default_plugins/Grid 32 | Color: 160; 160; 164 33 | Enabled: true 34 | Line Style: 35 | Line Width: 0.029999999329447746 36 | Value: Lines 37 | Name: Grid 38 | Normal Cell Count: 0 39 | Offset: 40 | X: 0 41 | Y: 0 42 | Z: 0 43 | Plane: XY 44 | Plane Cell Count: 10 45 | Reference Frame: 46 | Value: true 47 | - Alpha: 1 48 | Class: rviz_default_plugins/RobotModel 49 | Collision Enabled: false 50 | Description File: "" 51 | Description Source: Topic 52 | Description Topic: 53 | Depth: 5 54 | Durability Policy: Volatile 55 | History Policy: Keep Last 56 | Reliability Policy: Reliable 57 | Value: /zedm/robot_description 58 | Enabled: true 59 | Links: 60 | All Links Enabled: true 61 | Expand Joint Details: false 62 | Expand Link Details: false 63 | Expand Tree: false 64 | Link Tree Style: Links in Alphabetic Order 65 | base_link: 66 | Alpha: 1 67 | Show Axes: false 68 | Show Trail: false 69 | zedm_base_link: 70 | Alpha: 1 71 | Show Axes: false 72 | Show Trail: false 73 | zedm_camera_center: 74 | Alpha: 1 75 | Show Axes: false 76 | Show Trail: false 77 | Value: true 78 | zedm_left_camera_frame: 79 | Alpha: 1 80 | Show Axes: false 81 | Show Trail: false 82 | zedm_left_camera_optical_frame: 83 | Alpha: 1 84 | Show Axes: false 85 | Show Trail: false 86 | zedm_right_camera_frame: 87 | Alpha: 1 88 | Show Axes: false 89 | Show Trail: false 90 | zedm_right_camera_optical_frame: 91 | Alpha: 1 92 | Show Axes: false 93 | Show Trail: false 94 | Name: RobotModel 95 | TF Prefix: "" 96 | Update Interval: 0 97 | Value: true 98 | Visual Enabled: true 99 | - Class: rviz_default_plugins/TF 100 | Enabled: true 101 | Frame Timeout: 15 102 | Frames: 103 | All Enabled: true 104 | base_link: 105 | Value: true 106 | base_link_rectified: 107 | Value: true 108 | odom: 109 | Value: true 110 | zedm_base_link: 111 | Value: true 112 | zedm_camera_center: 113 | Value: true 114 | zedm_imu_link: 115 | Value: true 116 | zedm_left_camera_frame: 117 | Value: true 118 | zedm_left_camera_optical_frame: 119 | Value: true 120 | zedm_right_camera_frame: 121 | Value: true 122 | zedm_right_camera_optical_frame: 123 | Value: true 124 | Marker Scale: 0.15000000596046448 125 | Name: TF 126 | Show Arrows: true 127 | Show Axes: true 128 | Show Names: false 129 | Tree: 130 | odom: 131 | base_link: 132 | zedm_base_link: 133 | zedm_camera_center: 134 | zedm_left_camera_frame: 135 | zedm_imu_link: 136 | {} 137 | zedm_left_camera_optical_frame: 138 | {} 139 | zedm_right_camera_frame: 140 | zedm_right_camera_optical_frame: 141 | {} 142 | base_link_rectified: 143 | {} 144 | Update Interval: 0 145 | Value: true 146 | Enabled: true 147 | Global Options: 148 | Background Color: 48; 48; 48 149 | Fixed Frame: odom 150 | Frame Rate: 30 151 | Name: root 152 | Tools: 153 | - Class: rviz_default_plugins/Interact 154 | Hide Inactive Objects: true 155 | - Class: rviz_default_plugins/MoveCamera 156 | - Class: rviz_default_plugins/Select 157 | - Class: rviz_default_plugins/FocusCamera 158 | - Class: rviz_default_plugins/Measure 159 | Line color: 128; 128; 0 160 | - Class: rviz_default_plugins/SetInitialPose 161 | Topic: 162 | Depth: 5 163 | Durability Policy: Volatile 164 | History Policy: Keep Last 165 | Reliability Policy: Reliable 166 | Value: /initialpose 167 | - Class: rviz_default_plugins/SetGoal 168 | Topic: 169 | Depth: 5 170 | Durability Policy: Volatile 171 | History Policy: Keep Last 172 | Reliability Policy: Reliable 173 | Value: /goal_pose 174 | - Class: rviz_default_plugins/PublishPoint 175 | Single click: true 176 | Topic: 177 | Depth: 5 178 | Durability Policy: Volatile 179 | History Policy: Keep Last 180 | Reliability Policy: Reliable 181 | Value: /clicked_point 182 | Transformation: 183 | Current: 184 | Class: rviz_default_plugins/TF 185 | Value: true 186 | Views: 187 | Current: 188 | Class: rviz_default_plugins/Orbit 189 | Distance: 1.2554429769515991 190 | Enable Stereo Rendering: 191 | Stereo Eye Separation: 0.05999999865889549 192 | Stereo Focal Distance: 1 193 | Swap Stereo Eyes: false 194 | Value: false 195 | Focal Point: 196 | X: 0 197 | Y: 0 198 | Z: 0 199 | Focal Shape Fixed Size: true 200 | Focal Shape Size: 0.05000000074505806 201 | Invert Z Axis: false 202 | Name: Current View 203 | Near Clip Distance: 0.009999999776482582 204 | Pitch: 0.7203978896141052 205 | Target Frame: 206 | Value: Orbit (rviz) 207 | Yaw: 0.6203981637954712 208 | Saved: ~ 209 | Window Geometry: 210 | Displays: 211 | collapsed: false 212 | Height: 976 213 | Hide Left Dock: false 214 | Hide Right Dock: true 215 | QMainWindow State: 000000ff00000000fd00000004000000000000015600000376fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000376000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d006100670065000000029a000001190000000000000000000000010000010f000002f4fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d000002f4000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000004250000037600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 216 | Selection: 217 | collapsed: false 218 | Tool Properties: 219 | collapsed: false 220 | Views: 221 | collapsed: true 222 | Width: 1409 223 | X: 1038 224 | Y: 494 225 | -------------------------------------------------------------------------------- /03-zed_camera/isaac_ros_zed/config/common.yaml: -------------------------------------------------------------------------------- 1 | # config/common_yaml 2 | # Common parameters to Stereolabs ZED and ZED mini cameras 3 | # 4 | # Note: the parameter svo_file is passed as exe argumet 5 | --- 6 | 7 | /**: 8 | ros__parameters: 9 | general: 10 | svo_file: '' 11 | svo_loop: true # Enable loop mode when using an SVO as input source 12 | svo_realtime: false # if true SVO will be played trying to respect the original framerate eventually skipping frames, otherwise every frame will be processed respecting the `pub_frame_rate` setting 13 | camera_timeout_sec: 5 14 | camera_max_reconnect: 5 15 | camera_flip: false 16 | zed_id: 0 17 | serial_number: 0 18 | resolution: 2 # '0': HD2K, '1': HD1080, '2': HD720, '3': VGA 19 | sdk_verbose: true 20 | grab_frame_rate: 30 # ZED SDK internal grabbing rate 21 | pub_frame_rate: 15.0 # [DYNAMIC] - frequency of publishing of visual images and depth images 22 | gpu_id: -1 23 | 24 | video: 25 | extrinsic_in_camera_frame: false # if `false` extrinsic parameter in `camera_info` will use ROS native frame (X FORWARD, Z UP) instead of the camera frame (Z FORWARD, Y DOWN) [`true` use old behavior as for version < v3.1] 26 | img_downsample_factor: 0.5 # Resample factor for image data matrices [0.01,1.0] The SDK works with native data sizes, but publishes rescaled matrices 27 | brightness: 4 # [DYNAMIC] 28 | contrast: 4 # [DYNAMIC] 29 | hue: 0 # [DYNAMIC] 30 | saturation: 4 # [DYNAMIC] 31 | sharpness: 4 # [DYNAMIC] 32 | gamma: 8 # [DYNAMIC] - Requires SDK >=v3.1 33 | auto_exposure_gain: true # [DYNAMIC] 34 | exposure: 80 # [DYNAMIC] 35 | gain: 80 # [DYNAMIC] 36 | auto_whitebalance: true # [DYNAMIC] 37 | whitebalance_temperature: 42 # [DYNAMIC] - [28,65] works only if `auto_whitebalance` is false 38 | qos_history: 1 # '1': KEEP_LAST - '2': KEEP_ALL 39 | qos_depth: 1 # Queue size if using KEEP_LAST 40 | qos_reliability: 1 # '1': RELIABLE - '2': BEST_EFFORT - 41 | qos_durability: 2 # '1': TRANSIENT_LOCAL - '2': VOLATILE 42 | 43 | depth: 44 | quality: 1 # '0': NONE, '1': PERFORMANCE, '2': QUALITY, '3': ULTRA - Note: if '0' all the modules that requires depth extraction are disabled by default (Pos. Tracking, Obj. Detection, Mapping, ...) 45 | sensing_mode: 0 # '0': STANDARD, '1': FILL 46 | depth_stabilization: true # Forces positional tracking to start if 'true' 47 | openni_depth_mode: false # 'false': 32bit float [meters], 'true': 16bit unsigned int [millimeters] 48 | depth_downsample_factor: 0.5 # Resample factor for depth data matrices [0.01,1.0] The SDK works with native data sizes, but publishes rescaled matrices (depth map, point cloud, ...) 49 | point_cloud_freq: 10.0 # [DYNAMIC] - frequency of the pointcloud publishing (equal or less to `grab_frame_rate` value) 50 | depth_confidence: 50 # [DYNAMIC] 51 | depth_texture_conf: 100 # [DYNAMIC] 52 | qos_history: 1 # '1': KEEP_LAST - '2': KEEP_ALL 53 | qos_depth: 1 # Queue size if using KEEP_LAST 54 | qos_reliability: 1 # '1': RELIABLE - '2': BEST_EFFORT - 55 | qos_durability: 2 # '1': TRANSIENT_LOCAL - '2': VOLATILE 56 | 57 | pos_tracking: 58 | pos_tracking_enabled: false # True to enable positional tracking from start 59 | publish_tf: false # publish `odom -> base_link` TF 60 | publish_map_tf: false # publish `map -> odom` TF 61 | base_frame: 'base_link' # use the same name as in the URDF file 62 | map_frame: 'map' 63 | odometry_frame: 'odom' 64 | area_memory_db_path: '' 65 | area_memory: true # Enable to detect loop closure 66 | floor_alignment: false # Enable to automatically calculate camera/floor offset 67 | initial_base_pose: [0.0,0.0,0.0, 0.0,0.0,0.0] # Initial position of the `base_frame` -> [X, Y, Z, R, P, Y] 68 | init_odom_with_first_valid_pose: true # Enable to initialize the odometry with the first valid pose 69 | path_pub_rate: 2.0 # [DYNAMIC] - Camera trajectory publishing frequency 70 | path_max_count: -1 # use '-1' for unlimited path size 71 | two_d_mode: false # Force navigation on a plane. If true the Z value will be fixed to "fixed_z_value", roll and pitch to zero 72 | fixed_z_value: 0.00 # Value to be used for Z coordinate if `two_d_mode` is true 73 | qos_history: 1 # '1': KEEP_LAST - '2': KEEP_ALL 74 | qos_depth: 1 # Queue size if using KEEP_LAST 75 | qos_reliability: 1 # '1': RELIABLE - '2': BEST_EFFORT - 76 | qos_durability: 2 # '1': TRANSIENT_LOCAL - '2': VOLATILE 77 | 78 | mapping: 79 | mapping_enabled: false # True to enable mapping and fused point cloud pubblication 80 | resolution: 0.1 # maps resolution in meters [0.01f, 0.2f] 81 | max_mapping_range: 20.0 # maximum depth range while mapping in meters (-1 for automatic calculation) [2.0, 20.0] 82 | fused_pointcloud_freq: 0.5 # frequency of the publishing of the fused colored point cloud 83 | qos_history: 1 # '1': KEEP_LAST - '2': KEEP_ALL 84 | qos_depth: 1 # Queue size if using KEEP_LAST 85 | qos_reliability: 1 # '1': RELIABLE - '2': BEST_EFFORT - 86 | qos_durability: 2 # '1': TRANSIENT_LOCAL - '2': VOLATILE 87 | 88 | debug: 89 | debug_general: false 90 | debug_sensors: false -------------------------------------------------------------------------------- /remote_viewer/remote_view.rviz: -------------------------------------------------------------------------------- 1 | Panels: 2 | - Class: rviz_common/Displays 3 | Help Height: 78 4 | Name: Displays 5 | Property Tree Widget: 6 | Expanded: 7 | - /Global Options1 8 | - /Status1 9 | - /RobotModel1 10 | - /TF1 11 | Splitter Ratio: 0.5 12 | Tree Height: 747 13 | - Class: rviz_common/Selection 14 | Name: Selection 15 | - Class: rviz_common/Tool Properties 16 | Expanded: 17 | - /2D Goal Pose1 18 | - /Publish Point1 19 | Name: Tool Properties 20 | Splitter Ratio: 0.5886790156364441 21 | - Class: rviz_common/Views 22 | Expanded: 23 | - /Current View1 24 | Name: Views 25 | Splitter Ratio: 0.5 26 | Visualization Manager: 27 | Class: "" 28 | Displays: 29 | - Alpha: 0.5 30 | Cell Size: 1 31 | Class: rviz_default_plugins/Grid 32 | Color: 160; 160; 164 33 | Enabled: true 34 | Line Style: 35 | Line Width: 0.029999999329447746 36 | Value: Lines 37 | Name: Grid 38 | Normal Cell Count: 0 39 | Offset: 40 | X: 0 41 | Y: 0 42 | Z: 0 43 | Plane: XY 44 | Plane Cell Count: 10 45 | Reference Frame: 46 | Value: true 47 | - Alpha: 1 48 | Class: rviz_default_plugins/RobotModel 49 | Collision Enabled: false 50 | Description File: "" 51 | Description Source: Topic 52 | Description Topic: 53 | Depth: 5 54 | Durability Policy: Volatile 55 | History Policy: Keep Last 56 | Reliability Policy: Reliable 57 | Value: /robot_description 58 | Enabled: true 59 | Links: 60 | All Links Enabled: true 61 | Expand Joint Details: false 62 | Expand Link Details: false 63 | Expand Tree: false 64 | Link Tree Style: Links in Alphabetic Order 65 | base_link: 66 | Alpha: 1 67 | Show Axes: false 68 | Show Trail: false 69 | camera_accel_frame: 70 | Alpha: 1 71 | Show Axes: false 72 | Show Trail: false 73 | camera_accel_optical_frame: 74 | Alpha: 1 75 | Show Axes: false 76 | Show Trail: false 77 | camera_bottom_screw_frame: 78 | Alpha: 1 79 | Show Axes: false 80 | Show Trail: false 81 | camera_color_frame: 82 | Alpha: 1 83 | Show Axes: false 84 | Show Trail: false 85 | camera_color_optical_frame: 86 | Alpha: 1 87 | Show Axes: false 88 | Show Trail: false 89 | camera_depth_frame: 90 | Alpha: 1 91 | Show Axes: false 92 | Show Trail: false 93 | camera_depth_optical_frame: 94 | Alpha: 1 95 | Show Axes: false 96 | Show Trail: false 97 | camera_gyro_frame: 98 | Alpha: 1 99 | Show Axes: false 100 | Show Trail: false 101 | camera_gyro_optical_frame: 102 | Alpha: 1 103 | Show Axes: false 104 | Show Trail: false 105 | camera_infra1_frame: 106 | Alpha: 1 107 | Show Axes: false 108 | Show Trail: false 109 | camera_infra1_optical_frame: 110 | Alpha: 1 111 | Show Axes: false 112 | Show Trail: false 113 | camera_infra2_frame: 114 | Alpha: 1 115 | Show Axes: false 116 | Show Trail: false 117 | camera_infra2_optical_frame: 118 | Alpha: 1 119 | Show Axes: false 120 | Show Trail: false 121 | camera_link: 122 | Alpha: 1 123 | Show Axes: false 124 | Show Trail: false 125 | Value: true 126 | Name: RobotModel 127 | TF Prefix: "" 128 | Update Interval: 0 129 | Value: true 130 | Visual Enabled: true 131 | - Class: rviz_default_plugins/TF 132 | Enabled: true 133 | Frame Timeout: 15 134 | Frames: 135 | All Enabled: true 136 | base_link: 137 | Value: true 138 | base_link_rect: 139 | Value: true 140 | camera_accel_frame: 141 | Value: true 142 | camera_accel_optical_frame: 143 | Value: true 144 | camera_bottom_screw_frame: 145 | Value: true 146 | camera_color_frame: 147 | Value: true 148 | camera_color_optical_frame: 149 | Value: true 150 | camera_depth_frame: 151 | Value: true 152 | camera_depth_optical_frame: 153 | Value: true 154 | camera_gyro_frame: 155 | Value: true 156 | camera_gyro_optical_frame: 157 | Value: true 158 | camera_imu_optical_frame: 159 | Value: true 160 | camera_infra1_frame: 161 | Value: true 162 | camera_infra1_optical_frame: 163 | Value: true 164 | camera_infra2_frame: 165 | Value: true 166 | camera_infra2_optical_frame: 167 | Value: true 168 | camera_link: 169 | Value: true 170 | odom: 171 | Value: true 172 | Marker Scale: 0.15000000596046448 173 | Name: TF 174 | Show Arrows: true 175 | Show Axes: true 176 | Show Names: false 177 | Tree: 178 | odom: 179 | base_link: 180 | camera_bottom_screw_frame: 181 | camera_link: 182 | camera_accel_frame: 183 | camera_accel_optical_frame: 184 | {} 185 | camera_color_frame: 186 | camera_color_optical_frame: 187 | {} 188 | camera_depth_frame: 189 | camera_depth_optical_frame: 190 | {} 191 | camera_gyro_frame: 192 | camera_gyro_optical_frame: 193 | {} 194 | camera_imu_optical_frame: 195 | {} 196 | camera_infra1_frame: 197 | camera_infra1_optical_frame: 198 | {} 199 | camera_infra2_frame: 200 | camera_infra2_optical_frame: 201 | {} 202 | base_link_rect: 203 | {} 204 | Update Interval: 0 205 | Value: true 206 | Enabled: true 207 | Global Options: 208 | Background Color: 48; 48; 48 209 | Fixed Frame: odom 210 | Frame Rate: 30 211 | Name: root 212 | Tools: 213 | - Class: rviz_default_plugins/Interact 214 | Hide Inactive Objects: true 215 | - Class: rviz_default_plugins/MoveCamera 216 | - Class: rviz_default_plugins/Select 217 | - Class: rviz_default_plugins/FocusCamera 218 | - Class: rviz_default_plugins/Measure 219 | Line color: 128; 128; 0 220 | - Class: rviz_default_plugins/SetInitialPose 221 | Topic: 222 | Depth: 5 223 | Durability Policy: Volatile 224 | History Policy: Keep Last 225 | Reliability Policy: Reliable 226 | Value: /initialpose 227 | - Class: rviz_default_plugins/SetGoal 228 | Topic: 229 | Depth: 5 230 | Durability Policy: Volatile 231 | History Policy: Keep Last 232 | Reliability Policy: Reliable 233 | Value: /goal_pose 234 | - Class: rviz_default_plugins/PublishPoint 235 | Single click: true 236 | Topic: 237 | Depth: 5 238 | Durability Policy: Volatile 239 | History Policy: Keep Last 240 | Reliability Policy: Reliable 241 | Value: /clicked_point 242 | Transformation: 243 | Current: 244 | Class: rviz_default_plugins/TF 245 | Value: true 246 | Views: 247 | Current: 248 | Class: rviz_default_plugins/Orbit 249 | Distance: 0.46995270252227783 250 | Enable Stereo Rendering: 251 | Stereo Eye Separation: 0.05999999865889549 252 | Stereo Focal Distance: 1 253 | Swap Stereo Eyes: false 254 | Value: false 255 | Focal Point: 256 | X: 0 257 | Y: 0 258 | Z: 0 259 | Focal Shape Fixed Size: true 260 | Focal Shape Size: 0.05000000074505806 261 | Invert Z Axis: false 262 | Name: Current View 263 | Near Clip Distance: 0.009999999776482582 264 | Pitch: 0.7203978896141052 265 | Target Frame: 266 | Value: Orbit (rviz) 267 | Yaw: 0.6203981637954712 268 | Saved: ~ 269 | Window Geometry: 270 | Displays: 271 | collapsed: false 272 | Height: 976 273 | Hide Left Dock: false 274 | Hide Right Dock: true 275 | QMainWindow State: 000000ff00000000fd00000004000000000000015600000376fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000376000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d006100670065000000029a000001190000000000000000000000010000010f000002f4fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d000002f4000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004420000003efc0100000002fb0000000800540069006d00650100000000000004420000000000000000fb0000000800540069006d00650100000000000004500000000000000000000004250000037600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 276 | Selection: 277 | collapsed: false 278 | Tool Properties: 279 | collapsed: false 280 | Views: 281 | collapsed: true 282 | Width: 1409 283 | X: 1038 284 | Y: 494 285 | --------------------------------------------------------------------------------