diff --git a/README.md b/README.md index 3d54e724..3592aeff 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ COPY myfile.txt /myfile.txt You could extend the base image launched as a container by `run_dev.sh` as follows. -`workspaces/isaac_ros-dev/ros_ws/src/isaac_ros_common/scripts/.isaac_ros_common_config` +`workspaces/isaac_ros-dev/ros_ws/src/isaac_ros_common/scripts/.isaac_ros_common-config` ``` CONFIG_IMAGE_KEY="humble.nav2.mine" CONFIG_DOCKER_SEARCH_DIRS=(workspaces/isaac_ros-dev/ros_ws/docker) @@ -79,15 +79,17 @@ This configures the image key to match with `mine` included and where to look fi - [Updates](#updates) ## Latest Update -Update 2022-06-30: Support ROS2 Humble and miscellaneous bug fixes. +Update 2022-08-31: Update to be compatible with JetPack 5.0.2 ## Supported Platforms This package is designed and tested to be compatible with ROS2 Humble running on [Jetson](https://developer.nvidia.com/embedded-computing) or an x86_64 system with an NVIDIA GPU. +> **Note**: Versions of ROS2 earlier than Humble are **not** supported. This package depends on specific ROS2 implementation features that were only introduced beginning with the Humble release. + | Platform | Hardware | Software | Notes | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Jetson | [Jetson Orin](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-orin/)
[Jetson Xavier](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-agx-xavier/) | [JetPack 5.0.1 DP](https://developer.nvidia.com/embedded/jetpack) | For best performance, ensure that [power settings](https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/SD/PlatformPowerAndPerformance.html) are configured appropriately. | +| Jetson | [Jetson Orin](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-orin/)
[Jetson Xavier](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-agx-xavier/) | [JetPack 5.0.2](https://developer.nvidia.com/embedded/jetpack) | For best performance, ensure that [power settings](https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/SD/PlatformPowerAndPerformance.html) are configured appropriately. | | x86_64 | NVIDIA GPU | [Ubuntu 20.04+](https://releases.ubuntu.com/20.04/)
[CUDA 11.6.1+](https://developer.nvidia.com/cuda-downloads) | @@ -95,6 +97,7 @@ This package is designed and tested to be compatible with ROS2 Humble running on | Date | Changes | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 2022-08-31 | Update to be compatible with JetPack 5.0.2 | | 2022-06-30 | Support ROS2 Humble and miscellaneous bug fixes. | | 2022-06-16 | Update `run_dev.sh` and removed `isaac_ros_nvengine` | | 2021-10-20 | Migrated to [NVIDIA-ISAAC-ROS](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common), added `isaac_ros_nvengine` and `isaac_ros_nvengine_interfaces` packages | diff --git a/docker/Dockerfile.aarch64 b/docker/Dockerfile.aarch64 index 4c291fc3..fcc7b7d1 100644 --- a/docker/Dockerfile.aarch64 +++ b/docker/Dockerfile.aarch64 @@ -7,7 +7,7 @@ # license agreement from NVIDIA CORPORATION is strictly prohibited. # Docker file for aarch64 based Jetson device -ARG BASE_IMAGE="nvcr.io/nvidia/l4t-base:r34.1" +ARG BASE_IMAGE="nvcr.io/nvidia/l4t-base:r35.1.0" FROM ${BASE_IMAGE} # Disable terminal interaction for apt @@ -18,7 +18,6 @@ SHELL ["/bin/bash", "-c"] # Fundamentals RUN apt-get update && apt-get install -y \ build-essential \ - cmake \ curl \ git \ lsb-release \ @@ -32,12 +31,24 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* \ && apt-get clean +# Upgrade cmake to 3.23.2 +RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null \ + && echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null \ + && apt-get update \ + && rm /usr/share/keyrings/kitware-archive-keyring.gpg \ + && apt-get install -y kitware-archive-keyring \ + && apt-get remove cmake && apt-get purge cmake && apt-get remove cmake-data && apt-get purge cmake \ + && apt-get install -y cmake=3.23.2-0kitware1ubuntu20.04.1 cmake-data=3.23.2-0kitware1ubuntu20.04.1 \ + && cmake --version \ +&& rm -rf /var/lib/apt/lists/* \ +&& apt-get clean + # Set Python3 as default RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 # Python basics RUN apt-get update && apt-get install -y \ - python3-flake8 \ + python3-flake8 \ python3-pip \ python3-pytest-cov \ python3-setuptools \ @@ -105,17 +116,6 @@ RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.d && rm -rf /var/lib/apt/lists/* \ && apt-get clean -# Upgrade cmake to latest -RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null \ - && echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null \ - && apt-get update \ - && rm /usr/share/keyrings/kitware-archive-keyring.gpg \ - && apt-get install -y kitware-archive-keyring \ - && apt-get install -y cmake \ - && cmake --version \ -&& rm -rf /var/lib/apt/lists/* \ -&& apt-get clean - # Install TensorRT and VPI RUN apt-get update && apt-get install -y \ tensorrt \ @@ -144,16 +144,12 @@ ENV PATH="${PATH}:/usr/local/cuda/bin" # https://forums.developer.nvidia.com/t/error-importerror-usr-lib-aarch64-linux-gnu-libgomp-so-1-cannot-allocate-memory-in-static-tls-block-i-looked-through-available-threads-already/166494/3 ENV LD_PRELOAD="/usr/lib/aarch64-linux-gnu/libgomp.so.1" -# Restore using the default Foxy DDS middleware: FastRTPS -ENV RMW_IMPLEMENTATION=rmw_fastrtps_cpp - -# Pytorch -RUN python3 -m pip install -U --extra-index-url https://download.pytorch.org/whl/cu113 \ - torch \ - torchvision \ - torchaudio +# PyTorch (NV CUDA edition) +# https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform/index.html +RUN python3 -m pip install --no-cache \ + https://developer.download.nvidia.cn/compute/redist/jp/v50/pytorch/torch-1.13.0a0+340c4120.nv22.06-cp38-cp38-linux_aarch64.whl -# Install Triton server 2.13 from https://github.com/triton-inference-server/server/releases/tag/v2.13.0 +# Install Triton server 2.24 from https://github.com/triton-inference-server/server/releases/tag/v2.24.0 RUN apt-get update && apt-get install -y --no-install-recommends \ autoconf \ automake \ @@ -166,23 +162,28 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ patchelf \ rapidjson-dev \ zlib1g-dev \ -&& rm -rf /var/lib/apt/lists/* +&& rm -rf /var/lib/apt/lists/* \ +&& apt-get clean RUN mkdir -p /opt/tritonserver && cd /opt/tritonserver \ - && wget https://github.com/triton-inference-server/server/releases/download/v2.20.0/tritonserver2.20.0-jetpack5.0.tgz \ - && tar -xzvf tritonserver2.20.0-jetpack5.0.tgz \ - && rm tritonserver2.20.0-jetpack5.0.tgz + && wget https://github.com/triton-inference-server/server/releases/download/v2.24.0/tritonserver2.24.0-jetpack5.0.2.tgz \ + && tar -xzvf tritonserver2.24.0-jetpack5.0.2.tgz \ + && rm tritonserver2.24.0-jetpack5.0.2.tgz ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/tritonserver/lib" # Add MQTT binaries and libraries RUN apt-add-repository ppa:mosquitto-dev/mosquitto-ppa \ - && apt-get update \ - && apt-get install -y mosquitto mosquitto-clients + && apt-get update && apt-get install -y \ + mosquitto \ + mosquitto-clients \ +&& rm -rf /var/lib/apt/lists/* \ +&& apt-get clean # Note: VPN cannot be on for pymongo download RUN python3 -m pip install -U \ - pymongo paho-mqtt + pymongo \ + paho-mqtt # Core dev libraries RUN apt-get update && apt-get install -y \ diff --git a/docker/Dockerfile.aarch64.humble.nav2 b/docker/Dockerfile.aarch64.humble.nav2 index 08a4bcfe..4205f0e0 100644 --- a/docker/Dockerfile.aarch64.humble.nav2 +++ b/docker/Dockerfile.aarch64.humble.nav2 @@ -6,4 +6,4 @@ # distribution of this software and related documentation without an express # license agreement from NVIDIA CORPORATION is strictly prohibited. -FROM nvcr.io/nvidia/isaac/ros:aarch64-humble-nav2_661a3fb05aba6897468c8ded9fa42c11 +FROM nvcr.io/nvidia/isaac/ros:aarch64-humble-nav2_35120f31b84976ec36009722e16f1524 diff --git a/docker/Dockerfile.humble b/docker/Dockerfile.humble index 779b3c3d..8cad4950 100644 --- a/docker/Dockerfile.humble +++ b/docker/Dockerfile.humble @@ -30,10 +30,8 @@ RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/r # ROS fundamentals RUN apt-get update && apt-get install -y \ build-essential \ - cmake \ git \ python3-colcon-common-extensions \ - python3-flake8 \ python3-pip \ python3-pybind11 \ python3-pytest-cov \ @@ -60,10 +58,15 @@ RUN python3 -m pip install -U \ pytest \ setuptools +# Avoid setup.py and easy_install deprecation warnings caused by colcon and setuptools +# https://github.com/colcon/colcon-core/issues/454 +ENV PYTHONWARNINGS=ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources +RUN echo "Warning: Using the PYTHONWARNINGS environment variable to silence setup.py and easy_install deprecation warnings caused by colcon" + ENV ROS_DISTRO=humble ENV ROS_ROOT=/opt/ros/${ROS_DISTRO} -# Build ROS2 core from source source +# Build ROS2 core from source RUN mkdir -p ${ROS_ROOT}/src && \ cd ${ROS_ROOT} && \ # https://answers.ros.org/question/325245/minimal-ros2-installation/?answer=325249#post-id-325249 @@ -115,8 +118,8 @@ RUN cd ${ROS_ROOT} \ --from-paths src \ --rosdistro ${ROS_DISTRO} \ --skip-keys "fastcdr rti-connext-dds-6.0.1 rti-connext-dds-5.3.1 urdfdom_headers libopencv-dev libopencv-contrib-dev libopencv-imgproc-dev python-opencv python3-opencv" \ -&& rm -Rf /var/lib/apt/lists/* \ -&& apt-get clean + && rm -Rf /var/lib/apt/lists/* \ + && apt-get clean # Build ROS2 source RUN cd ${ROS_ROOT} \ @@ -137,5 +140,5 @@ RUN apt-get update && mkdir -p ${ROS_ROOT}/src && cd ${ROS_ROOT}/src \ && rosdep install -y -r --ignore-src --from-paths src --rosdistro ${ROS_DISTRO} \ && colcon build --merge-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo --packages-up-to-regex negotiated* \ && rm -Rf src logs build \ -&& rm -rf /var/lib/apt/lists/* \ -&& apt-get clean + && rm -rf /var/lib/apt/lists/* \ + && apt-get clean diff --git a/docker/Dockerfile.nav2 b/docker/Dockerfile.nav2 index 6ee14f48..d2ea116f 100644 --- a/docker/Dockerfile.nav2 +++ b/docker/Dockerfile.nav2 @@ -12,7 +12,7 @@ FROM ${BASE_IMAGE} # Install nav2 RUN apt-get update && mkdir -p ${ROS_ROOT}/src && cd ${ROS_ROOT}/src \ && git clone https://github.com/ros-planning/navigation2.git && cd navigation2 && git checkout humble && cd .. \ - && git clone https://github.com/BehaviorTree/BehaviorTree.CPP.git && cd BehaviorTree.CPP && git checkout master && cd .. \ + && git clone https://github.com/BehaviorTree/BehaviorTree.CPP.git && cd BehaviorTree.CPP && git checkout a363bdcae88350bc748598a7d2950e300859469c && cd .. \ && source ${ROS_ROOT}/setup.bash && cd ${ROS_ROOT} \ && rosdep install -y -r --ignore-src --from-paths src --rosdistro ${ROS_DISTRO} \ && colcon build --merge-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo --packages-up-to-regex nav2* --packages-ignore nav2_system_tests \ diff --git a/docker/Dockerfile.user b/docker/Dockerfile.user index 2b84ede7..2a3113eb 100644 --- a/docker/Dockerfile.user +++ b/docker/Dockerfile.user @@ -23,7 +23,7 @@ RUN apt-get update && apt-get install -y \ # Reuse triton-server user as 'admin' user if exists RUN if [ $(getent group triton-server) ]; then \ groupmod --gid ${USER_GID} -n ${USERNAME} triton-server ; \ - usermod -l ${USERNAME} -m -d /home/${USERNAME} triton-server ; \ + usermod -l ${USERNAME} -u ${USER_UID} -m -d /home/${USERNAME} triton-server ; \ mkdir -p /home/${USERNAME} ; \ sudo chown ${USERNAME}:${USERNAME} /home/${USERNAME} ; \ fi @@ -44,6 +44,10 @@ RUN mkdir -p /usr/local/bin/scripts COPY scripts/*entrypoint.sh /usr/local/bin/scripts/ RUN chmod +x /usr/local/bin/scripts/*.sh +# Copy middleware profiles +RUN mkdir -p /usr/local/share/middleware_profiles +COPY middleware_profiles/*profile.xml /usr/local/share/middleware_profiles/ + ENV USERNAME=${USERNAME} ENV USER_GID=${USER_GID} ENV USER_UID=${USER_UID} diff --git a/docker/Dockerfile.x86_64 b/docker/Dockerfile.x86_64 index 242a7f68..e8fdaede 100644 --- a/docker/Dockerfile.x86_64 +++ b/docker/Dockerfile.x86_64 @@ -51,7 +51,6 @@ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1 # Python basics RUN apt-get update && apt-get install -y \ - python3-flake8 \ python3-pip \ python3-pybind11 \ python3-pytest-cov \ @@ -78,18 +77,12 @@ RUN apt-get update && apt-get install -y \ python3-opencv \ && rm -rf /var/lib/apt/lists/* \ && apt-get clean - -# Pytorch -RUN python3 -m pip install -U --extra-index-url https://download.pytorch.org/whl/cu113 \ - torch \ - torchvision \ - torchaudio # Python3 (PIP) RUN python3 -m pip install -U \ argcomplete \ autopep8 \ - flake8 \ + flake8==4.0.1 \ flake8-blind-except \ flake8-builtins \ flake8-class-newline \ @@ -112,12 +105,13 @@ RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.d && rm -rf /var/lib/apt/lists/* \ && apt-get clean -# CMake -RUN wget -qO - https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add - && \ - apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" && \ - apt-get update && \ - apt-get install -y --no-install-recommends --only-upgrade \ - cmake \ +# Upgrade cmake to 3.23.2 +RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null \ + && echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null \ + && apt-get update \ + && apt-get update \ + && apt-get remove -y cmake && apt-get purge -y cmake && apt-get remove -y cmake-data && apt-get purge -y cmake \ + && apt-get install -y cmake=3.23.2-0kitware1ubuntu20.04.1 cmake-data=3.23.2-0kitware1ubuntu20.04.1 \ && cmake --version \ && rm -rf /var/lib/apt/lists/* \ && apt-get clean @@ -133,12 +127,18 @@ RUN apt-get update && apt-get install -y \ && rm -rf /var/lib/apt/lists/* \ && apt-get clean +# Pytorch +RUN python3 -m pip install -U --extra-index-url https://download.pytorch.org/whl/cu113 \ + torch \ + torchvision \ + torchaudio + # Install VPI packages ARG HAS_GPU="true" RUN if [ "$HAS_GPU" = "true" ]; then \ set -e ; \ apt-key adv --fetch-key https://repo.download.nvidia.com/jetson/jetson-ota-public.asc ; \ - add-apt-repository 'deb http://repo.download.nvidia.com/jetson/x86_64/focal r34.1 main' ; \ + add-apt-repository 'deb http://repo.download.nvidia.com/jetson/x86_64/focal r35.1 main' ; \ apt-get update ; \ apt-get install libnvvpi2 vpi2-dev ; \ rm -rf /var/lib/apt/lists/* ; \ diff --git a/docker/Dockerfile.x86_64.humble.nav2 b/docker/Dockerfile.x86_64.humble.nav2 index d838e260..1231fdfa 100644 --- a/docker/Dockerfile.x86_64.humble.nav2 +++ b/docker/Dockerfile.x86_64.humble.nav2 @@ -6,4 +6,4 @@ # distribution of this software and related documentation without an express # license agreement from NVIDIA CORPORATION is strictly prohibited. -FROM nvcr.io/nvidia/isaac/ros:x86_64-humble-nav2_6ffb6f904c4c6d286b16de5ca662ad5f +FROM nvcr.io/nvidia/isaac/ros:x86_64-humble-nav2_53c4c553a22864a0675e9b05bb7cf19b diff --git a/docker/middleware_profiles/rtps_udp_profile.xml b/docker/middleware_profiles/rtps_udp_profile.xml new file mode 100644 index 00000000..fc2f5da1 --- /dev/null +++ b/docker/middleware_profiles/rtps_udp_profile.xml @@ -0,0 +1,30 @@ + + + + +NVIDIA Isaac ROS Software License + + + + UdpTransport + UDPv4 + + + + + + + UdpTransport + + false + + + \ No newline at end of file diff --git a/docker/realsense-dockerfile-example/.isaac_ros_common-config b/docker/realsense-dockerfile-example/.isaac_ros_common-config new file mode 100644 index 00000000..05f9040e --- /dev/null +++ b/docker/realsense-dockerfile-example/.isaac_ros_common-config @@ -0,0 +1,2 @@ +CONFIG_IMAGE_KEY=humble.nav2.realsense +CONFIG_DOCKER_SEARCH_DIRS=($DOCKER_DIR/realsense-dockerfile-example) diff --git a/docker/realsense-dockerfile-example/.isaac_ros_common_config b/docker/realsense-dockerfile-example/.isaac_ros_common_config deleted file mode 100644 index 83f9b6a7..00000000 --- a/docker/realsense-dockerfile-example/.isaac_ros_common_config +++ /dev/null @@ -1 +0,0 @@ -CONFIG_IMAGE_KEY=humble.nav2.realsense diff --git a/docker/realsense-dockerfile-example/Dockerfile.realsense b/docker/realsense-dockerfile-example/Dockerfile.realsense index 1dbf810b..d15ef1c0 100644 --- a/docker/realsense-dockerfile-example/Dockerfile.realsense +++ b/docker/realsense-dockerfile-example/Dockerfile.realsense @@ -3,8 +3,8 @@ ARG BASE_IMAGE FROM ${BASE_IMAGE} -COPY realsense/buildLibrealsense.sh /opt/realsense/buildLibrealsense.sh -COPY realsense/installDependencies.sh /opt/realsense/installDependencies.sh +COPY buildLibrealsense.sh /opt/realsense/buildLibrealsense.sh +COPY installDependencies.sh /opt/realsense/installDependencies.sh RUN chmod +x /opt/realsense/installDependencies.sh && /opt/realsense/installDependencies.sh RUN chmod +x /opt/realsense/buildLibrealsense.sh && /opt/realsense/buildLibrealsense.sh \ No newline at end of file diff --git a/docker/realsense-dockerfile-example/installDependencies.sh b/docker/realsense-dockerfile-example/installDependencies.sh index 95b6dc04..4199ae74 100644 --- a/docker/realsense-dockerfile-example/installDependencies.sh +++ b/docker/realsense-dockerfile-example/installDependencies.sh @@ -13,8 +13,6 @@ apt-add-repository universe apt-get update echo "${green}Adding dependencies, graphics libraries and tools${reset}" apt-get install libssl-dev libusb-1.0-0-dev pkg-config -y -# This is for ccmake -apt-get install build-essential cmake cmake-curses-gui -y # Graphics libraries - for SDK's OpenGL-enabled examples apt-get install libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev -y diff --git a/docs/dev-env-setup.md b/docs/dev-env-setup.md index e3b5e4b9..0f4aaabc 100644 --- a/docs/dev-env-setup.md +++ b/docs/dev-env-setup.md @@ -5,21 +5,8 @@ > > On Jetson Xavier platforms, an external drive is **required** to have enough storage space. -1. First, install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/overview.html): - ```bash - distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && \ - curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && \ - curl -s -L https://nvidia.github.io/libnvidia-container/experimental/$distribution/libnvidia-container.list | \ - sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ - sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list - ``` - - ```bash - sudo apt-get update && \ - sudo apt-get install nvidia-container-toolkit=1.10.0~rc.3-1 - ``` -2. Next, configure `nvidia-container-runtime` as the default runtime for Docker. +1. Configure `nvidia-container-runtime` as the default runtime for Docker. Using your text editor of choice, add the following items to `/etc/docker/daemon.json`. ```json @@ -35,15 +22,15 @@ ... } ``` -3. Then, restart Docker: +2. Then, restart Docker: ```bash sudo systemctl daemon-reload && sudo systemctl restart docker ``` -4. Install [Git LFS](https://git-lfs.github.com/) in order to pull down all large files: +3. Install [Git LFS](https://git-lfs.github.com/) in order to pull down all large files: ```bash sudo apt-get install git-lfs ``` -5. Finally, create a ROS2 workspace for experimenting with Isaac ROS: +4. Finally, create a ROS2 workspace for experimenting with Isaac ROS: ```bash mkdir -p ~/workspaces/isaac_ros-dev/src ``` diff --git a/docs/isaac-sim-sil-setup.md b/docs/isaac-sim-sil-setup.md index fbc92ab3..048e9995 100644 --- a/docs/isaac-sim-sil-setup.md +++ b/docs/isaac-sim-sil-setup.md @@ -1,6 +1,4 @@ # Isaac Sim Setup for Software in the Loop (SIL) -> **Note: Isaac Sim 2022.1.0 published on 6/3/2022 does not support ROS2 Humble. Please follow one of the [workarounds](#isaac-sim-202210-workarounds) mentioned below before continuing with the tutorial.** - > **Note:** This tutorial runs a software in the loop simulation. In order to run a hardware in the loop simulation, follow the steps in the [corresponding tutorial](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/isaac-sim-hil-setup.md). Software in the Loop (SIL) refers to a configuration where the software being tested is not running on the target hardware platform. For example, Isaac ROS packages being tested on x86 before deployment on Jetson is SIL. @@ -25,29 +23,3 @@ Software in the Loop (SIL) refers to a configuration where the software being te
5. Continue with the next steps in your specfic Isaac ROS package tutorial. - -## Isaac Sim 2022.1.0 Workarounds - -- Run Isaac Sim and the Isaac ROS Packages on different systems. For example, you can run Isaac Sim 2022.1.0 on your laptop and run the Isaac ROS Package on an AGX Xavier. - > **Note:** Both systems must be connected to the same network. - -- If you are running Isaac Sim 2022.1.0 and the Docker container launched by `isaac_ros_common/scripts/run_dev.sh` on the same machine, please make the following patch to prevent port clashes: - - `isaac_ros_common/scripts/run_dev.sh` - ```diff - docker run -it --rm \ - --privileged \ - -- --network host \ - ${DOCKER_ARGS[@]} \ - -v $ISAAC_ROS_DEV_DIR:/workspaces/isaac_ros-dev \ - -- -v /dev/shm:/dev/shm \ - -- -v /dev/*:/dev/* \ - --name "$CONTAINER_NAME" \ - --runtime nvidia \ - --user="admin" \ - --entrypoint /usr/local/bin/scripts/workspace-entrypoint.sh \ - --workdir /workspaces/isaac_ros-dev \ - $@ \ - $BASE_NAME \ - /bin/bash - ``` diff --git a/docs/modify-dockerfile.md b/docs/modify-dockerfile.md index 347dccd2..8e65dd8a 100644 --- a/docs/modify-dockerfile.md +++ b/docs/modify-dockerfile.md @@ -1,12 +1,12 @@ # Customizing Dockerfiles and the Isaac ROS Docker Container ## Change the Config Image Key -Providing a value to the `$CONFIG_IMAGE_KEY` variable in `isaac_ros_common/scripts/.isaac_ros_common_config` before running the `isaac_ros_common/scripts/run_dev.sh` script allows you to select a different base image upon which to build the Isaac ROS layers. +Providing a value to the `$CONFIG_IMAGE_KEY` variable in `isaac_ros_common/scripts/.isaac_ros_common-config` before running the `isaac_ros_common/scripts/run_dev.sh` script allows you to select a different base image upon which to build the Isaac ROS layers. For example, you may wish to bundle a dependency for the RealSense camera as part of the base Docker image. The `isaac_ros_common/docker/realsense-dockerfile-example` folder contains an example setup: - Associated shell scripts from [JetsonHacks](https://jetsonhacks.com/) that prepare build on `aarch64` and ROS2 Humble - `Dockerfile.realsense` that invokes the shell scripts -- `.isaac_ros_common_config` that specifies the new value of `$CONFIG_IMAGE_KEY` to point to the new Dockerfile +- `.isaac_ros_common-config` that specifies the new value of `$CONFIG_IMAGE_KEY` to point to the new Dockerfile > **NOTE:** This configuration file must be moved to `isaac_ros_common/scripts/` for it to be used while running `run_dev.sh` Please see [this section](../README.md#configuring-run_devsh) for additional details. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index d426dccb..7cde79e5 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -75,38 +75,7 @@ Launching the realsense node using `ros2 launch realsense2_camera rs_launch.py`, ``` ### Solution -Please make the following changes in the file `isaac_ros_common/scripts/run_dev.sh` and start a new container: - -`isaac_ros_common/scripts/run_dev.sh` -```diff -if [ "$(docker ps -a --quiet --filter status=running --filter name=$CONTAINER_NAME)" ]; then - print_info "Attaching to running container: $CONTAINER_NAME" --- docker exec -i -t -u admin --workdir /workspaces/isaac_ros-dev $CONTAINER_NAME /bin/bash $@ -++ docker exec -i -t --workdir /workspaces/isaac_ros-dev $CONTAINER_NAME /bin/bash $@ - exit 0 -fi -``` - -`isaac_ros_common/scripts/run_dev.sh` -```diff -# Run container from image -print_info "Running $CONTAINER_NAME" -docker run -it --rm \ - --privileged \ - --network host \ - ${DOCKER_ARGS[@]} \ - -v $ISAAC_ROS_DEV_DIR:/workspaces/isaac_ros-dev \ - -v /dev/shm:/dev/shm \ - -v /dev/*:/dev/* \ - --name "$CONTAINER_NAME" \ - --runtime nvidia \ --- --user="admin" \ - --entrypoint /usr/local/bin/scripts/workspace-entrypoint.sh \ - --workdir /workspaces/isaac_ros-dev \ - $@ \ - $BASE_NAME \ - /bin/bash -``` +**Before** starting the isaac_ros-dev docker container using run_dev.sh, run [setup_udev_rules.sh](https://github.com/IntelRealSense/librealsense/blob/master/scripts/setup_udev_rules.sh) from [librealsense](https://github.com/IntelRealSense/librealsense) **in a terminal outside docker** ## Failed to get valid output from Isaac ROS Rectify or Apriltag Node ### Symptom If there is no available calibration data for an Argus camera, you will see warning messages similar to: diff --git a/isaac_ros_apriltag_interfaces/package.xml b/isaac_ros_apriltag_interfaces/package.xml index 150228b7..901c466f 100644 --- a/isaac_ros_apriltag_interfaces/package.xml +++ b/isaac_ros_apriltag_interfaces/package.xml @@ -11,7 +11,7 @@ license agreement from NVIDIA CORPORATION is strictly prohibited. isaac_ros_apriltag_interfaces - 0.10.0 + 0.11.0 Interfaces for performing Isaac ROS AprilTag detection Hemal Shah diff --git a/isaac_ros_bi3d_interfaces/CMakeLists.txt b/isaac_ros_bi3d_interfaces/CMakeLists.txt new file mode 100644 index 00000000..5359716d --- /dev/null +++ b/isaac_ros_bi3d_interfaces/CMakeLists.txt @@ -0,0 +1,44 @@ +# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. +# +# NVIDIA CORPORATION and its licensors retain all intellectual property +# and proprietary rights in and to this software, related documentation +# and any modifications thereto. Any use, reproduction, disclosure or +# distribution of this software and related documentation without an express +# license agreement from NVIDIA CORPORATION is strictly prohibited. + +cmake_minimum_required(VERSION 3.5) +project(isaac_ros_bi3d_interfaces LANGUAGES C CXX) + +# Default to C++17 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) +endif() + +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic) +endif() + +# Default to Release build +if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "") + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) +endif() +message( STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}" ) + +find_package(ament_cmake_auto REQUIRED) +ament_auto_find_build_dependencies() + +# Prepare custom AprilTag interfaces +find_package(rosidl_default_generators REQUIRED) +rosidl_generate_interfaces(${PROJECT_NAME} + msg/Bi3DInferenceParametersArray.msg + DEPENDENCIES std_msgs +) +ament_export_dependencies(rosidl_default_runtime) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() + +endif() + +ament_auto_package() diff --git a/isaac_ros_bi3d_interfaces/msg/Bi3DInferenceParametersArray.msg b/isaac_ros_bi3d_interfaces/msg/Bi3DInferenceParametersArray.msg new file mode 100644 index 00000000..d61e2631 --- /dev/null +++ b/isaac_ros_bi3d_interfaces/msg/Bi3DInferenceParametersArray.msg @@ -0,0 +1,3 @@ +std_msgs/Header header + +int32[] disparity_values \ No newline at end of file diff --git a/isaac_ros_bi3d_interfaces/package.xml b/isaac_ros_bi3d_interfaces/package.xml new file mode 100644 index 00000000..f4d8e2c6 --- /dev/null +++ b/isaac_ros_bi3d_interfaces/package.xml @@ -0,0 +1,35 @@ + + + + + isaac_ros_bi3d_interfaces + 0.11.0 + Interfaces for Isaac ROS Bi3D + + Hemal Shah + NVIDIA Isaac ROS Software License + https://developer.nvidia.com/isaac-ros-gems/ + Peter Du + + rosidl_default_generators + rosidl_default_runtime + + std_msgs + + ament_lint_auto + ament_lint_common + + rosidl_interface_packages + + + ament_cmake + + diff --git a/isaac_ros_common/package.xml b/isaac_ros_common/package.xml index 2bb058e1..5bdc02f5 100644 --- a/isaac_ros_common/package.xml +++ b/isaac_ros_common/package.xml @@ -13,7 +13,7 @@ license agreement from NVIDIA CORPORATION is strictly prohibited. isaac_ros_common - 0.9.0 + 0.11.0 Utilities for performing common functions in Isaac ROS packages Hemal Shah diff --git a/isaac_ros_tensor_list_interfaces/package.xml b/isaac_ros_tensor_list_interfaces/package.xml index 496c184b..606c7ea3 100644 --- a/isaac_ros_tensor_list_interfaces/package.xml +++ b/isaac_ros_tensor_list_interfaces/package.xml @@ -13,7 +13,7 @@ license agreement from NVIDIA CORPORATION is strictly prohibited. isaac_ros_tensor_list_interfaces - 0.10.0 + 0.11.0 Interfaces for Isaac ROS tensor list CY Chen diff --git a/isaac_ros_test/isaac_ros_test/json_conversion.py b/isaac_ros_test/isaac_ros_test/json_conversion.py index 34f99a12..afd29800 100644 --- a/isaac_ros_test/isaac_ros_test/json_conversion.py +++ b/isaac_ros_test/isaac_ros_test/json_conversion.py @@ -14,7 +14,7 @@ import cv2 from cv_bridge import CvBridge -from isaac_ros_apriltag_interfaces.msg import AprilTagDetection, AprilTagDetectionArray +from geometry_msgs.msg import Pose, PoseArray from sensor_msgs.msg import CameraInfo, Image @@ -57,56 +57,6 @@ def save_to_json(obj: Dict, json_filepath: Path) -> None: with open(json_filepath, 'w+') as json_file: json.dump(obj, json_file, indent=2) - @staticmethod - def load_april_tag_detection_array_from_json(json_filepath: Path) -> AprilTagDetectionArray: - """ - Load a AprilTagDetectionArray message from a JSON filepath. - - Parameters - ---------- - json_filepath : Path - The path to a JSON file containing the AprilTagDetectionArray fields - - Returns - ------- - AprilTagDetectionArray - Generated AprilTagDetectionArray message - - """ - apriltag_detection_array_json = JSONConversion.load_from_json( - json_filepath) - - apriltag_detection_array = AprilTagDetectionArray() - apriltag_detection_array.header.frame_id = apriltag_detection_array_json[ - 'header']['frame_id'] - for detection in apriltag_detection_array_json['detections']: - apriltag_detection = AprilTagDetection() - apriltag_detection.id = detection['id'] - apriltag_detection.family = detection['family'] - apriltag_detection.center.x = detection['center']['x'] - apriltag_detection.center.y = detection['center']['y'] - for corner_index, corner in enumerate(detection['corners']): - apriltag_detection.corners[corner_index].x = corner['x'] - apriltag_detection.corners[corner_index].y = corner['y'] - apriltag_detection.pose.header.frame_id = detection['pose']['header']['frame_id'] - apriltag_detection.pose.pose.pose.position.x = detection[ - 'pose']['pose']['pose']['position']['x'] - apriltag_detection.pose.pose.pose.position.y = detection[ - 'pose']['pose']['pose']['position']['y'] - apriltag_detection.pose.pose.pose.position.z = detection[ - 'pose']['pose']['pose']['position']['z'] - apriltag_detection.pose.pose.pose.orientation.x = detection[ - 'pose']['pose']['pose']['orientation']['x'] - apriltag_detection.pose.pose.pose.orientation.y = detection[ - 'pose']['pose']['pose']['orientation']['y'] - apriltag_detection.pose.pose.pose.orientation.z = detection[ - 'pose']['pose']['pose']['orientation']['z'] - apriltag_detection.pose.pose.pose.orientation.w = detection[ - 'pose']['pose']['pose']['orientation']['w'] - apriltag_detection_array.detections.append(apriltag_detection) - - return apriltag_detection_array - @staticmethod def load_camera_info_from_json(json_filepath: Path, desired_size: Tuple[int] = None) -> CameraInfo: @@ -173,6 +123,43 @@ def save_camera_info_to_json(camera_info: CameraInfo, json_filepath: Path) -> No JSONConversion.save_to_json(camera_info_json, json_filepath) + @staticmethod + def load_pose_array_from_json(json_filepath: Path) -> PoseArray: + """ + Load a PoseArray message from a JSON filepath. + + Parameters + ---------- + json_filepath : Path + The path to a JSON file containing the PoseArray fields + + Returns + ------- + PoseArray + Generated PoseArray message + + """ + pose_array_json = JSONConversion.load_from_json(json_filepath) + + pose_array = PoseArray() + pose_array.header.frame_id = pose_array_json['header']['frame_id'] + + for pose_json in pose_array_json['poses']: + pose = Pose() + + pose.position.x = pose_json['position']['x'] + pose.position.y = pose_json['position']['y'] + pose.position.z = pose_json['position']['z'] + + pose.orientation.x = pose_json['orientation']['x'] + pose.orientation.y = pose_json['orientation']['y'] + pose.orientation.z = pose_json['orientation']['z'] + pose.orientation.w = pose_json['orientation']['w'] + + pose_array.poses.append(pose) + + return pose_array + @staticmethod def load_image_from_json(json_filepath: Path) -> Image: """ diff --git a/isaac_ros_test/package.xml b/isaac_ros_test/package.xml index e7d6a26c..1a458241 100644 --- a/isaac_ros_test/package.xml +++ b/isaac_ros_test/package.xml @@ -13,7 +13,7 @@ license agreement from NVIDIA CORPORATION is strictly prohibited. isaac_ros_test - 0.10.0 + 0.11.0 Isaac ROS testing utilities Hemal Shah @@ -24,7 +24,6 @@ license agreement from NVIDIA CORPORATION is strictly prohibited. Jaiveer Singh cv_bridge - isaac_ros_apriltag_interfaces ament_flake8 ament_pep257 diff --git a/scripts/build_base_image.sh b/scripts/build_base_image.sh index ee58f714..05cebf08 100755 --- a/scripts/build_base_image.sh +++ b/scripts/build_base_image.sh @@ -46,24 +46,21 @@ TARGET_IMAGE_NAME="$1" if [[ -z "$TARGET_IMAGE_NAME" ]]; then TARGET_IMAGE_NAME="${TARGET_IMAGE_STR//./-}-image" print_warning "Target image name not specified, using ${TARGET_IMAGE_NAME}" -else - shift 1 fi +shift 1 BASE_IMAGE_NAME="$1" if [[ -z "$BASE_IMAGE_NAME" ]]; then print_warning "Using base image name not specified, using '${BASE_IMAGE_NAME}'" -else - shift 1 fi +shift 1 DOCKER_CONTEXT_DIR="$1" if [[ -z "$DOCKER_CONTEXT_DIR" ]]; then print_warning "Using docker context dir not specified, using Dockerfile directory" -else - shift 1 fi +shift 1 ON_EXIT=() function cleanup { diff --git a/scripts/run_dev.sh b/scripts/run_dev.sh index 5496fd6b..f1c0da22 100755 --- a/scripts/run_dev.sh +++ b/scripts/run_dev.sh @@ -128,6 +128,7 @@ DOCKER_ARGS+=("-v /tmp/.X11-unix:/tmp/.X11-unix") DOCKER_ARGS+=("-e DISPLAY") DOCKER_ARGS+=("-e NVIDIA_VISIBLE_DEVICES=all") DOCKER_ARGS+=("-e NVIDIA_DRIVER_CAPABILITIES=all") +DOCKER_ARGS+=("-e FASTRTPS_DEFAULT_PROFILES_FILE=/usr/local/share/middleware_profiles/rtps_udp_profile.xml") if [[ $PLATFORM == "aarch64" ]]; then DOCKER_ARGS+=("-v /usr/bin/tegrastats:/usr/bin/tegrastats") @@ -136,6 +137,7 @@ if [[ $PLATFORM == "aarch64" ]]; then DOCKER_ARGS+=("-v /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcusparse.so.11:/usr/local/cuda-11.4/targets/aarch64-linux/lib/libcusparse.so.11") DOCKER_ARGS+=("-v /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcurand.so.10:/usr/local/cuda-11.4/targets/aarch64-linux/lib/libcurand.so.10") DOCKER_ARGS+=("-v /usr/local/cuda-11.4/targets/aarch64-linux/lib/libnvToolsExt.so:/usr/local/cuda-11.4/targets/aarch64-linux/lib/libnvToolsExt.so") + DOCKER_ARGS+=("-v /usr/local/cuda-11.4/targets/aarch64-linux/lib/libcupti.so.11.4:/usr/local/cuda-11.4/targets/aarch64-linux/lib/libcupti.so.11.4") DOCKER_ARGS+=("-v /usr/local/cuda-11.4/targets/aarch64-linux/include:/usr/local/cuda-11.4/targets/aarch64-linux/include") DOCKER_ARGS+=("-v /usr/lib/aarch64-linux-gnu/tegra:/usr/lib/aarch64-linux-gnu/tegra") DOCKER_ARGS+=("-v /usr/src/jetson_multimedia_api:/usr/src/jetson_multimedia_api") @@ -162,7 +164,6 @@ docker run -it --rm \ --network host \ ${DOCKER_ARGS[@]} \ -v $ISAAC_ROS_DEV_DIR:/workspaces/isaac_ros-dev \ - -v /dev/shm:/dev/shm \ -v /dev/*:/dev/* \ --name "$CONTAINER_NAME" \ --runtime nvidia \