class providing support to convert ad::map objects into ad::rss objects
More...
#include <ad/rss/map/RssObjectConversion.hpp>
|
static bool | calculateConservativeMinStoppingDistance (::ad::rss::world::ObjectId const &object_id, ::ad::physics::Speed const ¤t_speed, ::ad::rss::world::RssDynamics const &rss_dynamics, ::ad::physics::Distance &conservativeMinStoppingDistance) |
|
class providing support to convert ad::map objects into ad::rss objects
◆ RssObjectConversion() [1/2]
ad::rss::map::RssObjectConversion::RssObjectConversion |
( |
RssObjectData const & |
object_data | ) |
|
|
explicit |
constructor
- Parameters
-
[in] | object_data | the object data |
◆ RssObjectConversion() [2/2]
ad::rss::map::RssObjectConversion::RssObjectConversion |
( |
RssObjectData const & |
object_data, |
|
|
::ad::rss::world::OccupiedRegionVector const & |
objectOccupiedRegions |
|
) |
| |
constructor with explicit occupied regions
- Parameters
-
[in] | object_data | the object data |
[in] | objectOccupiedRegions | the object's occupied regions explicitly |
◆ calculateConservativeMinStoppingDistance() [1/2]
bool ad::rss::map::RssObjectConversion::calculateConservativeMinStoppingDistance |
( |
::ad::physics::Distance & |
conservativeMinStoppingDistance | ) |
const |
This is an estimate, that can be used to calculate the route calculation distance to be taken into account. It uses conservative expectations, i.e. brake_min_correct and no limitation of speed on acceleration.
- Parameters
-
[out] | conservativeMinStoppingDistance | the minimum distance for the object to stop calculated in a conservative way |
- Returns
- boolean indicating success(true)/failure(false) of the calculation
◆ calculateConservativeMinStoppingDistance() [2/2]
static bool ad::rss::map::RssObjectConversion::calculateConservativeMinStoppingDistance |
( |
::ad::rss::world::ObjectId const & |
object_id, |
|
|
::ad::physics::Speed const & |
current_speed, |
|
|
::ad::rss::world::RssDynamics const & |
rss_dynamics, |
|
|
::ad::physics::Distance & |
conservativeMinStoppingDistance |
|
) |
| |
|
static |
This is an estimate, that can be used to calculate the route calculation distances to be taken into account. It uses conservative expectations, i.e. brake_min_correct and no limitation of speed on acceleration.
- Parameters
-
[in] | object_id | the object_id (for debug messages only) |
[in] | current_speed | the objects current speed |
[in] | rss_dynamics | the RssDynamics to consider |
[out] | conservativeMinStoppingDistance | the minimum distance for the object to stop calculated in a conservative way |
- Returns
- boolean indicating success(true)/failure(false) of the calculation
◆ getDistanceEstimate()
- Returns
- the distance estimate towards the other object The distance uses Euclidian distance of the center points as an estimate.
◆ getId()
::ad::rss::world::ObjectId ad::rss::map::RssObjectConversion::getId |
( |
| ) |
const |
◆ getOriginalObjectSpeed()
::ad::physics::SpeedRange const& ad::rss::map::RssObjectConversion::getOriginalObjectSpeed |
( |
| ) |
const |
|
inline |
- Returns
- the original object speed provided as input
◆ getRssDynamics()
::ad::rss::world::RssDynamics ad::rss::map::RssObjectConversion::getRssDynamics |
( |
| ) |
const |
- Returns
- RssDynamics of the object
If updateSpeedLimit() was called in between the max_speed_on_acceleration value of the dynamics will be adapted to these.
◆ getRssObject()
::ad::rss::world::Object const& ad::rss::map::RssObjectConversion::getRssObject |
( |
| ) |
const |
- Returns
- RSS Object description
If laneIntervalAdded() or fillNotRelevantConstellationBoundingBox() was called in between the occupied regions have been filled accordingly. If not, these are empty (which is an invalid object!)
◆ getVehicleLength()
::ad::physics::Distance ad::rss::map::RssObjectConversion::getVehicleLength |
( |
| ) |
const |
|
inline |
- Returns
- the length of the vehicle
◆ getVehicleWidth()
::ad::physics::Distance ad::rss::map::RssObjectConversion::getVehicleWidth |
( |
| ) |
const |
|
inline |
- Returns
- the width of the vehicle
◆ isOriginalSpeedAcceptable()
bool ad::rss::map::RssObjectConversion::isOriginalSpeedAcceptable |
( |
::ad::physics::Speed const |
acceptableNegativeSpeed = ::ad::physics::Speed(-0.5) | ) |
const |
check if the original input speed is in acceptable range
Negative speed is not supported by the RSS implementation; therefore negative input speeds are mapped to zero speed by this class.
But up to a certain small negative speed value, negative speeds still might want to be accepted to account for slowly backward drifting vehicles. Therefore, the constructor of this class maps all negative speeds to zero, but stores the original provided speed for later analysis. This function can be used to check for an acceptable speed.
- Parameters
-
[in] | acceptableNegativeSpeed | a small negative speed value that should be allowed to be mapped to zero without error (default -0.5m/s). |
- Returns
true
if the original speed equals the current internal object speed. It also returns true
if the original speed is equal or larger than the provided acceptableNegativeSpeed.
◆ updateVelocityOnRoute() [1/2]
void ad::rss::map::RssObjectConversion::updateVelocityOnRoute |
( |
::ad::map::point::ENUHeading const & |
route_heading | ) |
|
update the objects current velocity on the route considering the provided route_heading
Use this overload if the route is derived from a ad::map::route::ConnectingRoute by using the heading calculations from the ConnectingRoute type, as the object bounding boxes are usually removed from the connecting route. Like this, the object is more or less touching the route and the other overload taking the route as parameter might not be able to extract the heading.
◆ updateVelocityOnRoute() [2/2]
bool ad::rss::map::RssObjectConversion::updateVelocityOnRoute |
( |
::ad::map::route::FullRoute const & |
route | ) |
|
update the objects current velocity on the route
The bounding box of the object has to be part of the provided route to be able to extract the route heading correctly. Therefore, use this overload if the route was calculated by the ad::map::route::planning::planRoute() or ad::map::route::planning::predictRoute() functions and no heading information is available yet by other means. If the route is derived from a ad::map::route::ConnectingRoute use the overload with the pre-calcuated heading.
- Returns
true
if the operation succeeded
The documentation for this class was generated from the following file: