Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openscenario1-engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
Eclipse openpass
openscenario1-engine
Commits
06be7490
Commit
06be7490
authored
1 month ago
by
René Paris
Browse files
Options
Downloads
Patches
Plain Diff
mod: adjust Obstacle/SpawnSpace to breaking changes in mantle
parent
d55b76d7
No related branches found
No related tags found
No related merge requests found
Pipeline
#77219
failed
1 month ago
Stage: external
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
engine/src/Utils/Spawning/Obstacle.cpp
+2
-2
2 additions, 2 deletions
engine/src/Utils/Spawning/Obstacle.cpp
engine/src/Utils/Spawning/SpawnSpace.cpp
+8
-8
8 additions, 8 deletions
engine/src/Utils/Spawning/SpawnSpace.cpp
with
10 additions
and
10 deletions
engine/src/Utils/Spawning/Obstacle.cpp
+
2
−
2
View file @
06be7490
...
...
@@ -30,7 +30,7 @@ Obstacle Obstacle::GetEndingSentinel(units::length::meter_t value)
return
{{
value
,
value
},
nullptr
,
units
::
velocity
::
meters_per_second_t
{
std
::
numeric_limits
<
double
>::
max
()}};
}
Obstacle
ToObstacle
(
const
mantle_api
::
IEntity
*
entity
,
const
mantle_api
::
ITrafficAreaStream
&
stream
)
Obstacle
ToObstacle
(
std
::
shared_ptr
<
mantle_api
::
IEntity
>
entity
,
const
mantle_api
::
ITrafficAreaStream
&
stream
)
{
const
auto
halfLength
{
entity
->
GetProperties
()
->
bounding_box
.
dimension
.
length
/
units
::
dimensionless
::
scalar_t
{
2.0
}};
const
auto
offset
{
entity
->
GetProperties
()
->
bounding_box
.
geometric_center
.
x
};
...
...
@@ -47,7 +47,7 @@ std::set<Obstacle, Less<ToMin>> GetObstacles(const mantle_api::ITrafficAreaStrea
const
units
::
length
::
meter_t
max
{
stream
.
GetLength
()};
while
(
min
<
max
)
{
const
mantle_api
::
IEntity
*
entity
{
stream
.
GetEntity
(
mantle_api
::
ITrafficAreaStream
::
SearchDirection
::
kDownstream
,
min
,
max
-
min
)};
auto
entity
{
stream
.
GetEntity
(
mantle_api
::
ITrafficAreaStream
::
SearchDirection
::
kDownstream
,
min
,
max
-
min
)};
if
(
is_uninitialized
(
entity
))
{
break
;
...
...
This diff is collapsed.
Click to expand it.
engine/src/Utils/Spawning/SpawnSpace.cpp
+
8
−
8
View file @
06be7490
...
...
@@ -231,15 +231,15 @@ bool SpawnSpace::Spawn(size_t entityNr)
const
auto
&
stream
{
*
std
::
next
(
area
->
begin
(),
std
::
distance
(
spot_area
->
begin
(),
spot_stream
))};
const
mantle_api
::
Pose
pose
{
stream
->
Convert
(
mantle_api
::
ITrafficAreaStream
::
StreamPose
{{
interval
.
max
,
{}},
{}}).
value
()};
EntityCreator
entityCreator
{
environment_
};
std
::
string
name
{
"Common"
+
std
::
to_string
(
entityNr
)};
mantle_api
::
IEntity
&
entity
{
entityCreator
.
CreateEntity
(
ToEntity
{}(
objectTemplate
.
object_template
),
name
)};
entity
.
SetName
(
name
);
entity
.
SetPosition
(
pose
.
position
);
entity
.
SetOrientation
(
pose
.
orientation
);
entity
.
SetVelocity
(
util
::
Rotate
(
safe_velocity
,
pose
.
orientation
));
EntityCreator
entityCreator
{
environment_
};
std
::
string
name
{
"Common"
+
std
::
to_string
(
entityNr
)};
auto
entity
{
entityCreator
.
CreateEntity
(
ToEntity
{}(
objectTemplate
.
object_template
),
name
)};
entity
->
SetName
(
name
);
entity
->
SetPosition
(
pose
.
position
);
entity
->
SetOrientation
(
pose
.
orientation
);
entity
->
SetVelocity
(
util
::
Rotate
(
safe_velocity
,
pose
.
orientation
));
CreateEntityControllers
(
entity
,
objectTemplate
.
object_template
->
GetObjectController
());
CreateEntityControllers
(
*
entity
.
get
()
,
objectTemplate
.
object_template
->
GetObjectController
());
const
Interval
occupied_space
{
interval
.
max
-
spawn_parameters
.
entity_length
,
interval
.
max
};
UpdateSpot
(
*
spot_stream
,
spot
,
occupied_space
,
safe_velocity
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment