Project Goal: create a controller for balancing an inverted pendulum on a cart.
Githut repo here:
https://github.com/agillies8/pendulum_sim
CAD here:
Features include:
pendulum simulated in omniverse
pendulum visualized in rviz
CAD from Onshape
URDF exported from ros, also in a USD
Angle of pendulum plotted vs time
- 5 types of controllers:
Human teleop
- Linear classic - in progress -
- Model based RL
RL based on state feedback
- RL via camera observing the scene
Steps:
Step 1: Base setup:
- Install omniverse and ROS2. Then take some tutorials. This is a whole thing. More notes here:
- Create CAD of the pendulum
- Export the pendulum to a URDF
- Launch the URDF so it is available in Rviz
- Convert the URDF to a USD and make available in omniverse
- Control the pendulum base in omniverse from ROS2 teleop
- Receive feedback of the pendulum angle in ros2
- Have the URDF in Rviz reflect the state of the pendulum in omniverse
Step 2: Classic controller:
- Model the physical system and come up with control policy
- Side journey, calculating velocities for the state vector:
- have the pendulum self-balance, eg, troubleshooting the controller.
- Implementing the controller directly in Isaac Sim
Step 3: RL controller
For the RL controller, kicking it up a notch and using a double pendulum, since the single pendulum case is covered pretty thoroughly in a RL tutorial, and seems a super easy policy to learn.
Before starting, I created a new double pendulum URDF form Onshape, and getting it back into isaac sim.
- A few notes worth covering on that:
RL Approaches:
Approach using Isaac Lab
Approach of using cindy: