Skip to content
Snippets Groups Projects
Commit 29cd6e6b authored by Reinhard Biegel's avatar Reinhard Biegel
Browse files

Merge branch 'update' into 'master'

Update interface

See merge request eclipse/simopenpass/scenario_api!2
parents b2c3511a 694abe44
No related branches found
No related tags found
1 merge request!2Update interface
Showing
with 279 additions and 198 deletions
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
################################################################################
# Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
#
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
cc_library(
name = "mantle_api",
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file bounding_box.h */
......@@ -15,20 +15,24 @@
#ifndef MANTLEAPI_COMMON_BOUNDINGBOX_H
#define MANTLEAPI_COMMON_BOUNDINGBOX_H
#include <MantleAPI/Common/i_position.h>
#include <MantleAPI/Common/dimension.h>
#include <MantleAPI/Common/vector.h>
namespace mantle_api
{
/// Bounding box is defined in local object coordinate system.
/// The origin of the object coordinate system is defined in relation to the geometric center.
/// Bounding box is defined in local entity coordinate system.
/// The origin of the entity coordinate system is defined in relation to the geometric center.
struct BoundingBox
{
Vec3d geometric_center{0.0, 0.0, 0.0};
double width{0.0};
double length{0.0};
double height{0.0};
Dimension3d dimension{0.0, 0.0, 0.0};
};
inline bool operator==(const BoundingBox& lhs, const BoundingBox& rhs) noexcept
{
return lhs.geometric_center == rhs.geometric_center && lhs.dimension == rhs.dimension;
}
} // namespace mantle_api
#endif // MANTLEAPI_COMMON_BOUNDINGBOX_H
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file dimension.h */
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file floating_point_helper.h */
//-----------------------------------------------------------------------------
#ifndef THIRDPARTY_MANTLEAPI_INCLUDE_MANTLEAPI_COMMON_FLOATING_POINT_HELPER_H
#define THIRDPARTY_MANTLEAPI_INCLUDE_MANTLEAPI_COMMON_FLOATING_POINT_HELPER_H
#ifndef MANTLEAPI_COMMON_FLOATING_POINT_HELPER_H
#define MANTLEAPI_COMMON_FLOATING_POINT_HELPER_H
#include <cmath>
#include <limits>
#include <type_traits>
namespace mantle_api
{
......@@ -90,4 +91,4 @@ bool LessOrEqual(T lhs, T rhs, T precision = std::numeric_limits<T>::epsilon())
}
} // namespace mantle_api
#endif // THIRDPARTY_MANTLEAPI_INCLUDE_MANTLEAPI_COMMON_FLOATING_POINT_HELPER_H
#endif // MANTLEAPI_COMMON_FLOATING_POINT_HELPER_H
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file i_identifiable.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_COMMON_IIDENTIFIABLE_H
#define MANTLEAPI_COMMON_IIDENTIFIABLE_H
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file orientation.h */
//-----------------------------------------------------------------------------
#ifndef SIMULATOR_ORIENTATION_H
#define SIMULATOR_ORIENTATION_H
#ifndef MANTLEAPI_COMMON_ORIENTATION_H
#define MANTLEAPI_COMMON_ORIENTATION_H
#include <MantleAPI/Common/floating_point_helper.h>
......@@ -24,6 +23,9 @@ namespace mantle_api
template <typename T>
struct Orientation3
{
Orientation3() = default;
Orientation3(T yaw, T pitch, T roll) : yaw{yaw}, pitch{pitch}, roll{roll} {}
T yaw{};
T pitch{};
T roll{};
......@@ -41,6 +43,16 @@ inline bool operator!=(const Orientation3d& lhs, const Orientation3d& rhs) noexc
return !(lhs == rhs);
}
inline Orientation3d operator+(const Orientation3d& lhs, const Orientation3d& rhs) noexcept
{
return Orientation3d{lhs.yaw + rhs.yaw, lhs.pitch + rhs.pitch, lhs.roll + rhs.roll};
}
inline Orientation3d operator-(const Orientation3d& lhs, const Orientation3d& rhs) noexcept
{
return Orientation3d{lhs.yaw - rhs.yaw, lhs.pitch - rhs.pitch, lhs.roll - rhs.roll};
}
} // namespace mantle_api
#endif // SIMULATOR_ORIENTATION_H
#endif // MANTLEAPI_COMMON_ORIENTATION_H
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file pose.h */
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file position.h */
//-----------------------------------------------------------------------------
#ifndef SCENARIOABSTRACT_COMMON_IPOSITION_H
#define SCENARIOABSTRACT_COMMON_IPOSITION_H
#ifndef MANTLEAPI_COMMON_IPOSITION_H
#define MANTLEAPI_COMMON_IPOSITION_H
#include <MantleAPI/Common/floating_point_helper.h>
#include <MantleAPI/Common/vector.h>
......@@ -79,4 +79,4 @@ inline bool operator!=(const LatLonPosition& lhs, const LatLonPosition& rhs) noe
}
} // namespace mantle_api
#endif // SCENARIOABSTRACT_COMMON_IPOSITION_H
#endif // MANTLEAPI_COMMON_IPOSITION_H
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file simulation_time.h */
//-----------------------------------------------------------------------------
#ifndef SCENARIOABSTRACT_COMMON_SIMULATION_TIME_H
#define SCENARIOABSTRACT_COMMON_SIMULATION_TIME_H
#ifndef MANTLEAPI_COMMON_SIMULATION_TIME_H
#define MANTLEAPI_COMMON_SIMULATION_TIME_H
#include <chrono>
namespace mantle_api
{
using SimulationTime = std::chrono::duration<std::int64_t, std::milli>;
/// @brief Converts input in [s] to @ref SimulationTime.
/// @tparam T Input type, eg. `double`.
/// @param duration Input value
/// @return Duration representing the given input in units of @ref SimulationTime.
template <typename T>
inline SimulationTime SecondsToSimulationTime(T duration)
{
return std::chrono::duration_cast<SimulationTime>(std::chrono::duration<T>{duration});
}
/// @brief Converts input @ref SimulationTime to [s].
/// @param time Simulation time
/// @return Duration ins seconds representing the passed in @ref SimulationTime.
inline double SimulationTimeToSeconds(const SimulationTime& time)
{
return static_cast<double>(time.count()) / 1000.0;
}
} // namespace mantle_api
#endif // SCENARIOABSTRACT_COMMON_SIMULATION_TIME_H
\ No newline at end of file
#endif // MANTLEAPI_COMMON_SIMULATION_TIME_H
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file spline.h */
//-----------------------------------------------------------------------------
#ifndef SCENARIOABSTRACT_COMMON_SPLINE_H
#define SCENARIOABSTRACT_COMMON_SPLINE_H
#ifndef MANTLEAPI_COMMON_SPLINE_H
#define MANTLEAPI_COMMON_SPLINE_H
#include <MantleAPI/Common/floating_point_helper.h>
#include <MantleAPI/Common/simulation_time.h>
......@@ -47,4 +47,4 @@ inline bool operator==(const SplineSection& lhs, const SplineSection& rhs) noexc
} // namespace mantle_api
#endif // SCENARIOABSTRACT_COMMON_SPLINE_H
\ No newline at end of file
#endif // MANTLEAPI_COMMON_SPLINE_H
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file vector.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_COMMON_VECTOR_H
#define MANTLEAPI_COMMON_VECTOR_H
......@@ -55,6 +54,11 @@ inline Vec3d operator+(const Vec3d& lhs, const Vec3d& rhs) noexcept
return {lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z};
}
inline Vec3d operator*(const Vec3d& lhs, double d) noexcept
{
return {lhs.x * d, lhs.y * d, lhs.z * d};
}
} // namespace mantle_api
#endif // MANTLEAPI_COMMON_VECTOR_H
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file date_time.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_ENVIRONMENTALCONDITIONS_DATETIME_H
#define MANTLEAPI_ENVIRONMENTALCONDITIONS_DATETIME_H
#include <MantleAPI/Common/simulation_time.h>
#include <chrono>
namespace mantle_api
{
struct DateTime
{
SimulationTime date_time_ms{0};
};
} // namespace mantle_api
#endif // MANTLEAPI_ENVIRONMENTALCONDITIONS_DATETIME_H
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file road_condition.h */
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file weather.h */
......@@ -17,8 +17,6 @@
#include <chrono>
using Milliseconds = std::chrono::duration<int64_t, std::ratio<1, 1000>>;
namespace mantle_api
{
enum class Precipitation
......@@ -65,14 +63,12 @@ enum class Illumination
struct Weather
{
Fog fog{Fog::kUnknown};
Precipitation precipitation{Precipitation::kUnknown};
Illumination illumination{Illumination::kUnknown};
Fog fog{Fog::kExcellentVisibility};
Precipitation precipitation{Precipitation::kNone};
Illumination illumination{Illumination::kOther};
double humidity_percent{0.0};
double temperature_kelvin{0.0};
double atmospheric_pressure_pascal{0.0};
Milliseconds date_time_ms{0}; // TODO: we should move this out of the weather...?!
};
} // namespace mantle_api
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file i_environment.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_EXECUTION_IENVIRONMENT_H
#define MANTLEAPI_EXECUTION_IENVIRONMENT_H
#include <MantleAPI/EnvironmentalConditions/date_time.h>
#include <MantleAPI/EnvironmentalConditions/road_condition.h>
#include <MantleAPI/EnvironmentalConditions/weather.h>
#include <MantleAPI/Map/i_coord_converter.h>
......@@ -41,18 +41,29 @@ class IEnvironment
/// environment.
virtual void CreateMap(const std::string& file_path, const std::vector<Position>& map_region) = 0;
/// Creates a controller from the given config. A created controller can be assigned to multiple entities.
/// Creates a controller from the given config. A created controller can be assigned to multiple entities
///
/// @param config Specifies what kind of controller shall be created. The config needs to contain an ID to
/// @param config Specifies what kind of controller shall be created. The config needs to contain a controller ID
/// in order to be able to assign this controller to an entity.
virtual void CreateController(std::unique_ptr<IControllerConfig> config) = 0;
/// Assigns an entity to a copy of the specified controller. This controller needs to be created beforehand.
/// Assigns an entity to a copy of the specified controller. This controller needs to be created beforehand. Only
/// one controller can be added to an entity
///
/// @param entity The entity to be manipulated by the specified controller.
/// @param controller_id Identifies the controller to manipulate the entity.
virtual void AddEntityToController(IEntity& entity, std::uint64_t controller_id) = 0;
virtual void RemoveControllerFromEntity(std::uint64_t entity_id) = 0;
/// Updates the control strategies in the composite controller.
///
/// @param controller_id Specifies the controller to be updated
/// @param control_strategies Specifies the desired movement behaviour for the entity
virtual void UpdateControlStrategies(
std::uint64_t controller_id,
std::vector<std::unique_ptr<mantle_api::ControlStrategy>>& control_strategies) = 0;
virtual const ILaneLocationQueryService& GetQueryService() const = 0;
virtual const ICoordConverter* GetConverter() const = 0;
......@@ -60,8 +71,8 @@ class IEnvironment
virtual const IEntityRepository& GetEntityRepository() const = 0;
/// @brief DateTime in UTC (converted from RFC 3339 standard)
virtual void SetDateTime(std::chrono::duration<std::int64_t, std::milli> date_time) = 0;
virtual std::chrono::duration<std::int64_t, std::milli> GetDateTime() = 0;
virtual void SetDateTime(DateTime date_time) = 0;
virtual DateTime GetDateTime() = 0;
virtual void SetWeather(Weather weather) = 0;
virtual void SetRoadCondition(std::vector<FrictionPatch> friction_patches) = 0;
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file i_scenario_engine.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_EXECUTION_ISCENARIOENGINE_H
#define MANTLEAPI_EXECUTION_ISCENARIOENGINE_H
......@@ -42,6 +41,8 @@ class IScenarioEngine
/// Indicates whether the scenario implementation has finished processing the scenario (end of scenario is reached).
/// @return `true` if processing the scenario is complete, `false` otherwise.
virtual bool IsFinished() const = 0;
virtual void ActivateExternalHostControl() = 0;
};
} // namespace mantle_api
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file scenario_info.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_EXECUTION_SCENARIOINFO_H
#define MANTLEAPI_EXECUTION_SCENARIOINFO_H
#include <MantleAPI/Execution/simulation_time.h>
#include <MantleAPI/Common/simulation_time.h>
#include <map>
#include <string>
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file i_coord_converter.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_MAP_ICOORDCONVERTER_H
#define MANTLEAPI_MAP_ICOORDCONVERTER_H
......
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file i_lane_location_query_service.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_MAP_IQUERYSERVICE_H
#define MANTLEAPI_MAP_IQUERYSERVICE_H
#ifndef MANTLEAPI_MAP_ILANELOCATIONQUERYSERVICE_H
#define MANTLEAPI_MAP_ILANELOCATIONQUERYSERVICE_H
#include <MantleAPI/Common/i_identifiable.h>
#include <MantleAPI/Common/orientation.h>
#include <MantleAPI/Common/vector.h>
namespace mantle_api
{
......@@ -32,7 +34,11 @@ class ILaneLocationQueryService
/// We need to think about proper interface functions we want to define here (GetLaneLocation? GetLanes? But this
/// would add a rat-tail of more interfaces we need to define (ILaneLocation, ILane, ...?)
// virtual const IIdentifiable& GetMapObjectById(UniqueId id) = 0;
virtual Orientation3d GetLaneOrientation(const Vec3d& position) const = 0;
virtual Vec3d GetUpwardsShiftedLanePosition(const Vec3d& position, double upwards_shift) const = 0;
virtual bool IsPositionOnLane(const Vec3d& position) const = 0;
};
} // namespace mantle_api
#endif // MANTLEAPI_MAP_IQUERYSERVICE_H
#endif // MANTLEAPI_MAP_ILANELOCATIONQUERYSERVICE_H
/*******************************************************************************
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
* Copyright (c) 2021, Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
//-----------------------------------------------------------------------------
/** @file i_route.h */
//-----------------------------------------------------------------------------
#ifndef MANTLEAPI_MAP_IROUTE_H
#define MANTLEAPI_MAP_IROUTE_H
......
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