Hi @nwagwu, there are other controllers (e.g. PID, velocity) for each joint and it is possible to implement additional custom controllers. Stretch’s controllers are implemented in its firmware.
If you wanted to implement custom controllers for Stretch’s four main joints, you’d start by writing a firmware implementation for the controller. For the Dynamixel joints, its controllers are implemented in the Dynamixel firmware.
Next, you’d use the Python library, Stretch Body, to use these controllers through Python. To use one of the existing controllers (e.g. trapezoidal, velocity, PID), you can use the existing Python API. The following links should be helpful:
- Commanding velocity to the arm and lift - #2 by bshah
- About stretch_body interface - #2 by aedsinger
- Creating smooth motion using trajectories
- How to use trajectory control for the mobile base on stretch_body?
- stretch_body/body/stretch_body/stepper.py at master · hello-robot/stretch_body · GitHub
Only a subset of the controllers are exposed at the ROS layer. But since Stretch ROS is built on Stretch Body, it’s always possible to create an API for them at the ROS layer. Currently, “position” mode in the driver maps to the trapezoidal motion profile controller, and “navigation” mode changes the mobile base to the velocity controller.
Let me know if you have any questions!