Note: Before you begin, verify that you have sufficient storage space available on your device (At least 30 GB).
On Jetson Xavier platforms, an external drive is required to have enough storage space. Follow the instructions in Jetson Xavier AGX SD card Setup to configure the storage
-
Configure
nvidia-container-runtimeas the default runtime for Docker.Using your text editor of choice, add the following items to
/etc/docker/daemon.json.{ ... "runtimes": { "nvidia": { "path": "nvidia-container-runtime", "runtimeArgs": [] } }, "default-runtime": "nvidia" ... } -
Then, restart Docker:
sudo systemctl daemon-reload && sudo systemctl restart docker -
Install Git LFS in order to pull down all large files:
sudo apt-get install git-lfs
git lfs install
-
Navigate to
srcNote: Remember to replace <path-to-mfi_amr_ws> with the correct path in the following command.
cd <path-to-mfi_amr_ws>/src
-
Install vcstool -
curl -s https://packagecloud.io/install/repositories/dirk-thomas/vcstool/script.deb.sh | sudo bash sudo apt-get update sudo apt-get install python3-vcstool -
Clone all required repos using
vcstool-- isaac_ros_common
- realsense (4.51.1)
vcs import < ros2.repos -
Clone the
librealsenserepo setup udev rules. Remove any connected relasense cameras when prompted:cd /tmp && \ git clone https://github.com/IntelRealSense/librealsense && \ cd librealsense
sudo ./scripts/setup_udev_rules.sh
-
Configure the container created by
isaac_ros_common/scripts/run_dev.shto includelibrealsense. Create the.isaac_ros_common-configfile in theisaac_ros_common/scriptsdirectory:Note: Remember to replace the two instances of <path-to-mfi_amr_ws> with the correct path in the following command.
cd <path-to-mfi_amr_ws>/src/isaac_ros_common/scripts && \ touch .isaac_ros_common-config && \ echo CONFIG_IMAGE_KEY=foxy.realsense_custom.mfi_amr > .isaac_ros_common-config && \ echo CONFIG_DOCKER_SEARCH_DIRS="(<path-to-mfi_amr_ws>/docker)" >> .isaac_ros_common-config
-
Create alias to launch the docker container
Note: Remember to replace the two instances of <path-to-mfi_amr_ws> with the correct path.
Edit the /etc/bash.bashrc file using sudo nano /etc/bash.bashrc and add an entry as follows - .
alias ros2_foxy_docker="cd <path-to-mfi_amr_ws>/src/isaac_ros_common && ./scripts/run_dev.sh <path-to-mfi_amr_ws>"Then, run this command to source the bashrc
source /etc/bash.bashrc- Launch the docker container using the
run_dev.shscript. If you run this command twice then the script will just attach a new shell to the existing container.
ros2_foxy_docker- Build workspace using
colcon build
colcon build --packages-skip-regex isaac_ros*Then, run this command -
source install/setup.bash- Testing Velodyne VLP16
Run the following command in the container -
ros2 launch velodyne velodyne-all-nodes-VLP16-launch.pyRun the following command to check the frequency of the point cloud topic. You should see an average rate of 10 if everything goes well.
ros2 topic hz /velodyne_points- Testing realsense installation:
Note: Plug in your realsense camera before launching the docker container.
ros2 launch realsense2_camera rs_launch.pyRun the following command to check the frequency of the rgb and depth image topic. You should see an average rate greater than 10 if everything goes well.
ros2 topic hz /camera/color/image_rawros2 topic hz /camera/depth/image_rect_rawTo automount the SD card, an entry with a reference to the device path or UUID of the device has to be added in fstab ( File System Table ) file.
Run this command to identify the attached device and note its UUID.
sudo blkidEdit the fstab file by executing the following command in the terminal. Add an entry similar to the one below after changing the UUID.
sudo nano /etc/fstabUUID=<put-UUID-here> /mnt ext4 defaults 0 0
You should already have Docker and VSCode with the remote containers plugin installed on your system.
Steps to connect to container -
- Launch the container using
ros2_foxy_docker - Launch VS code and click on
Open a Remote Windowtowards the bottom left corner - Choose
Attach to a Running Container - Select the appropriate container (
isaac_ros_dev*) - Set working directory to
/workspaces/isaac_ros-devin VS Code
If you require installing any packages add them to the Dockerfile.
If you require building them then add them to ros2.repos and use vcstool to manage them
- Every time we execute the
ros2_foxy_docker, it will automatically build the Docker image if any modifications are detected in the dockerfile. - If there is a need to install external dependencies, by adding those to the Dockerfile (docker/Dockerfile.mfi_amr) and pushing the updates to github, we can ensure that these dependencies are accessible to all development environments.
- You can follow the template present in Dockerfile as a starting point to add any dependencies.
We can use tree types of branches - master, devel, feat, hotfix as follows (Reference)
- A
develbranch is created frommaster featbranches are created fromdevel- When a
featis complete it is merged into thedevelbranch - After milestone demonstrations,
develis merged intomaster - If an issue in
masteris detected ahotfixbranch is created frommaster - Once the
hotfixis complete it is merged to bothdevelandmaster
Good practices related to commits -
- Include the ROS2 package names in the commit message e.g. "[mapping] some change"
- If possible, include only changes to a single package in a commit
- Break down large changes into smaller commits