2

I'm trying to make a ball roll on a plane, so I created a planar joint between the ball and the plane. When I create a transmission to apply a force for this joint, I get the error: SystemExit: Failure at bazel-out/k8-opt/bin/multibody/plant/_virtual_includes/multibody_plant_core/drake/multibody/plant/multibody_plant.h:1135 in AddJointActuator(): condition 'joint.num_velocities() == 1' failed.

It seems like the joint has to only have one degree of freedom. Is there a way to fix this or replace it with two different joints?

The code I have right now is

ball_joint = """
  <joint name="ball_joint" type="planar">
    <parent link="world" />
    <child link="ball" />
    <axis xyz="0 0 1" />
  </joint>
"""

transmission = """
  <transmission type="SimpleTransmission" name="ball_force">
    <actuator name="force" />
    <joint name="ball_joint" />
    <mechanicalReduction>1</mechanicalReduction>
  </transmission>
"""
Ben Kang
  • 21
  • 3

1 Answers1

1

You can't currently actuate planar joints. The canonical way to do that now is to create a chain of joints (with zero-mass links in between): world->prismatic->zero_mass->prismatic->zero_mass->revolute->ball. Then you've got the three dofs you need to actuate (all as single-dof joints).

Sean Curtis
  • 1,425
  • 7
  • 8