Drake
Drake C++ Documentation
drake::manipulation::schunk_wsg Namespace Reference

Classes

class  MultibodyForceToWsgForceSystem
 Extract the gripper measured force from the generalized forces on the two fingers. More...
 
class  SchunkWsgCommandReceiver
 Handles the command for the Schunk WSG gripper from a LcmSubscriberSystem. More...
 
class  SchunkWsgCommandSender
 Send lcmt_schunk_wsg_command messages for a Schunk WSG gripper. More...
 
class  SchunkWsgController
 This class implements a controller for a Schunk WSG gripper. More...
 
struct  SchunkWsgDriver
 This config struct specifies how to wire up Drake systems between an LCM interface and the actuation input ports of a MultibodyPlant. More...
 
class  SchunkWsgPdController
 This class implements a controller for a Schunk WSG gripper in position control mode. More...
 
class  SchunkWsgPlainController
 This class implements a controller for a Schunk WSG gripper as a systems::Diagram. More...
 
class  SchunkWsgPositionController
 This class implements a controller for a Schunk WSG gripper in position control mode adding a discrete-derivative to estimate the desired velocity from the desired position commands. More...
 
class  SchunkWsgStatusReceiver
 Handles lcmt_schunk_wsg_status messages from a LcmSubscriberSystem. More...
 
class  SchunkWsgStatusSender
 Sends lcmt_schunk_wsg_status messages for a Schunk WSG. More...
 
class  SchunkWsgTrajectoryGenerator
 This system defines input ports for the desired finger position represented as the desired distance between the fingers in meters and the desired force limit in newtons, and emits target position/velocity for the actuated finger to reach the commanded target, expressed as the negative of the distance between the two fingers in meters. More...
 

Enumerations

enum  ControlMode { kPosition = 0, kForce = 1 }
 

Functions

void BuildSchunkWsgControl (const multibody::MultibodyPlant< double > &plant, multibody::ModelInstanceIndex wsg_instance, lcm::DrakeLcmInterface *lcm, systems::DiagramBuilder< double > *builder, const std::optional< Eigen::Vector3d > &pid_gains={})
 Builds (into builder) the WSG control and sensing systems for the wsg model in plant indicated by wsg_instance; hooks those systems up to lcm and the relevant MultibodyPlant ports in the diagram. More...
 
template<typename T >
VectorX< T > GetSchunkWsgOpenPosition ()
 Returns the position vector corresponding to the open position of the gripper. More...
 
template<typename T >
std::unique_ptr< systems::MatrixGain< T > > MakeMultibodyStateToWsgStateSystem ()
 Extract the distance between the fingers (and its time derivative) out of the plant model which pretends the two fingers are independent. More...
 
template<typename T >
std::unique_ptr< systems::VectorSystem< T > > MakeMultibodyForceToWsgForceSystem ()
 Helper method to create a MultibodyForceToWsgForceSystem. More...
 
void ApplyDriverConfig (const SchunkWsgDriver &driver_config, const std::string &model_instance_name, const multibody::MultibodyPlant< double > &sim_plant, const std::map< std::string, multibody::parsing::ModelInstanceInfo > &models_from_directives, const systems::lcm::LcmBuses &lcms, systems::DiagramBuilder< double > *builder)
 Wires up Drake systems between an LCM interface and the actuation input ports of a MultibodyPlant. More...
 

Variables

constexpr int kSchunkWsgNumActuators = 2
 
constexpr int kSchunkWsgNumPositions = 2
 
constexpr int kSchunkWsgNumVelocities = 2
 
constexpr int kSchunkWsgPositionIndex = 0
 
constexpr int kSchunkWsgVelocityIndex
 
constexpr double kSchunkWsgLcmStatusPeriod = 0.05
 

Enumeration Type Documentation

◆ ControlMode

enum ControlMode
strong
Enumerator
kPosition 
kForce 

Function Documentation

◆ ApplyDriverConfig()

void drake::manipulation::schunk_wsg::ApplyDriverConfig ( const SchunkWsgDriver driver_config,
const std::string &  model_instance_name,
const multibody::MultibodyPlant< double > &  sim_plant,
const std::map< std::string, multibody::parsing::ModelInstanceInfo > &  models_from_directives,
const systems::lcm::LcmBuses lcms,
systems::DiagramBuilder< double > *  builder 
)

Wires up Drake systems between an LCM interface and the actuation input ports of a MultibodyPlant.

This simulates the role that driver software and robot firmware would take in real life.

◆ BuildSchunkWsgControl()

void drake::manipulation::schunk_wsg::BuildSchunkWsgControl ( const multibody::MultibodyPlant< double > &  plant,
multibody::ModelInstanceIndex  wsg_instance,
lcm::DrakeLcmInterface lcm,
systems::DiagramBuilder< double > *  builder,
const std::optional< Eigen::Vector3d > &  pid_gains = {} 
)

Builds (into builder) the WSG control and sensing systems for the wsg model in plant indicated by wsg_instance; hooks those systems up to lcm and the relevant MultibodyPlant ports in the diagram.

pid_gains can be used to override the default sim PID gains.

◆ GetSchunkWsgOpenPosition()

VectorX<T> drake::manipulation::schunk_wsg::GetSchunkWsgOpenPosition ( )

Returns the position vector corresponding to the open position of the gripper.

Variable Documentation

◆ kSchunkWsgLcmStatusPeriod

constexpr double kSchunkWsgLcmStatusPeriod = 0.05

◆ kSchunkWsgNumActuators

constexpr int kSchunkWsgNumActuators = 2

◆ kSchunkWsgNumPositions

constexpr int kSchunkWsgNumPositions = 2

◆ kSchunkWsgNumVelocities

constexpr int kSchunkWsgNumVelocities = 2

◆ kSchunkWsgPositionIndex

constexpr int kSchunkWsgPositionIndex = 0

◆ kSchunkWsgVelocityIndex

constexpr int kSchunkWsgVelocityIndex
Initial value:
=
constexpr int kSchunkWsgPositionIndex
Definition: schunk_wsg_constants.h:29
constexpr int kSchunkWsgNumPositions
Definition: schunk_wsg_constants.h:21