Path Planning Basic

Path planning is a critical capability in robotics that enables robots to navigate safely and efficiently through complex environments while avoiding obstacles. The AI Accelerator integrates Isaac ROS cuMotion as the underlying advanced path planning technology to provide collision-free motion planning for robot applications.

This demo shows how to run a very basic example, moving the robot between two points while avoiding any obstacles defined in the collision.yaml file. For a more complete example leveraging more functionality from the AI Accelerator path planning API, check out the Advanced Path Planning Example

Running The Demo

The example should be run from inside the Jetson container which is started by running run_sdk_setup.sh as described in the SDK article.

Execute the following script to bring up the required ros2 nodes on the AI Accelerator:

./scripts/run_example_path_planning.sh

Updating the Collision Model

Warning

Please run RVIZ before running ./scripts/run_example_path_planning.sh in order to see the collision model.

This example uses a basic world collision model, that is specified in a yaml file that can be found under /data/collision.yaml. The simple world contains just a tabletop plane and a the accessories box that the power supply for your AI Accelerator compute module came in, plus some example tool collision spheres. Place the real box on the table and then open RVIZ to view the the pose of the box and confirm the pose in the collision model matches the real physical position. When you make a change to collision.yaml the visualization of the world collision model will automatically update in RVIZ, but importantly, only the visualization updates in real time. You will need to restart the ./scripts/run_example_path_planning.sh for cuMotion to take into account the updated collision geometry.

This example program does not include the commands for part attachment, so if you find that your part is colliding with the accessories box, you can either increase the height or position of the box in the collision model file for a quick fix, or dig into part attachment in the advanced path planning example. Also refer to the path planning api documentation and advanced example for how to define the tool collision spheres accurately.

Configuring the Polyscope Program

Warning

Before running the program it is highly encouraged to set joint angle limits as described in the Path Planning Advanced’s joint limits section in order to help streamline motion for cuMotion.

Allowing cumotion to utilize the full range of motion of all of the joints may lead to unexpected paths, such as large motions that rotate the base and elbow to a different configuration resulting in a large movement of the wrist joints. Large rotations of wrist joints can also lead to the camera cable getting tangled up and potentially damaged. It’s best to limit the range of each joint to say 30 degrees wider in either direction than is entirely needed to reach the known target positions.

If the ranges are too narrow to complete the desired task, you will see IK fail messages from the cuMotion node in the terminal and should then relax the limits until the task can be successfully completed.

Load the accompanying program aia_example_path_planning.urpx in Polyscope X on your robot, then set the two waypoints in the program on either side of the accessory box you have placed in the scene.

The move_path_plan command in the program will handle both sending the target to cuMotion and executing the trajectory returned.

You should then see the robot move around the box to get between the waypoints. You can then remove the box from the physical scene and comment out the box geometry in collision.yaml, restart ./scripts/run_example_dynamic_picking.sh to demonstrate that the robot now takes a more direct path between the two points.