Drake
PickAndPlaceStateMachine Class Reference

A class which controls the pick and place actions for moving a single target in the environment. More...

#include <drake/examples/kuka_iiwa_arm/pick_and_place/pick_and_place_state_machine.h>

Public Types

typedef std::function< void(const robotlocomotion::robot_plan_t *)> IiwaPublishCallback
 
typedef std::function< void(const lcmt_schunk_wsg_command *)> WsgPublishCallback
 

Public Member Functions

 PickAndPlaceStateMachine (const pick_and_place::PlannerConfiguration &configuration, bool single_move)
 Construct a pick and place state machine. More...
 
 ~PickAndPlaceStateMachine ()
 
void Update (const WorldState &env_state, const IiwaPublishCallback &iiwa_callback, const WsgPublishCallback &wsg_callback)
 Update the state machine based on the state of the world in env_state. More...
 
PickAndPlaceState state () const
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 PickAndPlaceStateMachine (const PickAndPlaceStateMachine &)=default
 
PickAndPlaceStateMachineoperator= (const PickAndPlaceStateMachine &)=default
 
 PickAndPlaceStateMachine (PickAndPlaceStateMachine &&)=default
 
PickAndPlaceStateMachineoperator= (PickAndPlaceStateMachine &&)=default
 

Detailed Description

A class which controls the pick and place actions for moving a single target in the environment.

Member Typedef Documentation

◆ IiwaPublishCallback

typedef std::function<void(const robotlocomotion::robot_plan_t*)> IiwaPublishCallback

◆ WsgPublishCallback

typedef std::function<void(const lcmt_schunk_wsg_command*)> WsgPublishCallback

Constructor & Destructor Documentation

◆ PickAndPlaceStateMachine() [1/3]

◆ PickAndPlaceStateMachine() [2/3]

◆ PickAndPlaceStateMachine() [3/3]

PickAndPlaceStateMachine ( const pick_and_place::PlannerConfiguration configuration,
bool  single_move 
)

Construct a pick and place state machine.

The state machine will move the item counter-clockwise around the tables specified in configuration. If single_move is true, the state machine will remain in the kDone state after moving the object once, otherwise it will loop through the pick and place.

◆ ~PickAndPlaceStateMachine()

Member Function Documentation

◆ operator=() [1/2]

PickAndPlaceStateMachine& operator= ( const PickAndPlaceStateMachine )
default

◆ operator=() [2/2]

◆ state()

PickAndPlaceState state ( ) const
inline

◆ Update()

void Update ( const WorldState env_state,
const IiwaPublishCallback iiwa_callback,
const WsgPublishCallback wsg_callback 
)

Update the state machine based on the state of the world in env_state.

When a new robot plan is available, iiwa_callback will be invoked with the new plan. If the desired gripper state changes, wsg_callback is invoked.


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