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 | MovingObject |
Typedefs | |
typedef boost::geometry::model::point< double, 2, boost::geometry::cs::cartesian > | point_t |
typedef boost::geometry::model::polygon< point_t > | polygon_t |
Functions | |
std::vector< carma_perception_msgs::msg::RoadwayObstacle > | WorldCollisionDetection (const carma_perception_msgs::msg::RoadwayObstacleList &rwol, const carma_planning_msgs::msg::TrajectoryPlan &tp, const geometry_msgs::msg::Vector3 &size, const geometry_msgs::msg::Twist &velocity) |
Main collision detection function to be called when needed to check for collision detection of the vehicle with the current trajectory plan and the current world objects. More... | |
collision_detection::MovingObject | ConvertRoadwayObstacleToMovingObject (const carma_perception_msgs::msg::RoadwayObstacle &rwo) |
Convert RodwayObstable object to the collision_detection::MovingObject. More... | |
collision_detection::MovingObject | ConvertVehicleToMovingObject (const carma_planning_msgs::msg::TrajectoryPlan &tp, const geometry_msgs::msg::Vector3 &size, const geometry_msgs::msg::Twist &veloctiy) |
Creates collision_detection::MovingObject for the host vehicle using the veloctiy, size, TrajectoryPlan. More... | |
collision_detection::MovingObject | PredictObjectPosition (collision_detection::MovingObject const &op, __uint64_t target_time) |
.function is to create a monving object with a polygon that represents area that object is going to allocated until a given time by creating a convex hull around the future polygons More... | |
bool | CheckPolygonIntersection (collision_detection::MovingObject const &ob_1, collision_detection::MovingObject const &ob_2) |
.check Intersection between polygons More... | |
bool | DetectCollision (collision_detection::MovingObject const &ob_1, collision_detection::MovingObject const &ob_2, __uint64_t target_time) |
.function is used in WorldCollisionDetection to detection collision between two Moving Object More... | |
template<class P > | |
P | ObjectToBoostPolygon (const geometry_msgs::msg::Pose &pose, const geometry_msgs::msg::Vector3 &size) |
function to create a polygon representing and object More... | |
typedef boost::geometry::model::point<double, 2, boost::geometry::cs::cartesian> carma_wm::collision_detection::point_t |
Definition at line 42 of file collision_detection.hpp.
typedef boost::geometry::model::polygon<point_t> carma_wm::collision_detection::polygon_t |
Definition at line 43 of file collision_detection.hpp.
bool carma_wm::collision_detection::CheckPolygonIntersection | ( | collision_detection::MovingObject const & | ob_1, |
collision_detection::MovingObject const & | ob_2 | ||
) |
.check Intersection between polygons
Definition at line 176 of file collision_detection.cpp.
References carma_wm::collision_detection::MovingObject::object_polygon.
Referenced by DetectCollision().
collision_detection::MovingObject carma_wm::collision_detection::ConvertRoadwayObstacleToMovingObject | ( | const carma_perception_msgs::msg::RoadwayObstacle & | rwo | ) |
Convert RodwayObstable object to the collision_detection::MovingObject.
rwo | A RoadwayObstacle |
Definition at line 92 of file collision_detection.cpp.
References carma_wm::collision_detection::MovingObject::fp, process_bag::i, carma_wm::collision_detection::MovingObject::linear_velocity, and carma_wm::collision_detection::MovingObject::object_polygon.
collision_detection::MovingObject carma_wm::collision_detection::ConvertVehicleToMovingObject | ( | const carma_planning_msgs::msg::TrajectoryPlan & | tp, |
const geometry_msgs::msg::Vector3 & | size, | ||
const geometry_msgs::msg::Twist & | veloctiy | ||
) |
Creates collision_detection::MovingObject for the host vehicle using the veloctiy, size, TrajectoryPlan.
tp | The TrajectoryPlan of the host vehicle |
size | The size of the host vehicle defined in meters |
veloctiy | of the host vehicle |
Definition at line 113 of file collision_detection.cpp.
References carma_wm::collision_detection::MovingObject::fp, process_bag::i, carma_wm::collision_detection::MovingObject::linear_velocity, and carma_wm::collision_detection::MovingObject::object_polygon.
bool carma_wm::collision_detection::DetectCollision | ( | collision_detection::MovingObject const & | ob_1, |
collision_detection::MovingObject const & | ob_2, | ||
__uint64_t | target_time | ||
) |
.function is used in WorldCollisionDetection to detection collision between two Moving Object
Definition at line 163 of file collision_detection.cpp.
References CheckPolygonIntersection(), and PredictObjectPosition().
P carma_wm::collision_detection::ObjectToBoostPolygon | ( | const geometry_msgs::msg::Pose & | pose, |
const geometry_msgs::msg::Vector3 & | size | ||
) |
function to create a polygon representing and object
Definition at line 221 of file collision_detection.cpp.
collision_detection::MovingObject carma_wm::collision_detection::PredictObjectPosition | ( | collision_detection::MovingObject const & | op, |
__uint64_t | target_time | ||
) |
.function is to create a monving object with a polygon that represents area that object is going to allocated until a given time by creating a convex hull around the future polygons
op | a MovingObject TODO this function can be optimize due the fact that in large target_time returning the entire volum for path will result in false positive. |
Definition at line 190 of file collision_detection.cpp.
References carma_wm::collision_detection::MovingObject::fp, process_bag::i, and carma_wm::collision_detection::MovingObject::linear_velocity.
Referenced by DetectCollision().
std::vector< carma_perception_msgs::msg::RoadwayObstacle > carma_wm::collision_detection::WorldCollisionDetection | ( | const carma_perception_msgs::msg::RoadwayObstacleList & | rwol, |
const carma_planning_msgs::msg::TrajectoryPlan & | tp, | ||
const geometry_msgs::msg::Vector3 & | size, | ||
const geometry_msgs::msg::Twist & | velocity | ||
) |
Main collision detection function to be called when needed to check for collision detection of the vehicle with the current trajectory plan and the current world objects.
Main Function for the CollisionChecking interfacing.
size | The size of the host vehicle defined in meters |
rwol | The list of Roadway Obstacle |
tp | The TrajectoryPlan of the host vehicle |
size | The size of the host vehicle defined in meters |
velocity | of the host vehicle m/s |
Definition at line 26 of file collision_detection.cpp.
References process_bag::i, process_traj_logs::x, and process_traj_logs::y.