fix(cpp_mock_scenarios, ego_entity_simulation): fix ego issue in random001, fix getCurrentPose() #1361
+27
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The same issue as RJD 1200 happens, when scenario_simulator_v2 and Autoware are built in
RelWithDebInfo
.Abstract
The issue that occurs is related
Ego
position update - position is not updated correctly andEgoEntitySimulation::getCurrentPose()
returns incorrect values.The issue is most likely related to the optimization performed by the compiler when the -
DCMAKE_BUILD_TYPE=RelWithDebInfo
is used - more in the details section.Background
To get rid of the issue, it was necessary to cast the temporary structure
Eigen::Procuct<...>
toEigen::Vector3d
- otherwise the optimization resulted in different results.Details
I’ve added a rotation matrix as a constant attribute of the
EgoEntitySimulation
(now the matrix is created at the time of initialization).scenario_simulator_v2/simulation/simple_sensor_simulator/include/simple_sensor_simulator/vehicle_simulation/ego_entity_simulation.hpp
Line 56 in dd31892
I’ve ensured that the temporary
Eigen
type that can cause issues is cast toEigen::Vector3d
.Eigen
structures are used.scenario_simulator_v2/simulation/simple_sensor_simulator/src/vehicle_simulation/ego_entity_simulation.cpp
Lines 416 to 417 in dd31892
scenario_simulator_v2/mock/cpp_mock_scenarios/src/random_scenario/random001.cpp
Lines 204 to 216 in dd31892
-DCMAKE_BUILD_TYPE=RelWithDebInfo
- in this jira command I've attached recordings as evidences.References
RJD-1296 Jira ticket
Destructive Changes
--
Known Limitations
--