Skip to content
Snippets Groups Projects

Draft: Update engine to OpenSCENARIO 1.3.0

Closed Naida Goro requested to merge feature/v1_3 into main
Files
697
+ 4
4
@@ -102,7 +102,7 @@ Suppose that somewhere in the scenario definition, the user specifies a `Distanc
When the conversion reaches the `ConditionGroup`, the function `parse(condition)` is called, which shall act as entry point of this example (see `src/Conversion/OscToNode/ParseCondition.cpp`):
```cpp
yase::BehaviorNode::Ptr parse(std::shared_ptr<NET_ASAM_OPENSCENARIO::v1_2::ICondition> condition)
yase::BehaviorNode::Ptr parse(std::shared_ptr<NET_ASAM_OPENSCENARIO::v1_3::ICondition> condition)
{
return std::make_shared<yase::ConditionNode>(
condition->GetName(),
@@ -140,7 +140,7 @@ The function `resolveChildCondition` (same source file) shows how the engine mak
```cpp
namespace detail
{
yase::BehaviorNode::Ptr resolveChildCondition(const std::shared_ptr<NET_ASAM_OPENSCENARIO::v1_2::ICondition>& condition)
yase::BehaviorNode::Ptr resolveChildCondition(const std::shared_ptr<NET_ASAM_OPENSCENARIO::v1_3::ICondition>& condition)
{
if (auto element = condition->GetByEntityCondition(); element)
{
@@ -150,7 +150,7 @@ yase::BehaviorNode::Ptr resolveChildCondition(const std::shared_ptr<NET_ASAM_OPE
{
return parse(element);
}
throw std::runtime_error("Corrupted openSCENARIO file: No choice made within std::shared_ptr<NET_ASAM_OPENSCENARIO::v1_2::ICondition>");
throw std::runtime_error("Corrupted openSCENARIO file: No choice made within std::shared_ptr<NET_ASAM_OPENSCENARIO::v1_3::ICondition>");
}
} // namespace detail
```
@@ -184,7 +184,7 @@ In other words `SimulationTimeCondition` will become the direct child `Condition
For *list type*s, such as `Actions` in the `Event` element, parsing unwraps the individual elements into children of an ``yase::ParallelNode`` (see `gen/Conversion/OscToNode/ParseActions.cpp`):
```cpp
yase::BehaviorNode::Ptr parse(std::vector<std::shared_ptr<NET_ASAM_OPENSCENARIO::v1_2::IAction>> actions)
yase::BehaviorNode::Ptr parse(std::vector<std::shared_ptr<NET_ASAM_OPENSCENARIO::v1_3::IAction>> actions)
{
auto node = std::make_shared<yase::ParallelNode>("Actions");
for (const auto& action : actions)
Loading