Drake
Drake C++ Documentation
ContactVisualizerParams Struct Reference

Detailed Description

The set of parameters for configuring ContactVisualizer.

#include <drake/multibody/meshcat/contact_visualizer_params.h>

Public Member Functions

template<typename Archive >
void Serialize (Archive *a)
 Passes this object to an Archive. More...
 

Public Attributes

double publish_period {1 / 32.0}
 The duration (in simulation seconds) between attempts to update poses in the visualizer. More...
 
geometry::Rgba color {0, 1, 0, 1}
 The color used to draw the point contact force arrows. More...
 
geometry::Rgba hydro_force_color {1, 0, 0, 1}
 The color used to draw the hydroelastic contact force arrows. More...
 
geometry::Rgba hydro_moment_color {0, 0, 1, 1}
 The color used to draw the hydroelastic contact moment arrows. More...
 
std::string prefix {"contact_forces"}
 A prefix to add to the path for all objects and transforms curated by the ContactVisualizer. More...
 
bool delete_on_initialization_event {true}
 Determines whether to send a Meshcat::Delete(prefix) message on an initialization event to remove any visualizations e.g. More...
 
double force_threshold {0.01}
 The threshold (in N) below which forces will no longer be drawn. More...
 
double moment_threshold {0.01}
 The threshold (in N⋅m) below which moments will no longer be drawn. More...
 
double newtons_per_meter {10}
 Sets the length scale of the force vectors. More...
 
double newton_meters_per_meter {3}
 Sets the length scale of the moment vectors. More...
 
double radius {0.002}
 The radius of cylinder geometry used in the force/moment vector. More...
 

Member Function Documentation

◆ Serialize()

void Serialize ( Archive *  a)

Passes this object to an Archive.

Refer to YAML Serialization for background.

Member Data Documentation

◆ color

geometry::Rgba color {0, 1, 0, 1}

The color used to draw the point contact force arrows.

◆ delete_on_initialization_event

bool delete_on_initialization_event {true}

Determines whether to send a Meshcat::Delete(prefix) message on an initialization event to remove any visualizations e.g.

from a previous simulation. See Declare initializationevents" for more information.

◆ force_threshold

double force_threshold {0.01}

The threshold (in N) below which forces will no longer be drawn.

The ContactVisualizer constructor enforces that this must be strictly positive; zero forces do not have a meaningful direction and cannot be visualized.

◆ hydro_force_color

geometry::Rgba hydro_force_color {1, 0, 0, 1}

The color used to draw the hydroelastic contact force arrows.

◆ hydro_moment_color

geometry::Rgba hydro_moment_color {0, 0, 1, 1}

The color used to draw the hydroelastic contact moment arrows.

◆ moment_threshold

double moment_threshold {0.01}

The threshold (in N⋅m) below which moments will no longer be drawn.

The ContactVisualizer constructor enforces that this must be strictly positive; zero moments do not have a meaningful direction and cannot be visualized.

◆ newton_meters_per_meter

double newton_meters_per_meter {3}

Sets the length scale of the moment vectors.

◆ newtons_per_meter

double newtons_per_meter {10}

Sets the length scale of the force vectors.

◆ prefix

std::string prefix {"contact_forces"}

A prefix to add to the path for all objects and transforms curated by the ContactVisualizer.

It can be an absolute path or relative path. If relative, this prefix will be appended to the geometry::Meshcat prefix based on the standard path semantics in Meshcat. See Meshcat paths for details.

◆ publish_period

double publish_period {1 / 32.0}

The duration (in simulation seconds) between attempts to update poses in the visualizer.

(To help avoid small simulation time steps, we use a default period that has an exact representation in binary floating point; see drake#15021 for details.)

◆ radius

double radius {0.002}

The radius of cylinder geometry used in the force/moment vector.


The documentation for this struct was generated from the following file: