Closed torydebra closed 3 years ago
The default gain value is given by the following code:
JointInstanceGz::JointInstanceGz(DeviceInfo devinfo,
gz::physics::JointPtr gz_joint):
BaseType(devinfo),
_gz_joint(gz_joint)
{
_tx.gain_kp = 100;
_tx.gain_kd = 5;
}
Probably it was too high for your use case scenario (involving probably very low inertias)
Yes, as you see I need like 0.1 for hands :D
Is there a reason to init it at 100 and 5 instead 0 and 0? I would expect a 0 gain if I do not set anything it in the <pid>
tag
We need a default (>0) gain setting otherwise the robot will not be able to win the gravity at the start of the simulation. Moreover this replicates the current hardware setup of the motors in our robots that start with a certain gains value.
Ok, understood. We can probably close this, then
Hi, I found out that in the urdf you have to set the pid for each non-fixed joint, otherwise they are probably set to strange value, causing the model to explode. I say this because when the pid for each joints, the model does not explode anymore:
This is not what I expect: for mimic joints, I do not want to set a pid (yes, I can set it to zero anyway).
Maybe it can be solved by initializing the pid to zero in _src/gazebo/src/joint/xbot2_gz_jointserver.cpp ? Like:
There is not a way to detect mimic joint in gazebo, the mimic tag is not supported (and they are considered as all the other active "revolute" /"prismatic")