2

I am trying to load model from urdf file.

I can achieve this via RigidBodyTree class:

rbtree = RigidBodyTree(file_name, floating_base_type)

Unfortunately, as it said at pydrake.attic reference page, it will be deprecated soon.

I tried to add model using pydrake.multibody.parsing.Parser and pydrake.multibody.plant, but it seems that model is attached only with floating quaternion joint.

Is there a legal way of setting floating base type not with attic API?

asQue
  • 49
  • 5
  • 1
    I'm not sure I understand what you're trying to achieve. Is it to use a floating roll-pitch-yaw joint rather than a quaternion joint? – Sherm Mar 15 '19 at 22:00
  • Is it possible to use fixed or roll-pitch-yaw joint without `attic` API? – asQue Mar 18 '19 at 06:08

1 Answers1

1

For a fixed base, the method you're looking for is MultibodyPlant.WeldFrames(). If plant is the MultibodyPlant object to which you've added your model, and the frame in your model named "my_base_frame" is supposed to be fixed to the world, the appropriate call would be:

plant.WeldFrames(plant.world_frame(), plant.GetFrameByName("my_base_frame"))

Note that this call should be made prior to calling plant.Finalize().

I believe that MultibodyPlant currently does not support roll-pitch-yaw floating bases.

  • Actually I am interested in Spatial Inertia Matrix of system. Maybe there is a way of converting quaternion based model to roll-pitch-yaw based one? – asQue Mar 18 '19 at 13:16
  • 1
    The n x n system mass matrix is returned in velocity space v, not configuration space q so would be the same for either type of floating joint (assuming both would use angular velocity as their generalized velocities). Is that what you're looking for or is it the 6 x 6 instantaneous System spatial inertia (also independent of the floating orientation variables)? – Sherm Mar 19 '19 at 15:17