Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mantle-api
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
mantle-api
Commits
778590f9
Commit
778590f9
authored
3 years ago
by
Andreas Rauschert
Browse files
Options
Downloads
Patches
Plain Diff
Update entity visibility config
parent
548c65d8
No related branches found
Branches containing commit
No related tags found
1 merge request
!16
BMW Dev-branch
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MantleAPI/include/MantleAPI/Traffic/i_entity.h
+16
-9
16 additions, 9 deletions
MantleAPI/include/MantleAPI/Traffic/i_entity.h
MantleAPI/test/interface_test.cpp
+1
-0
1 addition, 0 deletions
MantleAPI/test/interface_test.cpp
with
17 additions
and
9 deletions
MantleAPI/include/MantleAPI/Traffic/i_entity.h
+
16
−
9
View file @
778590f9
...
...
@@ -27,17 +27,24 @@
namespace
mantle_api
{
struct
SensorVisibilityConfig
{
std
::
string
name
{
"sensor"
};
bool
visibility
{
true
};
};
struct
EntityVisibilityConfig
{
/// The "graphics" flag determines, if the entity shall be shown in visualizations of the simulated environment
bool
graphics
{
true
};
/// The "traffic" flag determines, if the entity is contained in the common simulator output (e.g. OSI Ground Truth)
/// for all traffic participants
bool
traffic
{
true
};
std
::
vector
<
SensorVisibilityConfig
>
sensors
{};
/// The "sensors" flag can be used to simulate sensor errors (false positives / false negatives). For this the
/// "sensors" flag value has to diverge from the "traffic" flag value (e.g. false positive: traffic=false,
/// sensors=true)
bool
sensors
{
true
};
/// - Sensor errors can be specified for single sensors only. E.g. a false positive for a radar sensor would be
/// specified with traffic="false", sensors="true", sensor_names={"radar"}.
/// - For the other not named sensors implicitly the opposite applies. So in the above example e.g. for a camera
/// sensor the entity would be not visible / not contained in its OSI Sensor View.
/// - When "sensor_names" is not specified (empty vector) then the "sensors" flag applies to
/// all sensors.
std
::
vector
<
std
::
string
>
sensor_names
{};
};
/// Base interface for all static and dynamic scenario entities.
...
...
@@ -69,8 +76,8 @@ class IEntity : public IIdentifiable
virtual
void
SetAssignedLaneIds
(
const
std
::
vector
<
std
::
uint64_t
>&
assigned_lane_ids
)
=
0
;
virtual
std
::
vector
<
std
::
uint64_t
>
GetAssignedLaneIds
()
const
=
0
;
virtual
void
SetVisibility
(
const
EntityVisibilityConfig
&
visibility
)
=
0
;
virtual
EntityVisibilityConfig
GetVisibility
()
const
=
0
;
virtual
void
SetVisibility
(
const
EntityVisibilityConfig
&
visibility
)
=
0
;
virtual
EntityVisibilityConfig
GetVisibility
()
const
=
0
;
};
class
IVehicle
:
public
virtual
IEntity
...
...
This diff is collapsed.
Click to expand it.
MantleAPI/test/interface_test.cpp
+
1
−
0
View file @
778590f9
...
...
@@ -30,4 +30,5 @@ TEST(InterfaceTest, GivenTeleportAction_When_ThenHostVehicleIsPlaced)
const
auto
*
const
converter
=
env
.
GetConverter
();
auto
world_pos
=
converter
->
Convert
(
inert_pos
);
host_vehicle
.
SetPosition
(
world_pos
);
host_vehicle
.
SetVisibility
(
mantle_api
::
EntityVisibilityConfig
{
true
,
false
,
true
,
{
"radar"
}});
}
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