Skip to content
Snippets Groups Projects
Commit d60adb00 authored by Lorenzo Appino's avatar Lorenzo Appino Committed by Andreas Rauschert
Browse files

feat: Adding map model reference in ScenarioInfo

parent 8ca0d9e4
No related branches found
No related tags found
1 merge request!149Adding map model reference in ScenarioInfo
...@@ -48,10 +48,11 @@ public: ...@@ -48,10 +48,11 @@ public:
/// Load a map file and parse it into the memory. /// Load a map file and parse it into the memory.
/// ///
/// @param map_file_path map file path from the scenario file. If this path is not resolved by the engine, the /// @param map_file_path map file path from the scenario file. If this path is not resolved by the engine, the
/// environment must do so. /// environment must do so.
/// @param map_details Area of the map /// @param map_details Area of the map
virtual void CreateMap(const std::string& map_file_path, const mantle_api::MapDetails& map_details) = 0; /// @param map_model_reference File path of a 3D model representing the virtual environment
virtual void CreateMap(const std::string& map_file_path, const mantle_api::MapDetails& map_details, const std::string& map_model_reference) = 0;
/// Assigns an entity to the specified controller. This controller needs to be created beforehand. /// Assigns an entity to the specified controller. This controller needs to be created beforehand.
/// ///
......
...@@ -37,7 +37,8 @@ struct ScenarioInfo ...@@ -37,7 +37,8 @@ struct ScenarioInfo
description{other.description}, description{other.description},
full_map_path{other.full_map_path}, full_map_path{other.full_map_path},
map_details{other.map_details->Clone()}, map_details{other.map_details->Clone()},
additional_information{other.additional_information} additional_information{other.additional_information},
map_model_reference{other.map_model_reference}
{ {
} }
...@@ -57,6 +58,7 @@ struct ScenarioInfo ...@@ -57,6 +58,7 @@ struct ScenarioInfo
full_map_path = other.full_map_path; full_map_path = other.full_map_path;
map_details = other.map_details->Clone(); map_details = other.map_details->Clone();
additional_information = other.additional_information; additional_information = other.additional_information;
map_model_reference = other.map_model_reference;
} }
return *this; return *this;
} }
...@@ -78,6 +80,8 @@ struct ScenarioInfo ...@@ -78,6 +80,8 @@ struct ScenarioInfo
std::unique_ptr<MapDetails> map_details{std::make_unique<MapDetails>()}; std::unique_ptr<MapDetails> map_details{std::make_unique<MapDetails>()};
/// Additional custom information about the scenario /// Additional custom information about the scenario
std::map<std::string, std::string> additional_information; std::map<std::string, std::string> additional_information;
/// Model reference of ground truth
std::string map_model_reference;
}; };
} // namespace mantle_api } // namespace mantle_api
......
...@@ -503,7 +503,7 @@ class MockEnvironment : public mantle_api::IEnvironment ...@@ -503,7 +503,7 @@ class MockEnvironment : public mantle_api::IEnvironment
public: public:
MOCK_METHOD(void, MOCK_METHOD(void,
CreateMap, CreateMap,
(const std::string& file_path, const mantle_api::MapDetails& map_details), (const std::string& file_path, const mantle_api::MapDetails& map_details, const std::string& map_model_reference),
(override) (override)
); );
......
...@@ -28,7 +28,7 @@ TEST(InterfaceTest, GivenTeleportAction_When_ThenHostVehicleIsPlaced) ...@@ -28,7 +28,7 @@ TEST(InterfaceTest, GivenTeleportAction_When_ThenHostVehicleIsPlaced)
mantle_api::Position inert_pos{}; mantle_api::Position inert_pos{};
inert_pos = mantle_api::OpenDriveRoadPosition{"0", 0_m, 0_m}; inert_pos = mantle_api::OpenDriveRoadPosition{"0", 0_m, 0_m};
mantle_api::MockEnvironment env{}; mantle_api::MockEnvironment env{};
env.CreateMap("dummy_map_path", {}); env.CreateMap("dummy_map_path", {}, "");
mantle_api::VehicleProperties vehicle_properties; mantle_api::VehicleProperties vehicle_properties;
vehicle_properties.is_host = true; vehicle_properties.is_host = true;
......
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