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

Merge branch 'add_get_lane_altitude_helper' into 'main'

Add GetLaneHeightAtPosition in lane query service

See merge request !191
parents 6495b656 293cd1d8
No related branches found
Tags v11.0.0
1 merge request!191Add GetLaneHeightAtPosition in lane query service
Pipeline #66759 passed
/*******************************************************************************
* Copyright (c) 2021-2023, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* Copyright (c) 2021-2025, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
* Copyright (c) 2022 Ansys, Inc.
*
* This program and the accompanying materials are made
......@@ -186,6 +186,15 @@ public:
/// first lane in the list is considered. No value, if the position is not on a lane.
[[nodiscard]] virtual std::optional<Vec3<units::length::meter_t>> GetProjectedCenterLinePoint(
const Vec3<units::length::meter_t>& position) const = 0;
/// Tries to map a given position (only x/y coordinate considered) to the top-most lane at that position and then
/// returns the height of the road surface at the given position.
///
/// @param position Position that shall be mapped to a lane. Must be on a lane (use IsPositionOnLane() before).
/// @return Height of the road surface of the top-most lane in world coordinate system (z-coordinate)
/// @throw If the position cannot be mapped to a lane
[[nodiscard]] virtual units::length::meter_t GetLaneHeightAtPosition(
const Vec3<units::length::meter_t>& position) const = 0;
};
} // namespace mantle_api
......
......@@ -139,11 +139,8 @@ public:
MOCK_METHOD(Orientation3<units::angle::radian_t>, GetLaneOrientation, (const Vec3<units::length::meter_t>& position), (const override));
MOCK_METHOD(Vec3<units::length::meter_t>, GetUpwardsShiftedLanePosition, (const Vec3<units::length::meter_t>& position, double upwards_shift, bool allowed_to_leave_lane), (const override));
bool IsPositionOnLane(const Vec3<units::length::meter_t>& position) const override
{
std::ignore = position;
return false;
}
MOCK_METHOD(bool, IsPositionOnLane, (const Vec3<units::length::meter_t>& position), (const override));
MOCK_METHOD(std::vector<UniqueId>, GetLaneIdsAtPosition, (const Vec3<units::length::meter_t>& position), (const override));
......@@ -186,6 +183,8 @@ public:
(const Vec3<units::length::meter_t>&),
(const, override));
MOCK_METHOD(units::length::meter_t, GetLaneHeightAtPosition, (const Vec3<units::length::meter_t>&), (const));
private:
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