Closed ShaneRozenLevy closed 2 years ago
@ethanmusser @jdcaporale
So currently the robot base contains a vector of JointsBase
. I'm wondering how y'all would feel about making the RobotBase
templated for the type of joint? The setting of pd gains and target is done is a fairly moteus specific manner which I feel requires access to the JointMoteus
Thoughts?
I guess the other option would be specify a standard interface for setting pd information where the joint base would have the following functions:
set_kp
set_kd
set_position_target
set_velocity_target
set position target and set velocity target are easy. The set_kp
and set_kd
will be somewhat problematic to implement since the moteus would still require access to the kp and kd scales rather than the gains. To calculate the scales the user would need to set the internal pd gains for the moteus in their c++ code. Thoughts?
Got everything working. I don't think we add an example for this since it relies on configuring the moteus in a non standard fashion.
We have wanted the ability to use the moteus's internal pd loop for a long time. This PR should enable us to send PD setpoints and to use the kp and kd scale to control the moteus.
One gotcha with the way moteus does its internal pd loop is that you can't set the gains over CAN, you can only set the scale of the gain (0-1), which means that the configuration of the moteus becomes more important.
Todo