$darkmode
ego_sensor_canon.hpp File Reference
#include <math.h>
#include <memory>
#include <cloe/component/ego_sensor.hpp>
Include dependency graph for ego_sensor_canon.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cloe::utility::EgoSensorCanon
 

Functions

double cloe::utility::distance_forward (const Object &o)
 
double cloe::utility::distance_starboard (const Object &o)
 
bool cloe::utility::is_object_fore (const Object &o)
 
bool cloe::utility::is_object_aft (const Object &o)
 
bool cloe::utility::is_same_lane (const Object &o)
 
std::shared_ptr< Object > cloe::utility::closest_forward (const Objects objects)
 

Detailed Description

This file serves as a way of documenting how the objects are to be used that are passed around components in Cloe.

Function Documentation

◆ closest_forward()

std::shared_ptr< Object > cloe::utility::closest_forward ( const Objects  objects)

Returns the closest object that is in front of the ego.

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

◆ distance_forward()

double cloe::utility::distance_forward ( const Object o)
inline

Return the distance the object is in front of the ego.

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

◆ distance_starboard()

double cloe::utility::distance_starboard ( const Object o)
inline

Return the distance the object is to the right of the ego.

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

◆ is_object_aft()

bool cloe::utility::is_object_aft ( const Object o)
inline

Return whether the object is behind the ego.

TODO(ben): There has got to be a better way to do this.

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

◆ is_object_fore()

bool cloe::utility::is_object_fore ( const Object o)
inline

Return whether the object is in front of the ego.

TODO(ben): There has got to be a better way to do this.

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

◆ is_same_lane()

bool cloe::utility::is_same_lane ( const Object o)
inline

Return whether the object is in the same "lane".

TODO(ben): There has got to be a better way to do this. The current logic runs a little like this:

If the center of the object is more than 2.5m away from our current position, then the vehicle is not in our lane. (Most personal automobiles are around 1.85m wide.)

This is unfortunately not correct for a wide variety of situations:

  • What if the road is curved?
  • What if we are changing the lane?
  • What if the lane is wider?
  • What if the lane is narrower?
Here is the call graph for this function:
Here is the caller graph for this function: