Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt minimator to contain Ego and traffic objects #187

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,43 @@
],
"simulators": [
{
"binding": "minimator"
"binding": "minimator",
"args": {
"vehicles": {
"ego1": {
"ego_sensor_mockup": {
"ego_object": {
"velocity": 20.0,
"position": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
}
},
"object_sensor_mockup": {
"objects": [
{
"velocity": 0.0,
"position": {
"x": 10.0,
"y": 0.0,
"z": 0.0
}
}
]
}
}
}
}
}
],
"vehicles": [
{
"name": "default",
"from": {
"simulator": "minimator",
"index": 0
"name": "ego1"
}
}
],
Expand Down
200 changes: 192 additions & 8 deletions plugins/gndtruth_extractor/tests/test_gndtruth_smoketest_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,54 @@
"z": 0.0
}
},
"name": "nop_object_sensor",
"sensed_objects": []
"name": "minimator_object_sensor",
"sensed_objects": [
{
"acceleration": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"angular_velocity": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"class": "unknown",
"cog_offset": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"dimensions": {
"x": 5.0,
"y": 2.0,
"z": 1.8
},
"exist_prob": 1.0,
"id": 0,
"pose": {
"rotation": {
"w": 1.0,
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"translation": {
"x": 10.0,
"y": 0.0,
"z": 0.0
}
},
"type": "unknown",
"velocity": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"velocity_norm": 0.0
}
]
},
"cloe::gndtruth_lane_sensor": {
"frustum": {
Expand Down Expand Up @@ -188,8 +234,54 @@
"z": 0.0
}
},
"name": "nop_object_sensor",
"sensed_objects": []
"name": "minimator_object_sensor",
"sensed_objects": [
{
"acceleration": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"angular_velocity": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"class": "unknown",
"cog_offset": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"dimensions": {
"x": 5.0,
"y": 2.0,
"z": 1.8
},
"exist_prob": 1.0,
"id": 0,
"pose": {
"rotation": {
"w": 1.0,
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"translation": {
"x": 10.0,
"y": 0.0,
"z": 0.0
}
},
"type": "unknown",
"velocity": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"velocity_norm": 0.0
}
]
},
"cloe::gndtruth_lane_sensor": {
"frustum": {
Expand Down Expand Up @@ -351,8 +443,54 @@
"z": 0.0
}
},
"name": "nop_object_sensor",
"sensed_objects": []
"name": "minimator_object_sensor",
"sensed_objects": [
{
"acceleration": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"angular_velocity": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"class": "unknown",
"cog_offset": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"dimensions": {
"x": 5.0,
"y": 2.0,
"z": 1.8
},
"exist_prob": 1.0,
"id": 0,
"pose": {
"rotation": {
"w": 1.0,
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"translation": {
"x": 10.0,
"y": 0.0,
"z": 0.0
}
},
"type": "unknown",
"velocity": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"velocity_norm": 0.0
}
]
},
"cloe::gndtruth_lane_sensor": {
"frustum": {
Expand Down Expand Up @@ -514,8 +652,54 @@
"z": 0.0
}
},
"name": "nop_object_sensor",
"sensed_objects": []
"name": "minimator_object_sensor",
"sensed_objects": [
{
"acceleration": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"angular_velocity": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"class": "unknown",
"cog_offset": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"dimensions": {
"x": 5.0,
"y": 2.0,
"z": 1.8
},
"exist_prob": 1.0,
"id": 0,
"pose": {
"rotation": {
"w": 1.0,
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"translation": {
"x": 10.0,
"y": 0.0,
"z": 0.0
}
},
"type": "unknown",
"velocity": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"velocity_norm": 0.0
}
]
},
"cloe::gndtruth_lane_sensor": {
"frustum": {
Expand Down
Binary file not shown.
28 changes: 28 additions & 0 deletions plugins/minimator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,37 @@ include(CloePluginSetup)
cloe_add_plugin(
TARGET ${PROJECT_NAME}
OUTPUT_NAME simulator_minimator
INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
SOURCES
src/minimator.cpp
LINK_LIBRARIES
cloe::runtime
cloe::models
)

include(CTest)
if(BUILD_TESTING)
find_package(GTest REQUIRED)
include(GoogleTest)

set(test-minimator test-${PROJECT_NAME})
add_executable(${test-minimator}
src/minimator_config_test.cpp
)
target_include_directories(${test-minimator}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
set_target_properties(${test-minimator} PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
)
target_link_libraries(${test-minimator}
GTest::gtest
GTest::gtest_main
cloe::runtime
cloe::models
)
gtest_add_tests(TARGET ${test-minimator})
endif()
3 changes: 3 additions & 0 deletions plugins/minimator/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CloeSimulatorMinimator(ConanFile):
generators = "CMakeDeps", "VirtualRunEnv"
no_copy_source = True
exports_sources = [
"include/*",
"src/*",
"CMakeLists.txt",
]
Expand Down Expand Up @@ -60,6 +61,8 @@ def build(self):
cm.configure()
if self.should_build:
cm.build()
if self.should_test:
cm.test()

def package(self):
cm = cmake.CMake(self)
Expand Down
Loading
Loading