Template Class free_block_pickup
Defined in File free_block_pickup.hpp
Inheritance Relationships
Base Type
public rer::client< free_block_pickup< TController, TControllerSpecMap > >
Class Documentation
-
template<typename TController, typename TControllerSpecMap>
class free_block_pickup : public rer::client<free_block_pickup<TController, TControllerSpecMap>> Handle’s (possible) free block pickup event on a given timestep, updating the real robot state as needed if the conditions for the pickup are met.
The return type of the
operator()
function to use.The type of the visitor to visit the controller in order to process the block pickup on the robot side (arena map side is already generic).
- Template Parameters:
TController – The type of the robot controller
TControllerSpecMap – Compiler time map mapping the type of the controller to a set of types specifying:
Public Types
-
using controller_spec = typename boost::mpl::at<TControllerSpecMap, TController>::type
-
using interactor_status_type = typename controller_spec::interactor_status_type
-
using robot_block_pickup_visitor_type = typename controller_spec::robot_block_pickup_visitor_type
Public Functions
-
free_block_pickup(const free_block_pickup&) = delete
-
free_block_pickup(free_block_pickup&&) = default
-
inline free_block_pickup(void)
-
~free_block_pickup(void) override = default
-
inline interactor_status_type operator()(TController &controller, const rtypes::timestep &t)
Handle robot-arena interactions for the specified controller instance on this timestep.
- Parameters:
controller – The controller to handle interactions for.
t – The current timestep.
-
free_block_pickup &operator=(const free_block_pickup&) = delete
-
virtual bool robot_goal_acquired(const TController &controller) const = 0
Determine if the robot has acquired its goal (a block in this case). This callback is needed because the exact parameters/method of determining when this has occurred are project specific (e.g., checking if the controller’s acquisition_goal() function returns a certain integer).
-
inline virtual void robot_previsit_hook(TController&) const
Called right before the robot is visited by the block pickup event, in order to provide a hook for derived classes to update controller bookkeeping before the pickup.