Skip to content

Exercise 1.5 Build Action Graph for robot camera

Documentation - Link

Cheat-file (course_env_5.usd)

You can access a pre-populated environment at /home/nvidia/Desktop/Isaac_ROS_Isaac_SIM_[DLIT61534]/Isaac Sim Assets Pack 1/Assets/Isaac/2023.1.1/Isaac/Environments/Simple_Warehouse/course_env_5.usd

alt text

Step 1. Open Visual Scripting

Go to Window > Visual Scripting > Action Graph.

alt text

Step 2. Create new Action Graph

Click on the New Action Graph icon in the middle of the Action Graph window.

alt text

Step 3. Build graph

Search the relevant nodes in the search bar and build the graph shown below.

alt text

Action Graph components

Note

For clarity, you can visually divide the graph into two sections: one for the left camera and the other for the right camera, as depicted in the image below.

alt text

Step 4. Set the node properties

  1. [Optional] Assign ROS DOMAIN ID if needed using ROS2 Context Node.

    alt text

  2. Assign the left camera Prim to render camera data in the first Isaac Create Render Product Node.

    alt text

    Select the target for left camera

    alt text

    After selecting the target, cameraPrim parameter will be populate with this path for the left camera:

    • /World/turtlebot3_burger/base_scan/rsd455/RSD455/Camera_OmniVision_OV9782_Left
  3. Assign the right camera Prim to render camera data in the second Isaac Create Render Product Node.

    alt text

    Select the target for right camera

    alt text

    After selecting the target, cameraPrim parameter will be populate with this path for the right camera:

    • /World/turtlebot3_burger/base_scan/rsd455/RSD455/Camera_OmniVision_OV9782_Right

    alt text

  4. Set the input value of the first Constant String node as the left camera name - "Camera_OmniVision_OV9782_Left"

    alt text

  5. Set the input value of the second Constant String node as the right camera name - "Camera_OmniVision_OV9782_Right"

    alt text

  6. Set the topicName and data type for each ROS2 Camera Helper Node. In this example, we'll utilize two topics (camera_info and rgb) for each camera (left and right), requiring a total of 4 ROS2 Camera Helper Nodes as depicted above. Set the topics for each ROS2 camera node as follows:

    • topicName : /front/stereo_camera/left/camera_info
    • type : camera_info

    alt text

    • topicName : /front/stereo_camera/left/rgb
    • type : rgb

    alt text

    • topicName : /front/stereo_camera/right/camera_info
    • type : camera_info

    alt text

    • topicName : /front/stereo_camera/right/rgb
    • type : rgb

    alt text

Info

If you plan to continue working on the later exercise using the environment you have been working on, save the environment file by selecting File > Save As... or Ctrl+Shift+S.

Tip

In case you run into OOM (out of memory) issue, you should try lowering the camera rendering resolution.

For each Isaac Create Render Product node, lower the values for height and width in Inputs pane.

alt text

Make sure to perform this for both nodes, one for the left camera, one for the right camera.

Step 5. Play

Click "Play" icon

Step 6. Verification

Verify the Action Graph by viewing the simulated world through robots cameras using ROS 2.

Open a terminal and source ros2

source /opt/ros/humble/setup.bash

Open RViz2 to visualize the output from the camera

rviz2
  1. Once the RViz window opens, click on "Add."

    alt text

  2. Select "Image" and hit "OK" to visualize the output

    alt text

  3. Choose the appropriate ROS2 topic to display its output on the selected display.
    In our case it would be /front/stereo_camera/right/rgb or /front/stereo_camera/left/rgb

    alt text

Next

  1. Start the Foxglove Bridge

    ros2 launch foxglove_bridge foxglove_bridge_launch.xml
    
  2. Then start the Foxglove Studio from GUI or CUI.

    foxglove-studio
    
  3. Click on "Open connection"

    alt text

    Select "Foxglove WebSocket", leave the WebSocket URL as ws://localhost:8765 and click on "Open".

    alt text

  4. Layout

    Import the layout config file we provide, so you have all the widgets needed to control the robot with the camera feeds.
    Open foxglove_fpv_layout.json in home directory.

    alt text

  5. Once Foxglove is ready, on Isaac Sim, hit "Play" button.

  6. Perform teleop with video feeds to verify both Action Graphs

    You should be able to control the robot using the teleop widget while viewing the images from robot cameras in Foxglove.

Next