Class sensing_subsystem

Inheritance Relationships

Base Type

  • public chal::subsystem::sensing_subsystem

Class Documentation

class sensing_subsystem : public chal::subsystem::sensing_subsystem

Base sensing subsystem for all sensors used by all robot controllers. It adds additional functionality to chsubsystem::sensing_subsystem beyond the abstraction of available robot sensors.

Note that the chsensors::position_sensor MUST be in the sensor map, or update() will crash.

Public Functions

inline explicit sensing_subsystem(sensor_map &&sensors)
Parameters:
  • pos – Position sensor.

  • sensors – Map of handles to sensing devices, indexed by typeid.

virtual ~sensing_subsystem(void) = default
inline const rmath::radians &azimuth(void) const

Get the robot’s current azimuth heading; this effectively is the angle of the 2D projection of the robots current position in 3D space onto the XY plane.

inline const rmath::vector2z &dpos2D(void) const

Get the robot’s current location in 2D discrete coordinates.

inline const rmath::vector3z &dpos3D(void) const

Get the robot’s current location in 3D discrete coordinates.

inline const rmath::vector2d &rpos2D(void) const

Get the robot’s current location in 2D real coordinates.

inline const rmath::vector3d &rpos3D(void) const

Get the robot’s current location in 3D real coordinates.

inline const rtypes::timestep &tick(void) const
inline rmath::vector2d tick_travel2D(void) const

Get how far the robot has traveled in the last timestep in 2D, as well as the direction/magnitude.

inline rmath::vector3d tick_travel3D(void) const

Get how far the robot has traveled in the last timestep in 3D, as well as the direction/magnitude.

inline void update(const rtypes::timestep &t)

Update the current time and position information for the robot (real coordinates).

inline void update(const rtypes::timestep &t, const rtypes::discretize_ratio &ratio)

Update the current time and position information for the robot (real and discretized coordinates).

inline const rmath::radians &zenith(void) const

Get the robot’s current zenith heading; this effectively is the angle the robots current position vector makes with the XY plane.