Skip to content

pairlab/isaac_ros-dev

Repository files navigation

Isaac ROS Environment

Prerequisite

Please familiarize yourself with Docker concepts such as Image, Container, Volumes, Runtime, etc. TODO: Add more info here or point to some resources?

Main reason for using this as a base is readiness of infrastructure in setting up

  1. Docker with CUDA on x86_64 and Jetson
  2. Docker layers build so we have centralized library/dependency installation without needing to install every component for every hardware setup.

Dependencies

Install git-lfs

sudo apt update
sudo apt install git-lfs

Install Docker

Follow installation instructions on Docker. Add user to docker group and restart too.

sudo groupadd docker
sudo usermod -aG docker $USER

Install nvidia-containter-toolkit

Install nvidia-container-toolkit

sudo apt update
sudo apt install -y nvidia-container-toolkit

Set Nvidia backend for docker

sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

On Jetson Set CDI

sudo nvidia-ctk cdi generate --mode=csv --output=/etc/cdi/nvidia.yaml

Hardware setup

This setup is based on what hardware you're using. See setup/hardware for more info.

Repo Setup

Clone repo recursively or clone then initialize submodule

git clone --recursive git@github.com:gtpairrobot/isaac_ros-dev.git

or

git clone git@github.com:gtpairrobot/isaac_ros-dev.git
cd isaac_ros-dev
git submodule init
git submodule update

Set Environment Variables

Workspace Root

Set ISAAC_ROS_WS to the cloned directory. Don't forget to source ~/.bashrc again.

cd isaac_ros-dev
echo "export ISAAC_ROS_WS=\"$(pwd -P)\"" >> ~/.bashrc

PAIR Experiment Setup

Set PAIR_EXP_SETUP to the setup name. This determines the docker image key to run. You can add to .bashrc as this should be setup specific.

To see possible mapping, see image_key_map.yaml.

VS Code Extension Support

Install ms-vscode-remote.remote-containers extension in vscode.

Note: Depending on the version of vscode and the Dev Containers (remote-containers), behavior may be different. Previous version may search for config file inside .devcontainer. Newer version may remove that and use global config.

Inside .devcontainer folder contains the example configuration for dev container configuration.

  1. Start the container. See Starting Container section for more info.
  2. Find the devcontainer config json corresponding to the Isaac ROS Dev container you are attaching to. This is based on your machine architecture (x86_64/amd64 or aarch64/arm64).
  3. Copy it to where your devcontainer config search path is. To find this you can first attach to the target container (Dev Containers: Attach to Running Container... in command pallete) then (Dev Containers: Open Attached Container Configuration File... in command pallete).

Starting container

Starting the docker container.

./run_isaac_ros.sh

For information related to setting up new hardware setup/combination, see Add new hardware setup section below.

Each time you start a new docker container, run container_setup.sh. This will help setup dependencies that can't be set up during build time (i.e: rosdep update, python packages mounted in volume (including this workspace), etc.).

./scripts/container_setup.sh

Building ROS2 packages

TODO: Populate

How to? / Knowledge Base

Add new hardware setup

Specifying the Docker Image Key

TODO: Add image key mapping in run_isaac_ros.sh for different project setting

TODO: Prepare location for per-setup start script (since required python would be different).

Add new submodule

cd ${ISAAC_ROS_WS}
git submodule add <branch name> <repo url> <clone path>

Note: choice of http or ssh for <repo url> affects all users. For public repo use http, for private, may be easier to use ssh.

Adding new ros2 python package to intellisense

Add the path to python.analysis.extraPaths in vscode or devcontainter settings.

Adding extensions to devcontainer

Add the extension key into

"customizations": 
{ 
    "extensions":
    [
        ...,
        <MORE EXTENTIONS>
    ]
}

Adding environment variable to docker container

Edit run_isaac_ros.sh where run_dev.sh is called. Use -e <VAR NAME>=<VAR VALUE> inside the -a option.

Example below:

./scripts/run_dev.sh \
    -d ${ISAAC_ROS_WS} \
    -i ${IMAGE_KEY} \
    -a "-v /usr/local/zed/settings:/usr/local/zed/settings \
        -v /usr/local/zed/resources:/usr/local/zed/resources \
        -e ROSDEP_SRC_DIRS=${ROSDEP_SRC_DIRS} \
        -e PYTHON_DEPS_DIRS=${PYTHON_DEPS_DIRS}"

Connect Quest VR

Sometimes after connecting quest, the device is not discoverable. Do the following:

  1. Make sure USB Development interface is enabled on quest. Most likely already set if the quest isn't new or factory reset
  2. Go to Quest notification menu and click on USB detected notification to allow connection
  3. Run adb devices, if device ID is shown then it should work. If restricted, then quest should have a pop up requestion USB connection again (different UI).
  4. If nothing shows, do adb kill-server then repeat step 3.

CAN Bus Settings

sjw is some bit timing parameter of CAN bus. It defaults to different value on different systems, so the scripts/configure_socketcan.sh set it to 21. This seems to be okay from testing. If you need tighter or looser clock timing (affect message errors), then adjust as needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors