none
none

Reputation: 555

How to programmatically modify MultibodyPlant geometric parameters in pydrake?

I'm currently loading in a URDF file of a robot, but want to be able to make modifications to geometric parameters of the MultibodyPlant object, such as changing the link lengths. What is the correct way to go about this in pydrake? I see methods like AddJoint that seem to indicate the ability to modify the robot but am unsure how to modify existing bodies within the MultibodyPlant.

Upvotes: 1

Views: 85

Answers (1)

Russ Tedrake
Russ Tedrake

Reputation: 5533

MultibodyPlant parameters (with just a few remaining exceptions) are contained as parameters in the Context. You can change them directly in the context, and therefore change the dynamics.

For a notebook that exercises this workflow, you might take a look at the Multibody parameters in Drake exercise I have here: http://underactuated.csail.mit.edu/sysid.html#example3

Upvotes: 1

Related Questions