Add motor with JointController
23pointsNorth opened this issue · comments
Is your feature request related to a problem? Please describe.
Currently, when using [Add Motor], any of the selected options (that I've tried) generate a JointPositionController like:
<plugin filename="gz-sim-joint-position-controller-system" name="gz::sim::systems::JointPositionController">
<joint_name>arm_joint</joint_name>
<p_gain>20.00000</p_gain>
<i_gain>0.00000</i_gain>
<d_gain>0.00000</d_gain>
</plugin>
From the ls usr/lib/gz.../plugins | grep controller
, we can see that there exist these options:
libgz-sim-joint-controller-system.so
libgz-sim-joint-position-controller-system.so
libgz-sim-joint-trajectory-controller-system.so
libgz-sim-track-controller-system.so
Describe the solution you'd like
Thus, wanting to use a JointController, I have to manually substitute the controllers for the joint names as e.g.:
<plugin filename="gz-sim-joint-controller-system" name="gz::sim::systems::JointController">
<joint_name>arm_joint</joint_name>
<topic>/joints/arm/cmd_vel</topic>
</plugin>
with optionally being able to select vel/force control.
Describe alternatives you've considered
sed
/re
sdf file for the controllers.
@23pointsNorth It was intended that a position motor generates a JointPositionController and force and velocity motors generate JointControllers. I fixed this in the last commit. Does this satisfy your needs or do you need the other controllers, too?