scenario_simulator_v2 C++ API
|
Classes | |
struct | DistancesFromCenterToEdge |
class | Plane |
Represents a plane in 3D space, defined by a normal vector and a point on the plane. More... | |
class | LineSegment |
struct | IsLikeQuaternion |
struct | IsLikeQuaternion< T, std::void_t< decltype(std::declval< T >().x), decltype(std::declval< T >().y), decltype(std::declval< T >().z), decltype(std::declval< T >().w)> > |
class | PolynomialSolver |
class | CatmullRomSpline |
class | CatmullRomSplineInterface |
class | CatmullRomSubspline |
class | HermiteCurve |
struct | HasMemberW |
struct | HasMemberW< T, std::void_t< decltype(std::declval< T >().w)> > |
struct | IsLikeVector3 |
struct | IsLikeVector3< T, std::void_t< decltype(std::declval< T >().x), decltype(std::declval< T >().y), decltype(std::declval< T >().z), std::enable_if_t<!HasMemberW< T >::value > > > |
Typedefs | |
using | boost_point = boost::geometry::model::d2::point_xy< double > |
using | boost_polygon = boost::geometry::model::polygon< boost_point > |
Enumerations | |
enum class | Axis { X = 0 , Y = 1 , Z = 2 } |
Functions | |
std::optional< double > | getPolygonDistance (const geometry_msgs::msg::Pose &pose0, const traffic_simulator_msgs::msg::BoundingBox &bbox0, const geometry_msgs::msg::Pose &pose1, const traffic_simulator_msgs::msg::BoundingBox &bbox1) |
Get the Polygon Distance object. More... | |
std::optional< std::pair< geometry_msgs::msg::Pose, geometry_msgs::msg::Pose > > | getClosestPoses (const geometry_msgs::msg::Pose &pose0, const traffic_simulator_msgs::msg::BoundingBox &bbox0, const geometry_msgs::msg::Pose &pose1, const traffic_simulator_msgs::msg::BoundingBox &bbox1) |
boost_point | pointToSegmentProjection (const boost_point &p, const boost_point &p1, const boost_point &p2) |
boost_point | toBoostPoint (const geometry_msgs::msg::Point &point) |
boost_polygon | toBoostPolygon (const std::vector< geometry_msgs::msg::Point > &points) |
geometry_msgs::msg::Pose | toPose (const boost_point &point) |
geometry_msgs::msg::Pose | subtractPoses (const geometry_msgs::msg::Pose &pose1, const geometry_msgs::msg::Pose &pose2) |
auto | toPolygon2D (const traffic_simulator_msgs::msg::BoundingBox &bounding_box) -> std::vector< geometry_msgs::msg::Point > |
auto | toPolygon2D (const geometry_msgs::msg::Pose &pose, const traffic_simulator_msgs::msg::BoundingBox &bounding_box) -> boost_polygon |
std::vector< geometry_msgs::msg::Point > | getPointsFromBbox (const traffic_simulator_msgs::msg::BoundingBox &bounding_box, const double width_extension_right=0.0, const double width_extension_left=0.0, const double length_extension_front=0.0, const double length_extension_rear=0.0) |
DistancesFromCenterToEdge | getDistancesFromCenterToEdge (const traffic_simulator_msgs::msg::BoundingBox &bounding_box) |
double | getDistance (const geometry_msgs::msg::Point &p0, const geometry_msgs::msg::Point &p1) |
double | getDistance (const geometry_msgs::msg::Pose &p0, const geometry_msgs::msg::Point &p1) |
double | getDistance (const geometry_msgs::msg::Point &p0, const geometry_msgs::msg::Pose &p1) |
double | getDistance (const geometry_msgs::msg::Pose &p0, const geometry_msgs::msg::Pose &p1) |
double | getDistance2D (const std::vector< geometry_msgs::msg::Point > &polygon0, const std::vector< geometry_msgs::msg::Point > &polygon1) |
bool | checkCollision2D (const geometry_msgs::msg::Pose &pose0, const traffic_simulator_msgs::msg::BoundingBox &bbox0, const geometry_msgs::msg::Pose &pose1, const traffic_simulator_msgs::msg::BoundingBox &bbox1) |
bool | contains (const std::vector< geometry_msgs::msg::Point > &polygon, const geometry_msgs::msg::Point &point) |
bool | isIntersect2D (const LineSegment &line0, const LineSegment &line1) |
bool | isIntersect2D (const std::vector< LineSegment > &lines) |
std::optional< geometry_msgs::msg::Point > | getIntersection2D (const LineSegment &line0, const LineSegment &line1) |
std::vector< geometry_msgs::msg::Point > | getIntersection2D (const std::vector< LineSegment > &lines) |
auto | getLineSegments (const std::vector< geometry_msgs::msg::Point > &points, const bool close_start_end) -> std::vector< LineSegment > |
Get the line segments from points. More... | |
double | getMaxValue (const std::vector< geometry_msgs::msg::Point > &points, const Axis &axis) |
double | getMinValue (const std::vector< geometry_msgs::msg::Point > &points, const Axis &axis) |
std::vector< double > | filterByAxis (const std::vector< geometry_msgs::msg::Point > &points, const Axis &axis) |
std::vector< geometry_msgs::msg::Point > | get2DConvexHull (const std::vector< geometry_msgs::msg::Point > &points) |
template<typename T , std::enable_if_t< std::conjunction_v< IsLikeVector3< T >>, std::nullptr_t > = nullptr> | |
auto | convertEulerAngleToQuaternion (const T &v) |
template<typename T , std::enable_if_t< std::conjunction_v< IsLikeQuaternion< T >>, std::nullptr_t > = nullptr> | |
auto | getAngleDifference (const T &quat1, const T &quat2) -> double |
template<typename T , std::enable_if_t< std::conjunction_v< IsLikeQuaternion< T >>, std::nullptr_t > = nullptr> | |
auto | getNormalVector (const T &orientation) -> geometry_msgs::msg::Vector3 |
template<typename T , typename U , std::enable_if_t< std::conjunction_v< IsLikeQuaternion< T >, IsLikeQuaternion< U >>, std::nullptr_t > = nullptr> | |
auto | getRotation (T from, U to) |
template<typename T , std::enable_if_t< std::conjunction_v< IsLikeQuaternion< T >>, std::nullptr_t > = nullptr> | |
auto | getRotationMatrix (T quat) -> Eigen::Matrix3d |
template<typename T , typename U , typename V , typename W , std::enable_if_t< std::conjunction_v< std::is_scalar< T >, std::is_scalar< U >, std::is_scalar< V >, std::is_scalar< W >>, std::nullptr_t > = nullptr> | |
auto | makeQuaternion (const T &x, const U &y, const V &z, const W &w) |
template<typename T , typename U , std::enable_if_t< std::conjunction_v< IsLikeQuaternion< T >, IsLikeQuaternion< U >>, std::nullptr_t > = nullptr> | |
auto | operator+ (const T &a, const U &b) |
template<typename T , typename U , std::enable_if_t< std::conjunction_v< IsLikeQuaternion< T >, IsLikeQuaternion< U >>, std::nullptr_t > = nullptr> | |
auto | operator- (const T &a, const U &b) |
template<typename T , typename U , std::enable_if_t< std::conjunction_v< IsLikeQuaternion< T >, IsLikeQuaternion< U >>, std::nullptr_t > = nullptr> | |
auto | operator* (const T &a, const U &b) |
template<typename T , typename U , std::enable_if_t< std::conjunction_v< IsLikeQuaternion< T >, IsLikeQuaternion< U >>, std::nullptr_t > = nullptr> | |
auto | operator+= (T &a, const U &b) -> decltype(auto) |
template<typename T , std::enable_if_t< std::conjunction_v< IsLikeQuaternion< T >>, std::nullptr_t > = nullptr> | |
auto | convertQuaternionToEulerAngle (const T &q) |
template<typename T , typename U , typename V , std::enable_if_t< std::conjunction_v< IsLikeQuaternion< T >, IsLikeQuaternion< U >, std::is_scalar< V >>, std::nullptr_t > = nullptr> | |
auto | slerp (T quat1, U quat2, V t) |
const geometry_msgs::msg::Pose | getRelativePose (const geometry_msgs::msg::Pose &from, const geometry_msgs::msg::Pose &to) |
Get the relative pose between two poses. More... | |
const geometry_msgs::msg::Point | transformPoint (const geometry_msgs::msg::Pose &pose, const geometry_msgs::msg::Point &point) |
Get transformed pose in world frame. More... | |
const geometry_msgs::msg::Point | transformPoint (const geometry_msgs::msg::Pose &pose, const geometry_msgs::msg::Pose &sensor_pose, const geometry_msgs::msg::Point &point) |
Get transformed pose in sensor frame. More... | |
std::vector< geometry_msgs::msg::Point > | transformPoints (const geometry_msgs::msg::Pose &pose, const std::vector< geometry_msgs::msg::Point > &points) |
Get transformed points in world frame. More... | |
std::vector< geometry_msgs::msg::Point > | transformPoints (const geometry_msgs::msg::Pose &pose, const geometry_msgs::msg::Pose &sensor_pose, const std::vector< geometry_msgs::msg::Point > &points) |
Get transformed points in sensor frame. More... | |
template<typename T , typename U , std::enable_if_t< std::conjunction_v< IsLikeVector3< T >, IsLikeVector3< U >>, std::nullptr_t > = nullptr> | |
auto | hypot (const T &from, const U &to) |
template<typename T , typename U , std::enable_if_t< std::conjunction_v< IsLikeVector3< T >, IsLikeVector3< U >>, std::nullptr_t > = nullptr> | |
auto | innerProduct (const T &v0, const U &v1) |
template<typename T , typename U , std::enable_if_t< std::conjunction_v< IsLikeVector3< T >, IsLikeVector3< U >>, std::nullptr_t > = nullptr> | |
auto | getInternalAngle (const T &v0, const U &v1) |
template<typename T , std::enable_if_t< IsLikeVector3< T >::value, std::nullptr_t > = nullptr> | |
auto | norm (const T &v) |
template<typename T , std::enable_if_t< IsLikeVector3< T >::value, std::nullptr_t > = nullptr> | |
auto | normalize (const T &v) |
template<typename T , typename U , std::enable_if_t< std::conjunction_v< IsLikeVector3< T >, std::is_scalar< U >>, std::nullptr_t > = nullptr> | |
auto | operator/ (const T &a, const U &b) |
template<typename T , typename U , std::enable_if_t< std::conjunction_v< IsLikeVector3< T >, std::is_scalar< U >>, std::nullptr_t > = nullptr> | |
auto | truncate (const T &v, const U &max) |
template<typename T , typename U , typename V , std::enable_if_t< std::conjunction_v< std::is_scalar< T >, std::is_scalar< U >, std::is_scalar< V >>, std::nullptr_t > = nullptr> | |
auto | vector3 (const T &x, const U &y, const V &z) |
typedef boost::geometry::model::d2::point_xy< double > math::geometry::boost_point |
typedef boost::geometry::model::polygon< boost_point > math::geometry::boost_polygon |
|
strong |
bool math::geometry::checkCollision2D | ( | const geometry_msgs::msg::Pose & | pose0, |
const traffic_simulator_msgs::msg::BoundingBox & | bbox0, | ||
const geometry_msgs::msg::Pose & | pose1, | ||
const traffic_simulator_msgs::msg::BoundingBox & | bbox1 | ||
) |
bool math::geometry::contains | ( | const std::vector< geometry_msgs::msg::Point > & | polygon, |
const geometry_msgs::msg::Point & | point | ||
) |
auto math::geometry::convertEulerAngleToQuaternion | ( | const T & | v | ) |
auto math::geometry::convertQuaternionToEulerAngle | ( | const T & | q | ) |
std::vector< double > math::geometry::filterByAxis | ( | const std::vector< geometry_msgs::msg::Point > & | points, |
const Axis & | axis | ||
) |
std::vector< geometry_msgs::msg::Point > math::geometry::get2DConvexHull | ( | const std::vector< geometry_msgs::msg::Point > & | points | ) |
auto math::geometry::getAngleDifference | ( | const T & | quat1, |
const T & | quat2 | ||
) | -> double |
std::optional< std::pair< geometry_msgs::msg::Pose, geometry_msgs::msg::Pose > > math::geometry::getClosestPoses | ( | const geometry_msgs::msg::Pose & | pose0, |
const traffic_simulator_msgs::msg::BoundingBox & | bbox0, | ||
const geometry_msgs::msg::Pose & | pose1, | ||
const traffic_simulator_msgs::msg::BoundingBox & | bbox1 | ||
) |
double math::geometry::getDistance | ( | const geometry_msgs::msg::Point & | p0, |
const geometry_msgs::msg::Point & | p1 | ||
) |
double math::geometry::getDistance | ( | const geometry_msgs::msg::Point & | p0, |
const geometry_msgs::msg::Pose & | p1 | ||
) |
double math::geometry::getDistance | ( | const geometry_msgs::msg::Pose & | p0, |
const geometry_msgs::msg::Point & | p1 | ||
) |
double math::geometry::getDistance | ( | const geometry_msgs::msg::Pose & | p0, |
const geometry_msgs::msg::Pose & | p1 | ||
) |
double math::geometry::getDistance2D | ( | const std::vector< geometry_msgs::msg::Point > & | polygon0, |
const std::vector< geometry_msgs::msg::Point > & | polygon1 | ||
) |
DistancesFromCenterToEdge math::geometry::getDistancesFromCenterToEdge | ( | const traffic_simulator_msgs::msg::BoundingBox & | bounding_box | ) |
auto math::geometry::getInternalAngle | ( | const T & | v0, |
const U & | v1 | ||
) |
std::optional< geometry_msgs::msg::Point > math::geometry::getIntersection2D | ( | const LineSegment & | line0, |
const LineSegment & | line1 | ||
) |
std::vector< geometry_msgs::msg::Point > math::geometry::getIntersection2D | ( | const std::vector< LineSegment > & | lines | ) |
auto math::geometry::getLineSegments | ( | const std::vector< geometry_msgs::msg::Point > & | points, |
const bool | close_start_end | ||
) | -> std::vector< LineSegment > |
Get the line segments from points.
points | Points you want to build line segments. |
close_start_end | If true, returned line segments are connected their start and end. |
double math::geometry::getMaxValue | ( | const std::vector< geometry_msgs::msg::Point > & | points, |
const Axis & | axis | ||
) |
double math::geometry::getMinValue | ( | const std::vector< geometry_msgs::msg::Point > & | points, |
const Axis & | axis | ||
) |
auto math::geometry::getNormalVector | ( | const T & | orientation | ) | -> geometry_msgs::msg::Vector3 |
std::vector< geometry_msgs::msg::Point > math::geometry::getPointsFromBbox | ( | const traffic_simulator_msgs::msg::BoundingBox & | bounding_box, |
const double | width_extension_right = 0.0 , |
||
const double | width_extension_left = 0.0 , |
||
const double | length_extension_front = 0.0 , |
||
const double | length_extension_rear = 0.0 |
||
) |
std::optional< double > math::geometry::getPolygonDistance | ( | const geometry_msgs::msg::Pose & | pose0, |
const traffic_simulator_msgs::msg::BoundingBox & | bbox0, | ||
const geometry_msgs::msg::Pose & | pose1, | ||
const traffic_simulator_msgs::msg::BoundingBox & | bbox1 | ||
) |
Get the Polygon Distance object.
pose0 | pose of the first bounding box |
bbox0 | size of the first bounding box |
pose1 | pose of the second bounding box |
bbox1 | size of the second bounding box |
std::nullopt | bounding box intersects |
0 | <= distance between two bounding boxes |
const geometry_msgs::msg::Pose math::geometry::getRelativePose | ( | const geometry_msgs::msg::Pose & | from, |
const geometry_msgs::msg::Pose & | to | ||
) |
Get the relative pose between two poses.
from | origin pose |
to | target pose |
auto math::geometry::getRotation | ( | T | from, |
U | to | ||
) |
auto math::geometry::getRotationMatrix | ( | T | quat | ) | -> Eigen::Matrix3d |
auto math::geometry::hypot | ( | const T & | from, |
const U & | to | ||
) |
auto math::geometry::innerProduct | ( | const T & | v0, |
const U & | v1 | ||
) |
bool math::geometry::isIntersect2D | ( | const LineSegment & | line0, |
const LineSegment & | line1 | ||
) |
bool math::geometry::isIntersect2D | ( | const std::vector< LineSegment > & | lines | ) |
auto math::geometry::makeQuaternion | ( | const T & | x, |
const U & | y, | ||
const V & | z, | ||
const W & | w | ||
) |
auto math::geometry::norm | ( | const T & | v | ) |
auto math::geometry::normalize | ( | const T & | v | ) |
auto math::geometry::operator* | ( | const T & | a, |
const U & | b | ||
) |
auto math::geometry::operator+ | ( | const T & | a, |
const U & | b | ||
) |
auto math::geometry::operator+= | ( | T & | a, |
const U & | b | ||
) | -> decltype(auto) |
auto math::geometry::operator- | ( | const T & | a, |
const U & | b | ||
) |
auto math::geometry::operator/ | ( | const T & | a, |
const U & | b | ||
) |
boost_point math::geometry::pointToSegmentProjection | ( | const boost_point & | p, |
const boost_point & | p1, | ||
const boost_point & | p2 | ||
) |
auto math::geometry::slerp | ( | T | quat1, |
U | quat2, | ||
V | t | ||
) |
geometry_msgs::msg::Pose math::geometry::subtractPoses | ( | const geometry_msgs::msg::Pose & | pose1, |
const geometry_msgs::msg::Pose & | pose2 | ||
) |
boost_point math::geometry::toBoostPoint | ( | const geometry_msgs::msg::Point & | point | ) |
boost_polygon math::geometry::toBoostPolygon | ( | const std::vector< geometry_msgs::msg::Point > & | points | ) |
auto math::geometry::toPolygon2D | ( | const geometry_msgs::msg::Pose & | pose, |
const traffic_simulator_msgs::msg::BoundingBox & | bounding_box | ||
) | -> boost_polygon |
auto math::geometry::toPolygon2D | ( | const traffic_simulator_msgs::msg::BoundingBox & | bounding_box | ) | -> std::vector<geometry_msgs::msg::Point> |
geometry_msgs::msg::Pose math::geometry::toPose | ( | const boost_point & | point | ) |
const geometry_msgs::msg::Point math::geometry::transformPoint | ( | const geometry_msgs::msg::Pose & | pose, |
const geometry_msgs::msg::Point & | point | ||
) |
Get transformed pose in world frame.
pose | pose world frame |
point | point in local frame |
const geometry_msgs::msg::Point math::geometry::transformPoint | ( | const geometry_msgs::msg::Pose & | pose, |
const geometry_msgs::msg::Pose & | sensor_pose, | ||
const geometry_msgs::msg::Point & | point | ||
) |
Get transformed pose in sensor frame.
pose | pose in world frame |
sensor_pose | sensor pose in world frame |
point | point in local frame |
std::vector< geometry_msgs::msg::Point > math::geometry::transformPoints | ( | const geometry_msgs::msg::Pose & | pose, |
const geometry_msgs::msg::Pose & | sensor_pose, | ||
const std::vector< geometry_msgs::msg::Point > & | points | ||
) |
Get transformed points in sensor frame.
pose | pose in world frame |
points | points in local frame |
std::vector< geometry_msgs::msg::Point > math::geometry::transformPoints | ( | const geometry_msgs::msg::Pose & | pose, |
const std::vector< geometry_msgs::msg::Point > & | points | ||
) |
Get transformed points in world frame.
pose | pose in world frame |
points | points in local frame |
auto math::geometry::truncate | ( | const T & | v, |
const U & | max | ||
) |
auto math::geometry::vector3 | ( | const T & | x, |
const U & | y, | ||
const V & | z | ||
) |