$darkmode
cloe::utility::EgoSensorCanon Class Reference

#include <ego_sensor_canon.hpp>

Inheritance diagram for cloe::utility::EgoSensorCanon:
Collaboration diagram for cloe::utility::EgoSensorCanon:

Public Member Functions

 EgoSensorCanon (std::shared_ptr< const EgoSensor > ego)
 
const Objectsensed_state () const override
 
double wheel_steering_angle () const override
 
double steering_wheel_speed () const override
 
double vehicle_length () const
 
double vehicle_width () const
 
double vehicle_height () const
 
double velocity_as_mps () const
 
double velocity_as_kmph () const
 
double acceleration_as_mpss () const
 
- Public Member Functions inherited from cloe::EgoSensor
fable::Json active_state () const override
 
 Component (const std::string &name, const std::string &description="")
 
 Component (std::string &&name, std::string &&description="")
 
- Public Member Functions inherited from cloe::Component
 Component (const std::string &name, const std::string &description="")
 
 Component (std::string &&name, std::string &&description="")
 
uint64_t id () const
 
template<typename T >
T * as ()
 
Duration process (const Sync &sync) override
 
void reset () override
 
void abort () override
 
- Public Member Functions inherited from cloe::Model
virtual ~Model () noexcept=default
 
virtual Duration resolution () const
 
virtual bool is_connected () const
 
virtual bool is_operational () const
 
virtual void connect ()
 
virtual void disconnect ()
 
virtual void enroll (Registrar &)
 
virtual void start (const Sync &)
 
virtual void pause (const Sync &)
 
virtual void resume (const Sync &)
 
virtual void stop (const Sync &)
 
 Entity (std::string name)
 
 Entity (std::string name, std::string desc)
 
- Public Member Functions inherited from cloe::Entity
 Entity (std::string name)
 
 Entity (std::string name, std::string desc)
 
const std::string & name () const
 
void set_name (std::string name)
 
const std::string & description () const
 
void set_description (std::string desc)
 

Protected Attributes

std::shared_ptr< const EgoSensorego_
 
- Protected Attributes inherited from cloe::Model
bool connected_ {false}
 
bool operational_ {false}
 
- Protected Attributes inherited from cloe::Entity
std::string name_
 
std::string desc_
 

Additional Inherited Members

- Protected Member Functions inherited from cloe::Entity
virtual Logger logger () const
 

Detailed Description

Provides methods that return canonical values from an EgoSensor.

This can also be used to test whether an EgoSensor implementation is correct. If you want to make use of these functions, you can wrap any EgoSensor with EgoSensorCanon:

auto ego = EgoSensorCanon(veh->get<EgoSensor>(...));

However, at some point it may be beneficial to optimize it away.

Member Function Documentation

◆ acceleration_as_mpss()

double cloe::utility::EgoSensorCanon::acceleration_as_mpss ( ) const
inline

Return the ego acceleration in meters per second squared [m/s^2].

Here is the call graph for this function:

◆ sensed_state()

const Object& cloe::utility::EgoSensorCanon::sensed_state ( ) const
inlineoverridevirtual

Return the sensed ego state.

  • The object's properties, such as velocity and acceleration, are in absolute coordinates.
  • The returned pointer is invalid after clear_cache is called.
  • The EgoSensor that returns the pointer manages the memory.

Implements cloe::EgoSensor.

Here is the caller graph for this function:

◆ steering_wheel_speed()

double cloe::utility::EgoSensorCanon::steering_wheel_speed ( ) const
inlineoverridevirtual

Return the speed of the steering wheel rotation in radians/s.

Positive values indicate clockwise rotation from the perspective of the driver.

Implements cloe::EgoSensor.

◆ velocity_as_kmph()

double cloe::utility::EgoSensorCanon::velocity_as_kmph ( ) const
inline

Return the ego velocity in kilometers per hour [km/h].

Here is the call graph for this function:
Here is the caller graph for this function:

◆ velocity_as_mps()

double cloe::utility::EgoSensorCanon::velocity_as_mps ( ) const
inline

Return the ego velocity in meters per second [m/s].

   ^
   | velocity in forward direction

 +--+
 |  |
 |  |
 +--+
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wheel_steering_angle()

double cloe::utility::EgoSensorCanon::wheel_steering_angle ( ) const
inlineoverridevirtual

Return the front left wheel steering angle in radians.

Implements cloe::EgoSensor.


The documentation for this class was generated from the following file: