Create ROS Graphs for Nova Carter#
Overview#
We’re now going to focus on establishing a seamless connection between the Nova Carter robot in Isaac Sim and ROS through the creation of Action Graphs. In this module, we generate and configure several graph components that enable the robot to communicate sensor data, control commands, and state information with ROS. We use built-in shortcuts to create ROS-compatible graphs that streamline these interactions.
Publishing a Lidar Graph#
We will start by publishing the synthetic lidar pointcloud generated by Isaac Sim to ROS.
In Isaac Sim, go to File > Open
Open the Nova Carter robot from the course assets:
Starting_Point/nova_carter.usd.Navigate to Tools > Robotics > ROS 2 OmniGraphs > RTX Lidar. This shortcut simplifies the process of adding a Lidar graph.
In the window that appears, set the Graph Path to:
/nova_carter/chassis_link/sensors/XT_32/ROS_LidarRTXFor the Lidar Prim, click Add and select the PandarXT_32_10hz prim at :
/nova_carter/chassis_link/sensors/XT_32/PandarXT_32_10hzPress Select to confirm.
Note
The paths are important here, because they will be used for namespacing later.
Set the Frame ID to: front_3d_lidar.
Uncheck the box for Laser Scan, as it is not needed for this configuration.
Check the box for Point Cloud to enable publishing point cloud data.
Press OK.
You have successfully integrated a Lidar sensor into your simulation environment, preparing it for real-time interaction with ROS nodes in subsequent modules. Next, we’ll look at the graph we just created.
Reviewing the Generated Action Graph#
We’ve used the shortcut tool to create and configure a ROS-compatible Lidar sensor. Next, let’s take a look at the Action Graph which runs this sensor. Action Graphs are event-driven tools for visual programming.
Find the lidar Action Graph in the Stage panel: /nova_carter/chassis_link/sensors/XT_32/ROS_LidarRTX.
Right-click on ROS_LidarRTX, then select Open Graph.
Finally to complete the setup, select the ROS2 RTX Lidar Helper node
In the Property panel, set the Reset Time On Stop property to True.
Important
This setting is key because we would like the clock to start from 0.0 every time the simulation is reset.
Save your file by going to File > Save As. Name the file nova_carter_ROS.usd and save it under
Starting_Pointfolder inside the course assets.
This graph is now ready to publish synthetic point cloud data from Isaac Sim to ROS, enabling downstream robotics applications like mapping and obstacle detection.
Let’s keep going and make the robot start moving.
Create Twist Subscriber#
In this section, we will create a ROS-compatible Twist subscriber for the Nova Carter robot. This will allow the wheels to be driven through ROS messages.
Navigate to Tools > Robotics > OmniGraph Controllers > Differential Controller.
This tool provides a preconfigured graph for controlling differential drive robots.
In the dialog window, set the following parameters:
Graph Path: /nova_carter/differential_controller
Robot Prim: /nova_carter.
Wheel Radius: 0.14
Distance Between Wheels: 0.413
Right Joint Name: joint_wheel_right
Left Joint Name: joint_wheel_left
Press OK to create the graph.
Right-click on the newly created graph in the Stage Tree and select Open Graph.
Adding ROS 2 Nodes to the Graph#
Let’s build upon our Action Graph that uses a Differential Controller to move the Nova Carter robot, using messages from ROS.
Add the following nodes to the graph. To add nodes, use the panel on the left side of the Action Graph panel to locate them, then click and drag onto the main area of the Action Graph.
Tip
You can search in the Nodes panel to quickly locate desired nodes.
ROS2 Context Node
ROS2 Subscribe Twist Node
Two instances of the Break 3-Vector Node
Connect the node inputs and output as follows:
Connect the On Playback Tick output to ROS 2 Subscribe Twist: Exec In input.
Connect ROS 2 Context: Context output to ROS 2 Subscribe Twist: Context input.
Connect ROS 2 Subscribe Twist Angular Velocity output to one of the Break 3-Vector nodes’ inputs.
Connect ROS 2 Subscribe Twist Linear Velocity to the other Break 3-Vector node’s input.
From the Break 3-Vector nodes:
Connect Z of the node coming from Angular Velocity to Desired Angular Velocity on the Differential Controller.
Connect X of node coming from Linear Velocity to Desired Linear Velocity on the Differential Controller.
Connect On Playback Tick’s Delta Seconds output to Dt input on the Differential Controller.
Ensure that the output array names for left and right wheels match your robot’s configuration. Select the Make Array node and look in the Property panel for Construct Array Node > Inputs. Compare with the image below.
Save your work.
This setup allows Nova Carter to interpret Twist messages from ROS and convert them into physical motion within Isaac Sim.
Verify connections#
Let’s run a quick test to verify the Action Graphs work as expected.
Before running any commands, ensure that the ROS_DOMAIN_ID environment variable is set.
export ROS_DOMAIN_ID=42 # Replace number with your own station number
Run teleop_twist_keyboard node to verify robot moves:
source /opt/ros/humble/setup.bash
ros2 run teleop_twist_keyboard teleop_twist_keyboard
In another terminal, open RViz2 to visualize the lidar sensor data.
source /opt/ros/humble/setup.bash
# cd into the course materials folder
rviz2 -d sim_control_script_and_carter_ws/ros_ws/src/carter_navigation/rviz2/visualize_sensors.rviz
Verify Functionality#
Press the Play button in Isaac Sim to activate the publisher.
Open a ROS-sourced terminal and run the following command:
ros2 topic list
Confirm that /joint_states is listed among the available topics.
By completing this section, you have successfully set up a Joint State Publisher for Nova Carter, enabling seamless communication of its joint states with ROS.
Remember to save the robot file.
Review#
In this module, we successfully created and configured ROS Action Graphs for the Nova Carter robot, including the Lidar graph, Twist subscriber, and Odometry publisher, Joint state publisher. These graphs enable Nova Carter to interact with ROS by publishing sensor data, receiving motion commands, and sharing odometry information.
With these foundational components in place, Nova Carter is now ready to perform advanced tasks such as navigation and mapping in subsequent modules.
Let’s move forward and continue building on this solid groundwork!
Checkpoint 1
The robot file should now be saved.
The backup robot file is located in the course assets folder under: /Backup/nova_carter_ROS.usd.
If you need to use the backup robot USD file, copy and replace it into the Starting Point folder at: Starting_Point/nova_carter_ROS.usd.