Drake
WsgAction Class Reference

An Action that closes / opens the gripper. More...

#include <examples/kuka_iiwa_arm/pick_and_place/action.h>

Inheritance diagram for WsgAction:
[legend]
Collaboration diagram for WsgAction:
[legend]

Public Member Functions

 WsgAction ()
 
void OpenGripper (const WorldState &est_state, double grip_force, lcmt_schunk_wsg_command *msg)
 Populates msg with an LCM message that tells the WSG gripper driver to fully open. More...
 
void CloseGripper (const WorldState &est_state, double grip_force, lcmt_schunk_wsg_command *msg)
 Populates msg with an LCM message that tells the WSG gripper driver to fully close. More...
 
bool ActionFailed (const WorldState &) const override
 Returns true if the action has failed based on the provided estimated state. More...
 
bool ActionFinished (const WorldState &est_state) const override
 Returns true if the following criteria are satisfied: More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 WsgAction (const WsgAction &)=default
 
WsgActionoperator= (const WsgAction &)=default
 
 WsgAction (WsgAction &&)=default
 
WsgActionoperator= (WsgAction &&)=default
 
- Public Member Functions inherited from Action
virtual ~Action ()
 
virtual bool ActionStarted () const
 Returns true if the action started. More...
 
double get_action_start_time () const
 Returns the time when the action has started. More...
 
double get_time_since_action_start (double time) const
 Returns elapsed time since beginning of the action. More...
 
virtual void Reset ()
 Resets the action's internal states. More...
 
 Action (const Action &)=default
 
Actionoperator= (const Action &)=default
 
 Action (Action &&)=default
 
Actionoperator= (Action &&)=default
 

Additional Inherited Members

- Protected Member Functions inherited from Action
 Action ()
 
void StartAction (double start_time)
 Set the action initial time. More...
 

Detailed Description

An Action that closes / opens the gripper.

Constructor & Destructor Documentation

WsgAction ( const WsgAction )
default
WsgAction ( WsgAction &&  )
default
WsgAction ( )

Member Function Documentation

bool ActionFailed ( const WorldState est_state) const
inlineoverridevirtual

Returns true if the action has failed based on the provided estimated state.

Implements Action.

Here is the call graph for this function:

bool ActionFinished ( const WorldState est_state) const
overridevirtual

Returns true if the following criteria are satisfied:

  • The gripper speed is less than the final speed threshold.
  • 0.5 s have elapsed since the last Open/Close command was issued.
  • The gripper position is greater than (for an Open command) or less than (for a Close command) the open position threshold.

Implements Action.

Here is the call graph for this function:

Here is the caller graph for this function:

void CloseGripper ( const WorldState est_state,
double  grip_force,
lcmt_schunk_wsg_command *  msg 
)

Populates msg with an LCM message that tells the WSG gripper driver to fully close.

grip_force specifies the target gripping force to be applied to the grasped object. The gripper will internally attempt to maintain this amount of clamping force by driving the motor appropriately, though the result will not be precise (and the actual outcome may depend on the gripper configuration).

Here is the call graph for this function:

void OpenGripper ( const WorldState est_state,
double  grip_force,
lcmt_schunk_wsg_command *  msg 
)

Populates msg with an LCM message that tells the WSG gripper driver to fully open.

grip_force is passed to the gripper, but since the gripper is opening and (hopefully) not pushing against anything in this direction, it mostly affects the velocity of the fingers.

Here is the call graph for this function:

WsgAction& operator= ( const WsgAction )
default
WsgAction& operator= ( WsgAction &&  )
default

The documentation for this class was generated from the following files: