Skip to content
Snippets Groups Projects
Commit 019aef26 authored by Andreas Rauschert's avatar Andreas Rauschert
Browse files

Merge branch 'add_relative_lane_position_issue_5513624' into 'master'

Add FindRelativeLanePoseDistanceFrom in query service interface

See merge request eclipse/simopenpass/scenario_api!39
parents 52a185fe d93994d7
No related branches found
Tags v2.1.0
1 merge request!39Add FindRelativeLanePoseDistanceFrom in query service interface
...@@ -59,6 +59,15 @@ public: ...@@ -59,6 +59,15 @@ public:
///@param direction Direction to go along the lane from the reference_pose_on_lane. The orientation of the reference pose is used to determine the forward direction. "Forward" means aligned with the positive x direction of the local coordinate system defined by the pose. ///@param direction Direction to go along the lane from the reference_pose_on_lane. The orientation of the reference pose is used to determine the forward direction. "Forward" means aligned with the positive x direction of the local coordinate system defined by the pose.
///@return Pose that is at the given distance from reference_pose_on_lane in the specified direction. The new orientation is parallel to the lane orientation at the target position. ///@return Pose that is at the given distance from reference_pose_on_lane in the specified direction. The new orientation is parallel to the lane orientation at the target position.
virtual std::optional<Pose> FindLanePoseAtDistanceFrom(const Pose& reference_pose_on_lane, units::length::meter_t distance, Direction direction) const = 0; virtual std::optional<Pose> FindLanePoseAtDistanceFrom(const Pose& reference_pose_on_lane, units::length::meter_t distance, Direction direction) const = 0;
/// @brief Calculate a new pose which is at certain distance in a relative lane from the reference_pose_on_lane.
///
///@param reference_pose_on_lane Starting position. Must be on a lane.
///@param relative_target_lane Shift of the target position in number of lanes relative to the lane where the reference pose is located. Positive to the left, negative to the right.
///@param distance The longitudinal distance along the centerline of the lane closest to the reference pose. The orientation of the reference pose is used to determine the direction. Positive distance means aligned with the positive x direction of the local coordinate system defined by the pose.
///@param lateral_offset Lateral offset to the target lane
///@return Pose that is at the given distance from reference_pose_on_lane in a relative lane. The new orientation is parallel to the lane orientation at the target position.
virtual std::optional<Pose> FindRelativeLanePoseAtDistanceFrom(const Pose& reference_pose_on_lane, int relative_target_lane, units::length::meter_t distance, units::length::meter_t lateral_offset) const = 0;
}; };
} // namespace mantle_api } // namespace mantle_api
......
...@@ -141,6 +141,15 @@ public: ...@@ -141,6 +141,15 @@ public:
Pose pose{}; Pose pose{};
return pose; return pose;
} }
std::optional<Pose> FindRelativeLanePoseAtDistanceFrom(const Pose& reference_pose_on_lane, int relative_target_lane, units::length::meter_t distance, units::length::meter_t lateral_offset) const override
{
std::ignore = reference_pose_on_lane;
std::ignore = relative_target_lane;
std::ignore = distance;
std::ignore = lateral_offset;
Pose pose{};
return pose;
}
private: private:
MockVehicle test_vehicle_{}; MockVehicle test_vehicle_{};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment