0

I currently have a ground plane defined in sdf format with the following tags

  • <static>true</static>
  • <gravity>false</gravity>

In my source file, I specify

plant.AddForceElement<UniformGravityFieldElement>();

Question:

  1. Is the <static> and <gravity> tags respected? Or does this GravityFieldElement affect everything?
  2. If the tags are not respected, how do I prevent the GravityFieldElement from accelerating my ground plane?
Rufus
  • 5,111
  • 4
  • 28
  • 45

1 Answers1

1

One way to add a ground plane is

Vector3<double> normal_W(0, 0, 1);
Vector3<double> point_W(0, 0, 0);

const CoulombFriction<double> surface_friction(
  0.8 /* static friction */, 0.3 /* dynamic friction */);

// A half-space for the ground geometry.
plant.RegisterCollisionGeometry(
    plant.world_body(), HalfSpace::MakePose(normal_W, point_W),
    HalfSpace(), "collision", surface_friction);

// Add visual for the ground.
plant.RegisterVisualGeometry(
    plant.world_body(), HalfSpace::MakePose(normal_W, point_W),
    HalfSpace(), "visual");

And after plant.Finalize()

plant.set_penetration_allowance(0.001);

Though I'd very much like to know if there's a way to do this through sdf

Rufus
  • 5,111
  • 4
  • 28
  • 45