Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
|
Classes | |
struct | MapOptions |
Functions | |
lanelet::Point3d | getPoint (double x, double y, double z) |
helper function for quickly creating a lanelet::Point3d. random id is assigned More... | |
lanelet::BasicPoint2d | getBasicPoint (double x, double y) |
helper function for quickly creating a lanelet::BasicPoint. random id is assigned More... | |
lanelet::Lanelet | getLanelet (lanelet::LineString3d &left_ls, lanelet::LineString3d &right_ls, const lanelet::Attribute &left_sub_type=lanelet::AttributeValueString::SolidSolid, const lanelet::Attribute &right_sub_type=lanelet::AttributeValueString::Solid) |
helper function for quickly creating a lanelet::Lanelet using linestrings. random id is assigned More... | |
lanelet::Lanelet | getLanelet (std::vector< lanelet::Point3d > left, std::vector< lanelet::Point3d > right, const lanelet::Attribute &left_sub_type=lanelet::AttributeValueString::SolidSolid, const lanelet::Attribute &right_sub_type=lanelet::AttributeValueString::Solid) |
helper function for quickly creating a lanelet::Lanelet using points. random id is assigned More... | |
lanelet::Lanelet | getLanelet (lanelet::Id id, lanelet::LineString3d left_ls, lanelet::LineString3d right_ls, const lanelet::Attribute &left_sub_type=lanelet::AttributeValueString::SolidSolid, const lanelet::Attribute &right_sub_type=lanelet::AttributeValueString::Solid) |
helper function for quickly creating a lanelet::Lanelet using linestrings. id is specified More... | |
lanelet::Lanelet | getLanelet (lanelet::Id id, std::vector< lanelet::Point3d > left, std::vector< lanelet::Point3d > right, const lanelet::Attribute &left_sub_type=lanelet::AttributeValueString::SolidSolid, const lanelet::Attribute &right_sub_type=lanelet::AttributeValueString::Solid) |
helper function for quickly creating a lanelet::Lanelet using points. id is specified More... | |
lanelet::LaneletMapPtr | buildGuidanceTestMap (double width, double length, int num=1) |
helper function for creating lanelet map for getGuidanceTestMap More... | |
void | addObstacle (double x, double y, std::shared_ptr< carma_wm::CARMAWorldModel > cmw, std::vector< std::pair< double, double > > pred_coords={}, int time_step=100, double width=3, double length=3) |
adds a roadway object at the specified cartesian coords More... | |
void | addObstacle (carma_wm::TrackPos tp, lanelet::Id lanelet_id, std::shared_ptr< carma_wm::CARMAWorldModel > cmw, std::vector< carma_wm::TrackPos > pred_trackpos_list={}, int time_step=100, double width=3, double length=3) |
adds a roadway object at the specified trackpos relative to the given lanelet id More... | |
void | setSpeedLimit (lanelet::Velocity speed_limit, std::shared_ptr< carma_wm::CARMAWorldModel > cmw) |
Sets all lanelets in the map the given speed limit. More... | |
void | setRouteByLanelets (std::vector< lanelet::ConstLanelet > lanelets, std::shared_ptr< carma_wm::CARMAWorldModel > cmw) |
Sets the route by series of lanelets. More... | |
void | setRouteByIds (std::vector< lanelet::Id > lanelet_ids, std::shared_ptr< carma_wm::CARMAWorldModel > cmw) |
Sets the route by series of lanelets id. More... | |
void | addTrafficLight (std::shared_ptr< carma_wm::CARMAWorldModel > cmw, lanelet::Id light_id, std::vector< lanelet::Id > entry_lanelet_ids, std::vector< lanelet::Id > exit_lanelet_ids, std::vector< std::pair< boost::posix_time::ptime, lanelet::CarmaTrafficSignalState > > timing_plan={ std::make_pair< boost::posix_time::ptime, lanelet::CarmaTrafficSignalState >(lanelet::time::timeFromSec(0), lanelet::CarmaTrafficSignalState::PROTECTED_MOVEMENT_ALLOWED), std::make_pair< boost::posix_time::ptime, lanelet::CarmaTrafficSignalState >(lanelet::time::timeFromSec(4.0), lanelet::CarmaTrafficSignalState::PROTECTED_CLEARANCE), std::make_pair< boost::posix_time::ptime, lanelet::CarmaTrafficSignalState >(lanelet::time::timeFromSec(24.0), lanelet::CarmaTrafficSignalState::STOP_AND_REMAIN), std::make_pair< boost::posix_time::ptime, lanelet::CarmaTrafficSignalState >(lanelet::time::timeFromSec(44.0), lanelet::CarmaTrafficSignalState::PROTECTED_MOVEMENT_ALLOWED) }) |
Method adds a traffic light to the provided world model instance NOTE: The stop line for the light will be located at the end of the owning_lanelets (in order) and formed from their two bound end points. NOTE: Exit lanelet matches the entry lanelets by order. More... | |
std::shared_ptr< carma_wm::CARMAWorldModel > | getGuidanceTestMap (MapOptions map_options) |
Gets the CARMAWorldModel for the guidance test map. More... | |
std::shared_ptr< carma_wm::CARMAWorldModel > | getGuidanceTestMap () |
|
inline |
adds a roadway object at the specified trackpos relative to the given lanelet id
tp | TrackPos relative to the given lanelet_id |
lanelet_id | Lanelet Id to place the roadway object relative to |
cmw | CARMAWorldModel shared ptr |
pred_trackpos_list | vector of TrackPos predicted coords with 1s interval in the future. This is relative to the given lanelet_id |
time_step | time_step interval for each predicted coords (milliseconds) |
width | width of roadway object, default 3 meters |
length | length of roadway object, default 3 meters NOTE: This assumes a similar simple shape of the GuidanceTestMap and does not populate cartesian components of the roadway object. |
Definition at line 329 of file WMTestLibForGuidance.hpp.
|
inline |
adds a roadway object at the specified cartesian coords
x | coord |
y | coord |
cmw | CARMAWorldModel shared ptr |
pred_coords | vector of std::pair(x,y) predicted coords with 1s interval in the future |
time_step | time_step interval for each predicted coords (milliseconds) |
width | width of roadway object, default 3 meters |
length | length of roadway object, default 3 meters NOTE: x,y is the center of your object |
Definition at line 266 of file WMTestLibForGuidance.hpp.
Referenced by getGuidanceTestMap().
|
inline |
Method adds a traffic light to the provided world model instance NOTE: The stop line for the light will be located at the end of the owning_lanelets (in order) and formed from their two bound end points. NOTE: Exit lanelet matches the entry lanelets by order.
cmw | The world model instance to update |
light_id | The lanelet id to use for the generated traffic light regulatory element. This id should NOT be present in the map prior to this method call |
entry_lanelet_ids | The ids of the lanelet which will own the traffic light element. These ids MUST be present in the map prior to this method being called |
exit_lanelet_ids | The ids of the exit lanelet of this traffic light. These ids MUST be present in the map prior to this method being called |
timeing_plan | Optional parameter that is the timing plan to use for the light. The specifications match those of CarmaTrafficSignalState.setStates() The default timing plan is 4sec yewllow, 20sec red, 20sec green |
if | any of the lanelet is not in map, or entry/exit lanelet sizes do not match |
Definition at line 502 of file WMTestLibForGuidance.hpp.
|
inline |
helper function for creating lanelet map for getGuidanceTestMap
width | width of single lanelet, default is 3.7 meters which is US standard |
length | length of a single lanelet, default is 25 meters to accomplish 100 meters of full lane |
num | how many number of segments should linestrings of the lanelet have. a.k.a num + 1 points in each linestring |
Definition at line 184 of file WMTestLibForGuidance.hpp.
References lanelet::MapConformer::ensureCompliance(), getLanelet(), getPoint(), and process_bag::i.
Referenced by getGuidanceTestMap().
|
inline |
helper function for quickly creating a lanelet::BasicPoint. random id is assigned
x | coord |
y | coord |
Definition at line 92 of file WMTestLibForGuidance.hpp.
References getPoint(), process_traj_logs::x, and process_traj_logs::y.
|
inline |
Definition at line 596 of file WMTestLibForGuidance.hpp.
References getGuidanceTestMap().
|
inline |
Gets the CARMAWorldModel for the guidance test map.
width | width of single lanelet, default is 3.7 meters which is US standard |
length | length of a single lanelet, default is 25 meters to accomplish 100 meters of full lane |
map_options | vector of enum map_options. No input is DEFAULT options, but empty vector is NO_OBSTACLE, NO_SPEED_LIMIT options. if mix and match, provide each one explicitly e.g. NO_OBSTACLE, DEFAULT_SPEED_LIMIT NOTE: Input 1/4th of full lane length you want to accomplish in length. |
Definition at line 569 of file WMTestLibForGuidance.hpp.
References addObstacle(), buildGuidanceTestMap(), carma_wm::test::MapOptions::DEFAULT, carma_wm::test::MapOptions::lane_length_, carma_wm::test::MapOptions::lane_width_, carma_wm::test::MapOptions::obstacle_, carma_wm::test::MapOptions::seg_num_, setRouteByIds(), setSpeedLimit(), and carma_wm::test::MapOptions::speed_limit_.
Referenced by getGuidanceTestMap().
|
inline |
helper function for quickly creating a lanelet::Lanelet using linestrings. id is specified
id | lanelet_id to use. it must be never used anywhere before |
left_ls | left linestring to use |
right_ls | right linestring to use |
left_sub_type | left linestring's line type. defaults to double solid line |
right_sub_type | right linestring's line type. defaults to solid line |
Definition at line 154 of file WMTestLibForGuidance.hpp.
References getLanelet().
|
inline |
helper function for quickly creating a lanelet::Lanelet using points. id is specified
id | lanelet_id to use. it must be never used anywhere before |
left | vector of points to use for left linestring |
right | vector of points to use for right linestring |
left_sub_type | left linestring's line type. defaults to double solid line |
right_sub_type | right linestring's line type. defaults to solid line |
Definition at line 170 of file WMTestLibForGuidance.hpp.
References getLanelet().
|
inline |
helper function for quickly creating a lanelet::Lanelet using linestrings. random id is assigned
left_ls | left linestring to use |
right_ls | right linestring to use |
left_sub_type | left linestring's line type. defaults to double solid line |
right_sub_type | right linestring's line type. defaults to solid line |
Definition at line 104 of file WMTestLibForGuidance.hpp.
Referenced by buildGuidanceTestMap(), and getLanelet().
|
inline |
helper function for quickly creating a lanelet::Lanelet using points. random id is assigned
left | vector of points to use for left linestring |
right | vector of points to use for right linestring |
left_sub_type | left linestring's line type. defaults to double solid line |
right_sub_type | right linestring's line type. defaults to solid line |
Definition at line 135 of file WMTestLibForGuidance.hpp.
References getLanelet().
|
inline |
helper function for quickly creating a lanelet::Point3d. random id is assigned
x | coord |
y | coord |
z | coord |
Definition at line 83 of file WMTestLibForGuidance.hpp.
References process_traj_logs::x, and process_traj_logs::y.
Referenced by buildGuidanceTestMap(), and getBasicPoint().
|
inline |
Sets the route by series of lanelets id.
lanelets | lanelets that you want the route to follow |
cmw | CARMAWorldModel shared_ptr |
std::invalid_argument | if fewer than 2 lanelets passed, or the given lanelets are not routable |
Definition at line 476 of file WMTestLibForGuidance.hpp.
References setRouteByLanelets().
Referenced by getGuidanceTestMap().
|
inline |
Sets the route by series of lanelets.
lanelets | lanelets that you want the route to follow |
cmw | CARMAWorldModel shared_ptr |
std::invalid_argument | if fewer than 2 lanelets passed, or the given lanelets are not routable |
Definition at line 433 of file WMTestLibForGuidance.hpp.
Referenced by setRouteByIds().
|
inline |
Sets all lanelets in the map the given speed limit.
speed_limit | speed limit value to set |
cmw | CARMAWorldModel |
std::invalid_argument | if the map is not set, contains no lanelets NOTE: this overwrites existing speed limit regulatory elements in the map |
Definition at line 402 of file WMTestLibForGuidance.hpp.
Referenced by getGuidanceTestMap().