-
Notifications
You must be signed in to change notification settings - Fork 50
DetachableJoint: allow physics constraint properties to be set #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gz-physics8
Are you sure you want to change the base?
DetachableJoint: allow physics constraint properties to be set #754
Conversation
- Use gazebosim/gz-physics#754 - Use gazebosim/gz-sim#2960 Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
RotorHead - Adjust pose of model in world - Add further links and joints. - Add lever coupling links and joints. - Simplify collisions. - Compose ball joint from 2 revolute joints. - Simplify collisions for linkages. - Ensure all ball joints have 3DoF - Add servo linkage visuals. - Limit movement of lever joints. - Lever coupling top joints are revolute, not ball. - Add guide rod and retainer to prevent lower swashplate rotation. - Update friction and damping. - Recompute ball joint inertials. - Add servos and rods. - Update joint damping. - Update link and joint names. - Align swashplate joints. - Replace collision guide with joints. - Add rotor blades. - Add lift-drag plugins. - Correct joint orientations. - Reorient servo links. - Reduce mass of rotor head. - Adjust rotor lift-drag. - Rename rotor head model - Add ccw version of rotor head. - Update orientation in ccw rotor head. - Velocity controllers were not using force and PIDs - Update PIDs for joint and position controllers. - Fit lift-drag coefficients to NACA0012 profile. - Add blade visuals for CW and CCW rotors. - Move servo2 to be near centre of rotor head. - Remove debug info. - Remove debug colours of servo rods and joints. - Add credit for visuals Helicopter - Add helicopter model in world. - Add tail rotor. - Add stabiliser bars and wheels. - Add ArduPilot plugin. - Swap servo_1 and servo_3 to be consistent with AP ordering. - Adjust CoG. - Adjust IMU position to main rotor. - Add separate model and config files. - Use standalone model for helicopter. - Place on runway model. - Rename helicopter world - Update to SDF version 1.11 - Add intermeshing dual rotor example. - Add meshes. - Increase friction on stabilizers. - Correct orientation of tail rotor blade visual and collision. - Correct dual heli control elements. - Increase mass of base link for dual heli. - Add params for dual transverse helicopter. - Add gimbal for testing attitude control. - Allow blades to flap on rotor heads - This is essential for correct operation. - Blades hinge at blade grips with range +/- 8 deg. - Adjust blade flapping damping and spring constant. - Remove oscillation / resonance when rolling at higher collective. - Reduce blade hinge spring stiffness. - Set ball joint properties - Use gazebosim/gz-physics#753 - Set physics params in detachable joints - Use gazebosim/gz-physics#754 - Use gazebosim/gz-sim#2960 - Adjust flapping hinge position - Move hinge towards rotor hub. - This position gives a flapping lag of about 80 deg behind the blade pitch. - Retune ATC_RAT PIDs for flapping blades. - Add visuals for frame and rotors - Add mesh visuals based on TRex-450. - Remove stabilising links and wheels. - Reposition tail rotor to match rescaled model. - Update rotor velocity command topic. - Add config for the ros_gz bridge - Retune model for adjusted CoM and tail position - Add credit for visuals Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
RotorHead - Adjust pose of model in world - Add further links and joints. - Add lever coupling links and joints. - Simplify collisions. - Compose ball joint from 2 revolute joints. - Simplify collisions for linkages. - Ensure all ball joints have 3DoF - Add servo linkage visuals. - Limit movement of lever joints. - Lever coupling top joints are revolute, not ball. - Add guide rod and retainer to prevent lower swashplate rotation. - Update friction and damping. - Recompute ball joint inertials. - Add servos and rods. - Update joint damping. - Update link and joint names. - Align swashplate joints. - Replace collision guide with joints. - Add rotor blades. - Add lift-drag plugins. - Correct joint orientations. - Reorient servo links. - Reduce mass of rotor head. - Adjust rotor lift-drag. - Rename rotor head model - Add ccw version of rotor head. - Update orientation in ccw rotor head. - Velocity controllers were not using force and PIDs - Update PIDs for joint and position controllers. - Fit lift-drag coefficients to NACA0012 profile. - Add blade visuals for CW and CCW rotors. - Move servo2 to be near centre of rotor head. - Remove debug info. - Remove debug colours of servo rods and joints. - Add credit for visuals Helicopter - Add helicopter model in world. - Add tail rotor. - Add stabiliser bars and wheels. - Add ArduPilot plugin. - Swap servo_1 and servo_3 to be consistent with AP ordering. - Adjust CoG. - Adjust IMU position to main rotor. - Add separate model and config files. - Use standalone model for helicopter. - Place on runway model. - Rename helicopter world - Update to SDF version 1.11 - Add intermeshing dual rotor example. - Add meshes. - Increase friction on stabilizers. - Correct orientation of tail rotor blade visual and collision. - Correct dual heli control elements. - Increase mass of base link for dual heli. - Add params for dual transverse helicopter. - Add gimbal for testing attitude control. - Allow blades to flap on rotor heads - This is essential for correct operation. - Blades hinge at blade grips with range +/- 8 deg. - Adjust blade flapping damping and spring constant. - Remove oscillation / resonance when rolling at higher collective. - Reduce blade hinge spring stiffness. - Set ball joint properties - Use gazebosim/gz-physics#753 - Set physics params in detachable joints - Use gazebosim/gz-physics#754 - Use gazebosim/gz-sim#2960 - Adjust flapping hinge position - Move hinge towards rotor hub. - This position gives a flapping lag of about 80 deg behind the blade pitch. - Retune ATC_RAT PIDs for flapping blades. - Add visuals for frame and rotors - Add mesh visuals based on TRex-450. - Remove stabilising links and wheels. - Reposition tail rotor to match rescaled model. - Update rotor velocity command topic. - Add config for the ros_gz bridge - Retune model for adjusted CoM and tail position - Add credit for visuals Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
- Use gazebosim/gz-physics#754 - Use gazebosim/gz-sim#2960 Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
- Use gazebosim/gz-physics#754 - Use gazebosim/gz-sim#2960 Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
cc @scpeters in case you have opinions on these APIs. There are some merge conflicts that need to be resolved otherwise looks good to me. |
- Allow the constraint force mixing and error reduction parameters to be set on detachable joints. Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
169b173
to
03b126c
Compare
Resolved in 03b126c |
@osrf-jenkins run tests please |
{ | ||
/// \brief Set dynamic joint constraint properties. | ||
public: template <typename PolicyT, typename FeaturesT> | ||
class Link : public virtual Feature::Link<PolicyT, FeaturesT> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from an API perspective, it seems odd that this is a Link
API and not a Joint
API. I can see from the implementation that it is more convenient this way, but I think it would be cleaner as a Joint
method
if it's not currently possible, we should open an issue about that
void JointFeatures::SetConstraintForceMixing(const Identity &_childID, | ||
double _value) | ||
{ | ||
auto linkInfo = this->ReferenceInterface<LinkInfo>(_childID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we pass a joint ID instead of the child link ID, I think we could extract the child LinkInfo using the same approach as in DetachJoint
🎉 New feature
Allow the joint constraint physics parameters constraint force mixing (cfm) and error reduction parameter (erp) to be set via
Features
. Here the parameters only apply to dynamically created joints in thedartsim
engine, although the features are declared generally.The parameters are not documented in the
dartsim
manual and must be inspected in the source code. They appear to be defined similarly to the parameters with the same name in ODE https://ode.org/wiki/index.php/Manual#Soft_constraint_and_Constraint_Force_Mixing_(CFM).The parameters allow finer control over the simulation of the weld joints created using the detachable joint system. This is relevant when creating closed kinematic chains, where in some cases the constraint forces and error reduction iterations must be increased in order for the model to maintain integrity (i.e. prevent joints flying apart).
In
dartsim
these parameters are declared as class variables forDyanamicJointConstraints
, so setting them on one detachable joint affects all others. Other physics engines may treat this differently.Related:
Summary
SetDynamicJointConstraintPropertiesFeature
AttachFixedJoint
this is a Link feature (the weld constraints belong to the link).Test it
gz-sim
: DetachableJoint: allow physics constraint properties to be set gz-sim#2960Checklist
codecheck
passed (See contributing)Generated-by: Remove this if GenAI was not used.
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
andGenerated-by
messages.