2

I've constructed an MBP with two objects, A (welded to world) and B (unwelded). B sits on top of A. After simulating for a while, I'd like to remove A (or otherwise disable contact) to allow B to begin falling.

It seems I should be able to do this by either (1) changing collision filtering on the fly or by (2) changing the pose of the weld joint. Haven't investigated (1), but (2) seems to be out- there does not appear to be a way to alter the pose of a weld after construction. True? If true, why not?

3 Answers3

1

Currently you can achieve this by making one of the frames of the weld joint a FixedOffsetFrame and modifying the parameters of that. Here's a snippet with an example:

// Weld body B to body A and move body B.

// Original transform for the weld between body_A and body_B
math::RigidTransform<double> X_AB(...);

const FixedOffsetFrame<double>& frame_on_A = plant->AddFrame(
    std::make_unique<FixedOffsetFrame<double>>(body_A.body_frame(), X_AB));

plant->WeldFrames(frame_on_A, body_B.body_frame());

// ... create a context and simulate ...

// New transform for the weld between body_A and body_B
math::RigidTransform<double> X_AB_new(...)

frame_on_A.SetPoseInBodyFrame(context, X_AB_new);

I'll work on #13520 to make this more convenient by changing a parameter on the weld joint itself.

0

We do not have the capability to modify a weld joint pose yet. See issue #13520.

Alejandro
  • 1,064
  • 1
  • 8
  • 22
  • Per discussion with Alejandro, it seems that (1) isn't feasible at the moment either :( See: https://github.com/RobotLocomotion/drake/blob/dd18fde30250c0a7e89a436cd3f73e4c6ce948d5/geometry/scene_graph.h#L848 – Evan Drumwright Mar 19 '21 at 16:41
  • There's currently no ability to *remove* filters. However, the feature is currently in development and we expect the ability to add/remove collision filter pairs should arrive soon. – Sean Curtis Mar 22 '21 at 12:46
0

Perhaps consider using the LinearBushingRollPitchYaw and change the translational and rotational stiffness/damping from stiff values to 0.

For how to pick values to emulate a weld: https://drake.mit.edu/doxygen_cxx/classdrake_1_1multibody_1_1_linear_bushing_roll_pitch_yaw.html#Basic_bushing_torque_stiffness_and_damping

Joe Masterjohn may know if there is a way to example of how to parameterize the bushing.

Mitiguy
  • 136
  • 4