Template Class nest_block_process
Defined in File nest_block_process.hpp
Inheritance Relationships
Base Type
public rer::client< nest_block_process< TController, TControllerSpecMap > >
Class Documentation
-
template<typename TController, typename TControllerSpecMap>
class nest_block_process : public rer::client<nest_block_process<TController, TControllerSpecMap>> Handle’s a robot’s (possible) nest block process event on a given timestep, updating the robot and the arena map state as needed if the conditions for the block process are met.
Public Types
-
using arena_map_type = typename controller_spec::arena_map_type
-
using controller_spec = typename boost::mpl::at<TControllerSpecMap, TController>::type
-
using interactor_status_type = typename controller_spec::interactor_status_type
-
using metrics_manager_type = typename controller_spec::metrics_manager_type
-
using penalty_handler_type = typename controller_spec::penalty_handler_type
-
using robot_nest_block_process_visitor_type = typename controller_spec::robot_nest_block_process_visitor_type
Public Functions
-
inline nest_block_process(arena_map_type *const map, metrics_manager_type *const metrics, ::argos::CFloorEntity *const floor, penalty_handler_type *handler)
-
nest_block_process(const nest_block_process&) = delete
-
nest_block_process(nest_block_process&&) = default
-
~nest_block_process(void) override = default
-
inline interactor_status_type operator()(TController &controller, const rtypes::timestep &t)
Handler robot-arena interactions for the specified controller instance on this timestep.
- Parameters:
controller – The controller to handle interactions for.
t – The current timestep.
-
nest_block_process &operator=(const nest_block_process&) = delete
-
virtual bool robot_goal_acquired(const TController &controller) const = 0
Determine if the robot has acquired its goal (the nest 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).
-
virtual void robot_penalty_init(const TController &controller, const rtypes::timestep &t, penalty_handler_type *handler) = 0
If the robot is not currently serving a penalty, then this callback is used to attempt to initialized one. It is needed because the penalty handler type is unknown, and therefore so are the arguments needed for initializing the penalty, beyond the controller and the timestep.
-
inline virtual void robot_previsit_hook(TController&, const ctv::temporal_penalty&) const
Called right before the robot is visited by the block drop event, in order to provide a hook for derived classes to update controller bookkeeping before the pickup.
-
using arena_map_type = typename controller_spec::arena_map_type