Class foraging_util_hfsm
Defined in File foraging_util_hfsm.hpp
Nested Relationships
Nested Types
Inheritance Relationships
Base Types
public cspatial::fsm::util_hfsm
public cssnest::metrics::acq_metrics
public cssblocks::metrics::drop_metrics
public rer::client< foraging_util_hfsm >
Class Documentation
-
class foraging_util_hfsm : public cspatial::fsm::util_hfsm, public cssnest::metrics::acq_metrics, public cssblocks::metrics::drop_metrics, public rer::client<foraging_util_hfsm>
A collection of base states/common functionality that foraging FSMs which operate in strict 2D or quasi-3D can use if they choose (NOT full 3D robots).
This class cannot be instantiated on its own, as does not define an FSM per-se.
Public Functions
-
foraging_util_hfsm(const csfsm::fsm_params *params, cffsm::strategy_set strategies, rmath::rng *rng, uint8_t max_states)
-
foraging_util_hfsm(const foraging_util_hfsm&) = delete
-
~foraging_util_hfsm(void) override = default
-
const cssblocks::drop::base_drop *block_drop_strategy(void) const override
-
const cssnest::acq::base_acq *nest_acq_strategy(void) const override
-
foraging_util_hfsm &operator=(const foraging_util_hfsm&) = delete
Protected Functions
-
void inta_state_update(void)
Update the cspatial::interference_tracker state and applies the avoidance force if obstacles are detected.
-
void nz_state_update(void)
Update the cspatial::nest_zone_tracker state.
-
RCPPSW_HFSM_ENTRY_DECLARE_ND(foraging_util_hfsm, entry_leaving_nest)
A simple entry state for leaving nest, used to set LED colors for visualization purposes and enable light sensors.
-
RCPPSW_HFSM_ENTRY_DECLARE_ND(foraging_util_hfsm, entry_transport_to_nest)
Entry state for returning to nest.
Used to:
Set LED colors for visualization purposes.
Enable light sensor (disabled otherwise for computational efficiency).
-
RCPPSW_HFSM_EXIT_DECLARE(foraging_util_hfsm, exit_leaving_nest)
A simple entry state for leaving nest, used to enable light sensors.
-
RCPPSW_HFSM_EXIT_DECLARE(foraging_util_hfsm, exit_transport_to_nest)
Exit state for returning to nest (i.e. when the robot arrives in the nest).
Used to:
Set LED colors for visualization purposes.
Disable light sensor (disabled unless a robot is activiely returning to the nest for computational efficiency).
-
RCPPSW_HFSM_STATE_DECLARE(foraging_util_hfsm, drop_carried_block, rpfsm::event_data)
Robots entering this state will drop their carried block in the nest using the specified strategy.
This state MUST have a parent state defined that is not hfsm::top_state().
-
RCPPSW_HFSM_STATE_DECLARE(foraging_util_hfsm, leaving_nest, rpfsm::event_data)
Robots entering this state will leave the nest (they are assumed to already be in the nest when this state is entered).
This state MUST have a parent state defined that is not hfsm::top_state().
-
RCPPSW_HFSM_STATE_DECLARE(foraging_util_hfsm, transport_to_nest, nest_transport_data)
Robots entering this state will return to the nest using the specified acquisition strategy.
This state MUST have a parent state defined that is not rcppsw::patterns::fsm::hfsm::top_state().
-
inline strategy_set &strategies(void)
-
foraging_util_hfsm(const csfsm::fsm_params *params, cffsm::strategy_set strategies, rmath::rng *rng, uint8_t max_states)