ad_rss_map_integration
|
supporting class for implementing the RSS checks More...
#include <ad/rss/map/RssRouteChecker.hpp>
Public Types | |
typedef std::shared_ptr< RssRouteChecker > | Ptr |
Smart pointer on RssVehicleAdapter. | |
typedef std::shared_ptr< RssRouteChecker const > | ConstPtr |
Smart pointer on constant RssObjectAdapter. | |
using | ArtificialObjectInjectionCallbackFunctionType = std::function< RssArtificialObjectAdapterList< OBJECT_INSTANCE_TYPE >(RssRouteCheckerEgoVehicleDataMap< OBJECT_INSTANCE_TYPE > const &egoVehicleMap, RssRouteCheckerVehicleDataMap< OBJECT_INSTANCE_TYPE > const &vehicleMap, RssRouteCheckerPedestrianDataMap< OBJECT_INSTANCE_TYPE > const &pedestrianMap)> |
defines the type for callback to inject artificial objects More... | |
using | CalculateTrajectorySetsCallbackFunctionType = std::function< bool(RssRouteCheckerEgoVehicleData< OBJECT_INSTANCE_TYPE > const &egoVehicle, ::ad::rss::map::RssRouteId const &routeId, ::ad::rss::core::RelativeConstellation const &constellation, ::ad::rss::world::ObjectId const &objectId, ::ad::rss::core::RelativeObjectState const &vehicleState, ::ad::geometry::Polygon &brakePolygon, ::ad::geometry::Polygon &continueForwardPolygon)> |
Function callback type for unstructured trajectory set calculation. More... | |
Public Member Functions | |
RssRouteChecker (::ad::physics::Duration const dropOutdatedObjecstDuration) | |
default constructor | |
virtual | ~RssRouteChecker ()=default |
destructor | |
void | registerArtificialObjectInjectionCallback (::ad::physics::Distance const artificialObjectSamplingDistance, ArtificialObjectInjectionCallbackFunctionType artificialObjectsInjectionCallback) |
register a callback to inject artificial objects More... | |
void | registerCalculateTrajectorySetsCallback (world::ObjectType objectType, CalculateTrajectorySetsCallbackFunctionType calculateTrajectorySetsCallback) |
Register a callback for unstructured trajectory set calculation. More... | |
virtual RssObjectResultList | checkObjects (std::chrono::system_clock::time_point const ¤tTime, ::ad::physics::Distance const vehicleSamplingDistance, RssEgoVehicleAdapterList< OBJECT_INSTANCE_TYPE > &egoVehicles, RssVehicleAdapterList< OBJECT_INSTANCE_TYPE > &vehicles, ::ad::physics::Distance const pedestrianSamplingDistance, RssPedestrianAdapterList< OBJECT_INSTANCE_TYPE > &pedestrians, typename RssRouteCheckerVehicleData< OBJECT_INSTANCE_TYPE >::RouteExtensionMode routeExtensionMode) |
perform the RSS check of the objects More... | |
bool | isEgoVehicleAvailable (::ad::rss::world::ObjectId ego_object_id) |
check if the ego vehicle object is still present. More... | |
bool | isEgoVehicleActive (::ad::rss::world::ObjectId ego_object_id) |
check if the ego vehicle object is still present and currently active. More... | |
void | restrictOperationToMapArea (::ad::map::lane::LaneIdSet const &lanesToConsider) |
These group of functions restrict the operation of this class to a certain map area. More... | |
bool | restrictOperationToMapArea (::ad::map::point::BoundingSphere const &bounding_sphere) |
restriction of the map area to a bounding sphere More... | |
bool | restrictOperationToMapArea (std::vector< ad::map::lane::MapAreaPredictionStartPoint > const &predictionStartPoints) |
restriction of the map area to a set of reachable lanes More... | |
bool | restrictOperationToIntersectionArea (::ad::map::point::ENUPoint const &intersectionPoint, ::ad::physics::Distance const &intersectionDistance) |
restriction of the map area around an intersection to a set of reachable lanes More... | |
void | clearOperationToMapAreaRestriction () |
clear the restriction to a certain map area More... | |
Protected Member Functions | |
virtual void | objectDataUpdated (RssRouteCheckerEgoVehicleDataMap< OBJECT_INSTANCE_TYPE > &egoVehicleMap) |
callback after object data of the ego vehicles has been updated More... | |
virtual void | objectDataUpdated (RssRouteCheckerVehicleDataMap< OBJECT_INSTANCE_TYPE > &vehicleMap) |
callback after object data of the vehicles has been updated | |
virtual void | objectDataUpdated (RssRouteCheckerPedestrianDataMap< OBJECT_INSTANCE_TYPE > &pedestrianMap) |
callback after object data of the pedestrians has been updated | |
virtual void | objectDataUpdated (RssRouteCheckerArtificialObjectDataMap< OBJECT_INSTANCE_TYPE > &artificialObjectMap) |
callback after object data of the artificial objects has been updated | |
virtual void | routesUpdated (RssRouteCheckerEgoVehicleDataMap< OBJECT_INSTANCE_TYPE > &egoVehicleMap) |
callback after the routes of the ego vehicles have been updated | |
virtual void | routesUpdated (RssRouteCheckerVehicleDataMap< OBJECT_INSTANCE_TYPE > &vehicleMap) |
callback after the routes of the vehicles have been updated | |
virtual void | situationCreated (RssRouteCheckerEgoVehicleData< OBJECT_INSTANCE_TYPE > const &ego_vehicle, RssRouteCheckResult &rssRouteCheckResult) |
callback after the rssRouteCheckResult situations has been created for the respective ego vehicle More... | |
virtual void | situationsCreated (RssRouteCheckerEgoVehicleData< OBJECT_INSTANCE_TYPE > const &ego_vehicle, RssObjectResult &rssObjectResult) |
callback after all rssRouteCheckResult situations have been created for the respective ego vehicle More... | |
virtual void | situationsCreated (RssObjectResultList &objectResultList) |
callback after all situations for all ego vehicles have been created | |
virtual void | checksPerformed (RssObjectResultList &objectResultList) |
callback after all constellations for all ego vehicles have been checked | |
supporting class for implementing the RSS checks
using ad::rss::map::RssRouteChecker< OBJECT_INSTANCE_TYPE >::ArtificialObjectInjectionCallbackFunctionType = std::function<RssArtificialObjectAdapterList<OBJECT_INSTANCE_TYPE>( RssRouteCheckerEgoVehicleDataMap<OBJECT_INSTANCE_TYPE> const &egoVehicleMap, RssRouteCheckerVehicleDataMap<OBJECT_INSTANCE_TYPE> const &vehicleMap, RssRouteCheckerPedestrianDataMap<OBJECT_INSTANCE_TYPE> const &pedestrianMap)> |
defines the type for callback to inject artificial objects
The provided parameters to the function can be used to re-use already pre-proccessed data on vehicles and pedestrians at the current point in time.
using ad::rss::map::RssRouteChecker< OBJECT_INSTANCE_TYPE >::CalculateTrajectorySetsCallbackFunctionType = std::function<bool(RssRouteCheckerEgoVehicleData<OBJECT_INSTANCE_TYPE> const &egoVehicle, ::ad::rss::map::RssRouteId const &routeId, ::ad::rss::core::RelativeConstellation const &constellation, ::ad::rss::world::ObjectId const &objectId, ::ad::rss::core::RelativeObjectState const &vehicleState, ::ad::geometry::Polygon &brakePolygon, ::ad::geometry::Polygon &continueForwardPolygon)> |
Function callback type for unstructured trajectory set calculation.
[in] | egoVehicle | The ego-vehicle data the calculation is performed for |
[in] | routedId | The route id of the ego-vehicle the calculation is performed for |
[in] | constellation | The relative constellation the calculation is based on |
[in] | objectId | The id of the object the calculation is based on (one of the two constellation objects) |
[in] | vehicleState | The relative object state of the object the calculation is based on (one of the two constellation vehicle states) |
[out] | brakePolygon | The calculated brake polygon |
[out] | continueForwardPolygon | The calculated continue forward polygon |
|
virtual |
perform the RSS check of the objects
This function performs the following steps:
The protected callback functions allow to interact with the calculation process and e.g. allow to override intermediate results.
void ad::rss::map::RssRouteChecker< OBJECT_INSTANCE_TYPE >::clearOperationToMapAreaRestriction |
clear the restriction to a certain map area
This function clears the lanes to consider for all map operations.
|
inline |
check if the ego vehicle object is still present and currently active.
Check if the ego vehicle is available and still listed as active. The vehicles are active if they have been part of the latest check.
|
inline |
check if the ego vehicle object is still present.
ego vehicles are dropped from the internal list if there is not update on it for longer than the constructor parameter dropOutdatedObjecstDuration
.
|
inlineprotectedvirtual |
callback after object data of the ego vehicles has been updated
Callback functions called after the respective functionality is processed
The following set of callback functions are intentionally non const to allow derived classes to adapt intermediate results. Depending on the research activities conducted, this might be useful to quickly log and/or test out the effects of smaller changes to the complete proceessing chain.
void ad::rss::map::RssRouteChecker< OBJECT_INSTANCE_TYPE >::registerArtificialObjectInjectionCallback | ( | ::ad::physics::Distance const | artificialObjectSamplingDistance, |
ArtificialObjectInjectionCallbackFunctionType | artificialObjectsInjectionCallback | ||
) |
register a callback to inject artificial objects
This function allows to register a callback to inject artificial objects into the procssing of the checkObjects() function. The callback is triggered after the object and route data of the vehicles and pedestrians is updated to allow the injection function the reuse of already available data like map matched positions and future routes.
[in] | artificialObjectSamplingDistance | the sampling distance used for map matching of artificial objects (see ad::map::match::AdMapMatching::getMapMatchedBoundingBox() for a detailed description of this |
[in] | artificialObjectsInjectionCallback | the actual callback function to register (use nullptr to unregister) |
void ad::rss::map::RssRouteChecker< OBJECT_INSTANCE_TYPE >::registerCalculateTrajectorySetsCallback | ( | world::ObjectType | objectType, |
CalculateTrajectorySetsCallbackFunctionType | calculateTrajectorySetsCallback | ||
) |
Register a callback for unstructured trajectory set calculation.
[in] | objectType | The object type this trajectory set calculation should be applied |
[in] | calculateTrajectorySetsCallback | The actual callback function to perform the trajectory set calculation |
bool ad::rss::map::RssRouteChecker< OBJECT_INSTANCE_TYPE >::restrictOperationToIntersectionArea | ( | ::ad::map::point::ENUPoint const & | intersectionPoint, |
::ad::physics::Distance const & | intersectionDistance | ||
) |
restriction of the map area around an intersection to a set of reachable lanes
This function collects all reachable lanes from the intersection at the given intersectionPoint to consider for all map operations. Reachable in the sense of all inner intersection lanes plus all entry/exit arms of the intersection until the given intersectionDistance is reached.
[in] | intersectionPoint | the start points used to check for an intersection to be used |
[in] | intersectionDistance | distance to be used for a directionless prediction from all intersection border points |
true
if the map area is filled void ad::rss::map::RssRouteChecker< OBJECT_INSTANCE_TYPE >::restrictOperationToMapArea | ( | ::ad::map::lane::LaneIdSet const & | lanesToConsider | ) |
These group of functions restrict the operation of this class to a certain map area.
The computations within this class are heavily depending on the size and complexity of the used ad map. Especially use cases with many ego vehicles suffer from this. On the other hand, the use-cases with many vehicles are often restricted to specific locations on a map with a certain extend.
The following functions provide different means of restricting the lanes of the map that actually are being considered for internal computations like:
restriction of the map area to an explicit list of lanes
This function sets the lane to consider for all map operations.
[in] | lanesToConsider | the lanes of the map to be considered |
bool ad::rss::map::RssRouteChecker< OBJECT_INSTANCE_TYPE >::restrictOperationToMapArea | ( | ::ad::map::point::BoundingSphere const & | bounding_sphere | ) |
restriction of the map area to a bounding sphere
This function collects all lane within the given bounding sphere in a LaneIdSet to consider for all map operations. For collecting the lanes ::ad::map::lane::isNear() is called that checks for overlapping of the bounding sphere of the lane and the given bounding sphere.
[in] | bounding_sphere | the bounding sphere of the map area to be considered |
true
if the map area is filled bool ad::rss::map::RssRouteChecker< OBJECT_INSTANCE_TYPE >::restrictOperationToMapArea | ( | std::vector< ad::map::lane::MapAreaPredictionStartPoint > const & | predictionStartPoints | ) |
restriction of the map area to a set of reachable lanes
This function collects all reachable lanes from the given list of input MapAreaPredictionStartPoint to consider for all map operations.
[in] | predictionStartPoints | the start points used to perform route prediction with respective prediction distance and route creation mode |
true
if the map area is filled
|
inlineprotectedvirtual |
callback after the rssRouteCheckResult situations has been created for the respective ego vehicle
Filled members of rssRouteCheckResult:
|
inlineprotectedvirtual |
callback after all rssRouteCheckResult situations have been created for the respective ego vehicle
Filled members of respective rssRouteCheckResult: