Class base_controller2D

Inheritance Relationships

Base Types

  • public cosm::controller::base_controller (Class base_controller)

  • public cspatial::metrics::dist2D_metrics

Derived Types

Class Documentation

class base_controller2D : public cosm::controller::base_controller, public cspatial::metrics::dist2D_metrics

The implementation of base controller class that the controllers for all robots that operate in 2D derive.

It should never be derived from directly; derive from one of the adaptor controllers in the PAL.

Subclassed by cosm::pal::argos::controller::adaptor2D, cosm::pal::ros::controller::adaptor2D

Public Functions

base_controller2D(const base_controller2D&) = delete
base_controller2D(void)
~base_controller2D(void) override
rmath::vector2z dpos2D(void) const final override
rmath::radians heading2D(void) const final override
virtual void mdc_ts_update(void) const final override

Convenience function to add timestamp to messages during the control step.

base_controller2D &operator=(const base_controller2D&) = delete
rmath::vector2d rpos2D(void) const final override
virtual void sensing_update(const rtypes::timestep &tick) override

Update the sensing for the robot.

  • Set the current clock tick.

  • Update positioning information.

Parameters:

tick – The current simulation clock tick.

virtual void sensing_update(const rtypes::timestep &tick, const rtypes::discretize_ratio &ratio) override

Update the sensing for the robot.

  • Set the current clock tick.

  • Update positioning information.

Parameters:
  • tick – The current clock tick.

  • ratio – The ratio that should be used to calculate the robot’s discrete position in the arena (should match the ratio used to create the arena grid).