Examples demonstrating how to use ROS2 in Python together with AGX Dynamics

The ROS2 examples are located in <agxDir>/data/python/ROS2. These examples must be started using the 'python' command.

For more information about the ROS2 functionality and how to ensure you have the correct setup environment, please read the ROS2 chapter in the User Manual

Inverted pendulum

Demonstrates how to write a controller that communicates over the ROS2 protocol.

Notice that there are two scripts, the controller (should be started first) and the simulation.

The example can be started with the command:

cmd> start inverted_pendulum_ros2_controller.py
cmd> python inverted_pendulum_ros2.py
              
inverted_pendulum

URDF Robot with ROS2 controller

This example demonstrates the use of the URDF reader for loading a robotic model from a .urdf file.

Together with a controller running in pyton, communicating over ROS2 it demonstrates the capability of robotic simulations in AGX Dynamics

There are two scripts, the simulation (should be started first in this example) and the the controller.

The example can be started with the command:

cmd> start python urdf_panda_ros2.py
cmd> python urdf_panda_ros2_controller.py
              
urdf_panda_ros2

Controlled Excavator

This example show a simulation of an excavator on a deformable terrain that is controlled using a python script over the ROS2 communication protocol

Notice that there are two scripts, the controller (should be started first) and the simulation.

The example can be started with the command:

cmd> start python excavator_terrain_ros2.py
cmd> python excavator_terrain_ros2_controller.py
              
excavator_terrain_ros2_controller