Template Class base_sensing_subsystem

Inheritance Relationships

Base Type

  • private chal::subsystem::base_subsystem

Class Documentation

template<typename ...TSensorTypes>
class base_sensing_subsystem : private chal::subsystem::base_subsystem

Base sensing subsystem for all sensors used by all robot controllers.

Even if robots only actuate in 2D, they still sense in 3D: if the robot lives in a 2D plane, then the Z component will just always be 0 (among other simplifications).

Public Types

using sensor_map = sensor_variant_map<TSensorTypes...>
using variant_type = sensor_variant<TSensorTypes...>

Public Functions

inline explicit base_sensing_subsystem(sensor_map &&sensors)
Parameters:

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

virtual ~base_sensing_subsystem(void) = default
inline void disable(void)

Disable all sensors.

template<typename TSensor>
inline bool replace(const TSensor &sensor)
inline void reset(void)

Reset all sensors.

template<typename T>
inline T *sensor(void)
template<typename T>
inline const T *sensor(void) const

Public Static Functions

template<typename TSensor>
static inline sensor_map::value_type map_entry_create(TSensor &&sensor)

Convenience function to create a sensor map create for the specified sensor to make client code cleaner.