Skip to content

robosoft-ai/course_test_repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

course_test_repo

Let's Get Started

We begin by cloning isaac_ros_common and nova_carter repos to the src folder of our local workspace. My local workspace is ~/workspace/humble_ws

git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common.git
git clone https://github.com/NVIDIA-ISAAC-ROS/nova_carter.git

Without the nova_carter repo, the container won't run.

Workspace Operations

Create a file called .isaac_ros_common-config with the following context:

cd src/isaac_ros_common/scripts
echo -e "CONFIG_IMAGE_KEY=ros2_humble.nova_carter\nCONFIG_DOCKER_SEARCH_DIRS=(../../nova_carter/docker ../docker)" > .isaac_ros_common-config

Create a file called .isaac_ros_dev-dockerargs with the following context:

 echo -e "-v /etc/nova/:/etc/nova/\n-v /opt/nvidia/nova/:/opt/nvidia/nova/" > .isaac_ros_dev-dockerargs

Start the IsaacROSDev Container (from the workspace...)

Navigate to the workspace folder and run the folowing command...

./src/isaac_ros_common/scripts/run_dev.sh  -d  ~/workspace/cmu_ws/

Then run ls in the terminal to confirm that isaac_ros-dev is set to your host host workspace.

Installations onto the Container....

First, lets get updated...

sudo apt-get update  
rosdep update

We'll need curl too to for later when we download assets into the isaac_ros_assets folder...

sudo apt-get install -y curl jq tar

Install Jetson Stats | Source

sudo apt-get install -y ros-humble-isaac-ros-jetson-stats

Install isaac_ros_object_detection and other perception packages from Debian... (optional)

We'll start with pointcloud_to_laserscan...

sudo apt-get install -y ros-humble-pointcloud-to-laserscan

Install isaac_ros_rtdetr | Source

sudo apt-get install -y ros-humble-isaac-ros-rtdetr

Download the isaac_ros_rtdetr assets | Source

Set variables for isaac_ros_assets workspace folder...

NGC_ORG="nvidia"
NGC_TEAM="isaac"
PACKAGE_NAME="isaac_ros_rtdetr"
NGC_RESOURCE="isaac_ros_rtdetr_assets"
NGC_FILENAME="quickstart.tar.gz"
MAJOR_VERSION=3
MINOR_VERSION=2
VERSION_REQ_URL="https://catalog.ngc.nvidia.com/api/resources/versions?orgName=$NGC_ORG&teamName=$NGC_TEAM&name=$NGC_RESOURCE&isPublic=true&pageNumber=0&pageSize=100&sortOrder=CREATED_DATE_DESC"
AVAILABLE_VERSIONS=$(curl -s \
   -H "Accept: application/json" "$VERSION_REQ_URL")
