Skip to content
Snippets Groups Projects
Commit 1a26fa11 authored by René Paris's avatar René Paris
Browse files

finished

parent cfa4bc92
No related branches found
No related tags found
3 merge requests!144✨ Conan integration,!139Draft: Feature/v1_2_with_jenkins,!134✨ Update engine to OpenSCENARIO 1.2.0
Showing
with 21 additions and 37 deletions
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "Conversion/OscToMantle/ConvertScenarioPhase.h" #include "Conversion/OscToMantle/ConvertScenarioPhase.h"
#include "Conversion/OscToMantle/ConvertScenarioTrafficSignalController.h" #include "Conversion/OscToMantle/ConvertScenarioTrafficSignalController.h"
#include "Utils/EntityBroker.h"
namespace OpenScenarioEngine::v1_2 namespace OpenScenarioEngine::v1_2
{ {
...@@ -26,7 +25,6 @@ class TrafficSignalControllerActionBase ...@@ -26,7 +25,6 @@ class TrafficSignalControllerActionBase
public: public:
struct Values struct Values
{ {
Entities entities;
std::string phase; std::string phase;
OPENSCENARIO::TrafficSignalController trafficSignalControllerRef; OPENSCENARIO::TrafficSignalController trafficSignalControllerRef;
OPENSCENARIO::Phase phaseRef; OPENSCENARIO::Phase phaseRef;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <utility> #include <utility>
#include "Storyboard/GenericAction/TrafficSignalStateAction_impl.h" #include "Storyboard/GenericAction/TrafficSignalStateAction_impl.h"
#include "Utils/EntityBroker.h"
class TrafficSignalStateAction : public yase::ActionNode class TrafficSignalStateAction : public yase::ActionNode
{ {
...@@ -43,11 +42,9 @@ private: ...@@ -43,11 +42,9 @@ private:
void lookupAndRegisterData(yase::Blackboard& blackboard) final void lookupAndRegisterData(yase::Blackboard& blackboard) final
{ {
std::shared_ptr<mantle_api::IEnvironment> environment = blackboard.get<std::shared_ptr<mantle_api::IEnvironment>>("Environment"); std::shared_ptr<mantle_api::IEnvironment> environment = blackboard.get<std::shared_ptr<mantle_api::IEnvironment>>("Environment");
const EntityBroker::Ptr entityBroker = blackboard.get<EntityBroker::Ptr>("EntityBroker");
impl_ = std::make_unique<OpenScenarioEngine::v1_2::TrafficSignalStateAction>( impl_ = std::make_unique<OpenScenarioEngine::v1_2::TrafficSignalStateAction>(
OpenScenarioEngine::v1_2::TrafficSignalStateAction::Values{ OpenScenarioEngine::v1_2::TrafficSignalStateAction::Values{
entityBroker->GetEntities(),
trafficSignalStateAction_->GetName(), trafficSignalStateAction_->GetName(),
trafficSignalStateAction_->GetState()}, trafficSignalStateAction_->GetState()},
OpenScenarioEngine::v1_2::TrafficSignalStateAction::Interfaces{ OpenScenarioEngine::v1_2::TrafficSignalStateAction::Interfaces{
......
...@@ -15,8 +15,6 @@ ...@@ -15,8 +15,6 @@
#include <string> #include <string>
#include "Utils/EntityBroker.h"
namespace OpenScenarioEngine::v1_2 namespace OpenScenarioEngine::v1_2
{ {
class TrafficSignalStateActionBase class TrafficSignalStateActionBase
...@@ -24,7 +22,6 @@ class TrafficSignalStateActionBase ...@@ -24,7 +22,6 @@ class TrafficSignalStateActionBase
public: public:
struct Values struct Values
{ {
Entities entities;
std::string name; std::string name;
std::string state; std::string state;
}; };
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <utility> #include <utility>
#include "Storyboard/GenericAction/VariableModifyAction_impl.h" #include "Storyboard/GenericAction/VariableModifyAction_impl.h"
#include "Utils/EntityBroker.h"
class VariableModifyAction : public yase::ActionNode class VariableModifyAction : public yase::ActionNode
{ {
...@@ -42,11 +41,9 @@ private: ...@@ -42,11 +41,9 @@ private:
void lookupAndRegisterData(yase::Blackboard& blackboard) final void lookupAndRegisterData(yase::Blackboard& blackboard) final
{ {
std::shared_ptr<mantle_api::IEnvironment> environment = blackboard.get<std::shared_ptr<mantle_api::IEnvironment>>("Environment"); std::shared_ptr<mantle_api::IEnvironment> environment = blackboard.get<std::shared_ptr<mantle_api::IEnvironment>>("Environment");
const EntityBroker::Ptr entityBroker = blackboard.get<EntityBroker::Ptr>("EntityBroker");
impl_ = std::make_unique<OpenScenarioEngine::v1_2::VariableModifyAction>( impl_ = std::make_unique<OpenScenarioEngine::v1_2::VariableModifyAction>(
OpenScenarioEngine::v1_2::VariableModifyAction::Values{ OpenScenarioEngine::v1_2::VariableModifyAction::Values{
entityBroker->GetEntities(),
}, },
OpenScenarioEngine::v1_2::VariableModifyAction::Interfaces{ OpenScenarioEngine::v1_2::VariableModifyAction::Interfaces{
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
#include <MantleAPI/Execution/i_environment.h> #include <MantleAPI/Execution/i_environment.h>
#include "Utils/EntityBroker.h"
namespace OpenScenarioEngine::v1_2 namespace OpenScenarioEngine::v1_2
{ {
class VariableModifyActionBase class VariableModifyActionBase
...@@ -21,7 +19,6 @@ class VariableModifyActionBase ...@@ -21,7 +19,6 @@ class VariableModifyActionBase
public: public:
struct Values struct Values
{ {
Entities entities;
}; };
struct Interfaces struct Interfaces
{ {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "Storyboard/GenericAction/VariableModifyAction_impl.h" #include "Storyboard/GenericAction/VariableModifyAction_impl.h"
#include <iostream> #include "Utils/Logger.h"
namespace OpenScenarioEngine::v1_2 namespace OpenScenarioEngine::v1_2
{ {
...@@ -19,7 +19,7 @@ bool VariableModifyAction::Step() ...@@ -19,7 +19,7 @@ bool VariableModifyAction::Step()
// Note: // Note:
// - Access to values parse to mantle/ose datatypes: this->values.xxx // - Access to values parse to mantle/ose datatypes: this->values.xxx
// - Access to mantle interfaces: this->mantle.xxx // - Access to mantle interfaces: this->mantle.xxx
std::cout << "Method VariableModifyAction::Step() not implemented yet (returning \"true\" by default)\n"; OPENSCENARIO::Logger::Warning("Method VariableModifyAction::Step() not implemented yet (returning \"true\" by default)");
return true; return true;
} }
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <utility> #include <utility>
#include "Storyboard/GenericAction/VariableSetAction_impl.h" #include "Storyboard/GenericAction/VariableSetAction_impl.h"
#include "Utils/EntityBroker.h"
class VariableSetAction : public yase::ActionNode class VariableSetAction : public yase::ActionNode
{ {
...@@ -42,11 +41,9 @@ private: ...@@ -42,11 +41,9 @@ private:
void lookupAndRegisterData(yase::Blackboard& blackboard) final void lookupAndRegisterData(yase::Blackboard& blackboard) final
{ {
std::shared_ptr<mantle_api::IEnvironment> environment = blackboard.get<std::shared_ptr<mantle_api::IEnvironment>>("Environment"); std::shared_ptr<mantle_api::IEnvironment> environment = blackboard.get<std::shared_ptr<mantle_api::IEnvironment>>("Environment");
const EntityBroker::Ptr entityBroker = blackboard.get<EntityBroker::Ptr>("EntityBroker");
impl_ = std::make_unique<OpenScenarioEngine::v1_2::VariableSetAction>( impl_ = std::make_unique<OpenScenarioEngine::v1_2::VariableSetAction>(
OpenScenarioEngine::v1_2::VariableSetAction::Values{ OpenScenarioEngine::v1_2::VariableSetAction::Values{
entityBroker->GetEntities(),
variableSetAction_->GetValue()}, variableSetAction_->GetValue()},
OpenScenarioEngine::v1_2::VariableSetAction::Interfaces{ OpenScenarioEngine::v1_2::VariableSetAction::Interfaces{
environment}); environment});
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include <string> #include <string>
#include "Utils/EntityBroker.h"
namespace OpenScenarioEngine::v1_2 namespace OpenScenarioEngine::v1_2
{ {
class VariableSetActionBase class VariableSetActionBase
...@@ -23,7 +21,6 @@ class VariableSetActionBase ...@@ -23,7 +21,6 @@ class VariableSetActionBase
public: public:
struct Values struct Values
{ {
Entities entities;
std::string value; std::string value;
}; };
struct Interfaces struct Interfaces
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "Storyboard/GenericAction/VariableSetAction_impl.h" #include "Storyboard/GenericAction/VariableSetAction_impl.h"
#include <iostream> #include "Utils/Logger.h"
namespace OpenScenarioEngine::v1_2 namespace OpenScenarioEngine::v1_2
{ {
...@@ -19,7 +19,7 @@ bool VariableSetAction::Step() ...@@ -19,7 +19,7 @@ bool VariableSetAction::Step()
// Note: // Note:
// - Access to values parse to mantle/ose datatypes: this->values.xxx // - Access to values parse to mantle/ose datatypes: this->values.xxx
// - Access to mantle interfaces: this->mantle.xxx // - Access to mantle interfaces: this->mantle.xxx
std::cout << "Method VariableSetAction::Step() not implemented yet (returning \"true\" by default)\n"; OPENSCENARIO::Logger::Warning("Method VariableSetAction::Step() not implemented yet (returning \"true\" by default)");
return true; return true;
} }
......
...@@ -23,7 +23,7 @@ namespace yase ...@@ -23,7 +23,7 @@ namespace yase
{ {
/// Checks if underlying conditions are satisfied and adds control flow logic, such as delayed execution /// Checks if underlying conditions are satisfied and adds control flow logic, such as delayed execution
/// ///
/// \see https://www.asam.net/static_downloads/ASAM_OpenSCENARIO_V1.1.1_Model_Documentation/modelDocumentation/index.html /// \see https://www.asam.net/static_downloads/ASAM_OpenSCENARIO_V1.2.0_Model_Documentation/modelDocumentation/index.html
class ConditionNode : public yase::DecoratorNode class ConditionNode : public yase::DecoratorNode
{ {
public: public:
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include <units.h> #include <units.h>
#include "Utils/Logger.h"
namespace OpenScenarioEngine::v1_2 namespace OpenScenarioEngine::v1_2
{ {
bool ReachPositionCondition::IsSatisfied() const bool ReachPositionCondition::IsSatisfied() const
......
...@@ -28,8 +28,7 @@ TEST(TrafficSignalStateActionTest, GivenTrafficStateAndName_SetTrafficSignal) ...@@ -28,8 +28,7 @@ TEST(TrafficSignalStateActionTest, GivenTrafficStateAndName_SetTrafficSignal)
SetTrafficSignalState(expected_name, expected_state)) SetTrafficSignalState(expected_name, expected_state))
.WillByDefault(Return()); .WillByDefault(Return());
OpenScenarioEngine::v1_2::TrafficSignalStateAction trafficSignalStateAction({{"traffic_signal"}, OpenScenarioEngine::v1_2::TrafficSignalStateAction trafficSignalStateAction({expected_name,
expected_name,
expected_state}, expected_state},
{mockEnvironment}); {mockEnvironment});
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
{% block header %} {% block header %}
#include "Storyboard/ByValueCondition/{{ name }}_impl.h" #include "Storyboard/ByValueCondition/{{ name }}_impl.h"
{% endblock %} {% endblock %}
#include <iostream>
#include "Utils/Logger.h"
namespace {{ ose_namespace }} { namespace {{ ose_namespace }} {
...@@ -20,8 +21,8 @@ bool {{ name }}::IsSatisfied() const ...@@ -20,8 +21,8 @@ bool {{ name }}::IsSatisfied() const
// Note: // Note:
// - Access to values parse to mantle/ose datatypes: this->values.xxx // - Access to values parse to mantle/ose datatypes: this->values.xxx
// - Access to mantle interfaces: this->mantle.xxx // - Access to mantle interfaces: this->mantle.xxx
std::cout << "Method {{ name }}::IsSatisfied() not implemented yet (returning \"true\" by default)\n"; OPENSCENARIO::Logger::Warning("Method {{ name }}::IsSatisfied() not implemented yet (returning \"true\" by default)");
return true; return true;
} }
} // namespace {{ ose_namespace }} } // namespace {{ ose_namespace }}
\ No newline at end of file
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
********************************************************************************/ ********************************************************************************/
#include "Storyboard/GenericAction/{{ name }}_impl.h" #include "Storyboard/GenericAction/{{ name }}_impl.h"
#include <iostream>
#include "Utils/Logger.h"
namespace {{ ose_namespace }} { namespace {{ ose_namespace }} {
...@@ -18,8 +19,8 @@ bool {{ name }}::Step() ...@@ -18,8 +19,8 @@ bool {{ name }}::Step()
// Note: // Note:
// - Access to values parse to mantle/ose datatypes: this->values.xxx // - Access to values parse to mantle/ose datatypes: this->values.xxx
// - Access to mantle interfaces: this->mantle.xxx // - Access to mantle interfaces: this->mantle.xxx
std::cout << "Method {{ name }}::Step() not implemented yet (returning \"true\" by default)\n"; OPENSCENARIO::Logger::Warning("Method {{ name }}::Step() not implemented yet (returning \"true\" by default)");
return true; return true;
} }
} // namespace {{ ose_namespace }} } // namespace {{ ose_namespace }}
\ No newline at end of file
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
********************************************************************************/ ********************************************************************************/
#include "Storyboard/MotionControlAction/{{ name }}_impl.h" #include "Storyboard/MotionControlAction/{{ name }}_impl.h"
#include <iostream>
#include "Utils/Logger.h"
namespace {{ ose_namespace }} { namespace {{ ose_namespace }} {
...@@ -18,7 +19,7 @@ void {{ name }}::SetControlStrategy() ...@@ -18,7 +19,7 @@ void {{ name }}::SetControlStrategy()
// Note: // Note:
// - Access to values parse to mantle/ose datatypes: this->values.xxx // - Access to values parse to mantle/ose datatypes: this->values.xxx
// - Access to mantle interfaces: this->mantle.xxx // - Access to mantle interfaces: this->mantle.xxx
std::cout << "Method {{ name }}::SetControlStrategy() not implemented yet\n"; OPENSCENARIO::Logger::Warning("Method {{ name }}::SetControlStrategy() not implemented yet");
} }
bool {{ name }}::HasControlStrategyGoalBeenReached(const std::string& actor) bool {{ name }}::HasControlStrategyGoalBeenReached(const std::string& actor)
...@@ -26,7 +27,7 @@ bool {{ name }}::HasControlStrategyGoalBeenReached(const std::string& actor) ...@@ -26,7 +27,7 @@ bool {{ name }}::HasControlStrategyGoalBeenReached(const std::string& actor)
// Note: // Note:
// - Access to values parse to mantle/ose datatypes: this->values.xxx // - Access to values parse to mantle/ose datatypes: this->values.xxx
// - Access to mantle interfaces: this->mantle.xxx // - Access to mantle interfaces: this->mantle.xxx
std::cout << "Method {{ name }}::HasControlStrategyGoalBeenReached() not implemented yet (returning \"true\" by default)\n"; OPENSCENARIO::Logger::Warning("Method {{ name }}::HasControlStrategyGoalBeenReached() not implemented yet (returning \"true\" by default)");
return true; return true;
} }
...@@ -36,4 +37,4 @@ mantle_api::MovementDomain {{ name }}::GetMovementDomain() const ...@@ -36,4 +37,4 @@ mantle_api::MovementDomain {{ name }}::GetMovementDomain() const
return mantle_api::MovementDomain::kLateral; return mantle_api::MovementDomain::kLateral;
} }
} // namespace {{ ose_namespace }} } // namespace {{ ose_namespace }}
\ No newline at end of file
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