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 std::vector< Isometry3< double >> &place_locations, bool loop)
 Construct a pick and place state machine. More...
 
 ~PickAndPlaceStateMachine ()
 
void Update (const WorldState &env_state, const IiwaPublishCallback &iiwa_callback, const WsgPublishCallback &wsg_callback, manipulation::planner::ConstraintRelaxingIk *planner)
 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

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

Constructor & Destructor Documentation

PickAndPlaceStateMachine ( const std::vector< Isometry3< double >> &  place_locations,
bool  loop 
)

Construct a pick and place state machine.

place_locations should contain a list of locations to place the target. The state machine will cycle through the target locations, placing the item then picking it back up at the next target. If loop is true, the state machine will loop through the pick and place locations, otherwise it will remain in the kDone state once complete.

Member Function Documentation

PickAndPlaceStateMachine& operator= ( const PickAndPlaceStateMachine )
default
PickAndPlaceState state ( ) const
inline
void Update ( const WorldState env_state,
const IiwaPublishCallback iiwa_callback,
const WsgPublishCallback wsg_callback,
manipulation::planner::ConstraintRelaxingIk planner 
)

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. planner should contain an appropriate planner for the robot.

Here is the call graph for this function:


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