|
maliput
|
Abstract interface for providing access to RoadObjects in a road network.
RoadObjectBook provides methods to query road objects by various criteria such as ID, type, lane association, or proximity to a position. Implementations are provided by specific backends (e.g., maliput_malidrive for OpenDRIVE maps, maliput_osm for OpenStreetMap data).
This follows the same pattern as TrafficLightBook and TrafficSignBook.
#include <include/maliput/api/objects/road_object_book.h>
Public Member Functions | |
| virtual | ~RoadObjectBook ()=default |
| std::vector< const RoadObject * > | RoadObjects () const |
| Returns all RoadObjects in this book. More... | |
| const RoadObject * | GetRoadObject (const RoadObject::Id &id) const |
| Gets the RoadObject with the specified ID. More... | |
| std::vector< const RoadObject * > | FindByType (RoadObjectType type) const |
| Returns all RoadObjects of the specified type. More... | |
| std::vector< const RoadObject * > | FindByLane (const LaneId &lane_id) const |
Returns all RoadObjects whose related_lanes() includes lane_id. More... | |
| std::vector< const RoadObject * > | FindInRadius (const InertialPosition &position, double radius) const |
| Returns all RoadObjects within a specified radius of an inertial position. More... | |
Protected Member Functions | |
| RoadObjectBook ()=default | |
|
virtualdefault |
Reimplemented in RoadObjectBook.
|
protecteddefault |
| std::vector<const RoadObject*> FindByLane | ( | const LaneId & | lane_id | ) | const |
Returns all RoadObjects whose related_lanes() includes lane_id.
| lane_id | The identifier of the lane. |
| std::vector<const RoadObject*> FindByType | ( | RoadObjectType | type | ) | const |
Returns all RoadObjects of the specified type.
| type | The type of road objects to retrieve. |
| std::vector<const RoadObject*> FindInRadius | ( | const InertialPosition & | position, |
| double | radius | ||
| ) | const |
Returns all RoadObjects within a specified radius of an inertial position.
This performs a spatial proximity query using the object's position in the inertial frame. Useful for perception-like queries (e.g., "what objects are near this vehicle?").
| position | The center position for the search. |
| radius | The search radius in meters. Must be non-negative. |
| const RoadObject* GetRoadObject | ( | const RoadObject::Id & | id | ) | const |
Gets the RoadObject with the specified ID.
| id | The unique identifier of the road object. |
| std::vector<const RoadObject*> RoadObjects | ( | ) | const |
Returns all RoadObjects in this book.