LATEST_VERSION_ID=$(echo $AVAILABLE_VERSIONS | jq -r "
   .recipeVersions[]
   | .versionId as \$v
   | \$v | select(test(\"^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$\"))
   | split(\".\") | {major: .[0]|tonumber, minor: .[1]|tonumber, patch: .[2]|tonumber}
   | select(.major == $MAJOR_VERSION and .minor <= $MINOR_VERSION)
   | \$v
   " | sort -V | tail -n 1
)
if [ -z "$LATEST_VERSION_ID" ]; then
   echo "No corresponding version found for Isaac ROS $MAJOR_VERSION.$MINOR_VERSION"
   echo "Found versions:"
   echo $AVAILABLE_VERSIONS | jq -r '.recipeVersions[].versionId'
else
   mkdir -p ${ISAAC_ROS_WS}/isaac_ros_assets && \
   FILE_REQ_URL="https://api.ngc.nvidia.com/v2/resources/$NGC_ORG/$NGC_TEAM/$NGC_RESOURCE/\
versions/$LATEST_VERSION_ID/files/$NGC_FILENAME" && \
   curl -LO --request GET "${FILE_REQ_URL}" && \
   tar -xf ${NGC_FILENAME} -C ${ISAAC_ROS_WS}/isaac_ros_assets && \
   rm ${NGC_FILENAME}
fi

Now download the pre-trained Nvidia SyntheitcaDETR models...

mkdir -p ${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr && \
cd ${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr && \
  wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/synthetica_detr/versions/1.0.0_onnx/files/sdetr_grasp.onnx'

mkdir -p ${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr && \
cd ${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr && \
  wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/synthetica_detr/versions/1.0.0_onnx/files/sdetr_amr.onnx'

Then we'll convert the encrypted model (.etlt) to a TensorRT engine plan and drop it in the isaac_ros_assets/models/synthetica_detr folder...

/usr/src/tensorrt/bin/trtexec --onnx=${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr/sdetr_grasp.onnx --saveEngine=${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr/sdetr_grasp.plan
/usr/src/tensorrt/bin/trtexec --onnx=${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr/sdetr_amr.onnx --saveEngine=${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr/sdetr_amr.plan

Then get back to the workspace...

cd /workspaces/isaac_ros-dev/

and install this package so you can test your vision pipeline later...

sudo apt-get install -y ros-humble-isaac-ros-examples

To test this section use this IsaacSim Tutorial

Install isaac_ros_yolov8 | Source

sudo apt-get install -y ros-humble-isaac-ros-yolov8 ros-humble-isaac-ros-dnn-image-encoder ros-humble-isaac-ros-tensor-rt

Download the isaac_ros_yolov8 assets | Source

NGC_ORG="nvidia"
NGC_TEAM="isaac"
PACKAGE_NAME="isaac_ros_yolov8"
NGC_RESOURCE="isaac_ros_yolov8_assets"
NGC_FILENAME="quickstart.tar.gz"
MAJOR_VERSION=3
MINOR_VERSION=2
VERSION_REQ_URL="https://catalog.ngc.nvidia.com/api/resources/versions?orgName=$NGC_ORG&teamName=$NGC_TEAM&name=$NGC_RESOURCE&isPublic=true&pageNumber=0&pageSize=100&sortOrder=CREATED_DATE_DESC"
AVAILABLE_VERSIONS=$(curl -s \
    -H "Accept: application/json" "$VERSION_REQ_URL")
LATEST_VERSION_ID=$(echo $AVAILABLE_VERSIONS | jq -r "
    .recipeVersions[]
    | .versionId as \$v
    | \$v | select(test(\"^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$\"))
    | split(\".\") | {major: .[0]|tonumber, minor: .[1]|tonumber, patch: .[2]|tonumber}
    | select(.major == $MAJOR_VERSION and .minor <= $MINOR_VERSION)
    | \$v
    " | sort -V | tail -n 1
)
if [ -z "$LATEST_VERSION_ID" ]; then
    echo "No corresponding version found for Isaac ROS $MAJOR_VERSION.$MINOR_VERSION"
    echo "Found versions:"
    echo $AVAILABLE_VERSIONS | jq -r '.recipeVersions[].versionId'
else
    mkdir -p ${ISAAC_ROS_WS}/isaac_ros_assets && \
    FILE_REQ_URL="https://api.ngc.nvidia.com/v2/resources/$NGC_ORG/$NGC_TEAM/$NGC_RESOURCE/\
versions/$LATEST_VERSION_ID/files/$NGC_FILENAME" && \
    curl -LO --request GET "${FILE_REQ_URL}" && \
    tar -xf ${NGC_FILENAME} -C ${ISAAC_ROS_WS}/isaac_ros_assets && \
    rm ${NGC_FILENAME}
fi

To test this section use this Quickstart Tutorial

Assemble the Workspace

Clone the Application Repos into the src folder...

git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_visual_slam.git
git clone https://github.com/NVIDIA-ISAAC-ROS/realsense-ros

Build Workspace

Ok, now you're ready to compile everything...

source /opt/ros/humble/setup.bash
rosdep update
rosdep install --ignore-src --from-paths src -y -r
colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF

Launch Application

Source the workspace...

source install/setup.bash
ros2 launch jetbot_control_pkg control.launch.py 
ros2 run jetbot_control_pkg motor.py
ros2 launch jetbot_control_pkg isaac_ros_yolov8_visualize.launch.py 

Test Commands

ros2 topic echo /detections_output

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published