Releases: tier4/scenario_simulator_v2
4.3.2
Description
Abstract
Fix frame_id of imu
before: tamagawa/imu_link
after: base_link
Background
Due to misunderstandings, the wrong frame_id was introduced.
Details
The imu_corrector transforms the imu original frame to the base_link.
https://github.com/autowarefoundation/autoware.universe/blob/main/sensing/autoware_imu_corrector/src/imu_corrector_core.cpp#L104
References
regression test: OK
Destructive Changes
This is a destructive changes but a simple positive improvement.
Known Limitations
None
Related Issues
4.3.1
Description
Abstract
Fix the definition of eigen variable for calculation of ego vehicle pose.
Background
In #1302, it is reported that kinematic state is not updated.
I have discovered a bug where pull requests from forks cannot be merged due to the Release Action malfunctioning.
Since #1313 is very important and needs to be incorporated urgently, @hakuturu583 will create a similar pull request and carry out verification and merging.
This Pull request is not @hakuturu583 's work, it is @MertClk 's work.
Thank you very much for contribution.
References
Reference to fix:
In short: do not use the auto keywords with Eigen's expressions, unless you are 100% sure about what you are doing. In particular, do not use the auto keyword as a replacement for a Matrix<> type.
This behavior is presumably due to the fact that the Eigen calculation is delayed by the Expression Template, resulting in undefined values. However, a tier4 internal verification showed that this part should not have been a problem even if auto had been used.
One possibility is that the behavior may be CPU architecture dependent.
The cause is unknown, but since there is no particular disadvantage, this PR is merged.
tier4/sim_evaluation_tools#342
#1313
Related Issues
4.3.0
Description
Abstract
Update the Quick Start and Build Instructions in the ss2 documentation.
Details
Updated Files:
-
QuickStart.md
-
BuildInstructions.md
-
random_test.launch.py
The random_test.launch.py file was modified to add support for the architecture types "awf/universe/20230906" and "awf/universe/20240605". Without these changes, the random_test_runner could not be executed.
References
Jira ticket: link
Destructive Changes
There are no destructive changes
Known Limitations
N/A
Related Issues
4.2.9
Description
Abstract
This PR contains unit tests for the distance namespace, which is a part of traffic_simulator package.
Additionally:
- Minor fixes were applied to the
distanceToLeftLaneBound
anddistanceToRightLaneBound
. - The standard map, which was used extensively, was moved into its own folder, just like the other maps.
- Minor simplifications in the old
hdmap_utils
tests. - An additional map
intersection
was added. It contains a large, complex intersection and is convenient in numerous scenarios.
Details
List of tests included in this PR:
- distanceTest_FourTrackHighway.lateralDistance_impossible_noChange
- distanceTest_FourTrackHighway.lateralDistance_possible_noChange
- distanceTest_FourTrackHighway.lateralDistance_impossible_change
- distanceTest_FourTrackHighway.lateralDistance_possible_change
- distanceTest_FourTrackHighway.lateralDistance_impossible_matching
- distanceTest_FourTrackHighway.lateralDistance_possible_matching
- distanceTest_FourTrackHighway.longitudinalDistance_noAdjacent_noOpposite_noChange_false
- distanceTest_FourTrackHighway.longitudinalDistance_adjacent_noOpposite_noChange_false
- distanceTest_FourTrackHighway.longitudinalDistance_adjacent_noOpposite_noChange
- distanceTest_FourTrackHighway.longitudinalDistance_noAdjacent_noOpposite_change_false
- distanceTest_FourTrackHighway.longitudinalDistance_noAdjacent_noOpposite_change
- distanceTest_StandardMap.longitudinalDistance_noAdjacent_noOpposite_noChange
- distanceTest_StandardMap.distanceToLeftLaneBound_single
- distanceTest_StandardMap.distanceToLeftLaneBound_multipleVector
- distanceTest_StandardMap.distanceToLeftLaneBound_singleVector
- distanceTest_StandardMap.distanceToLeftLaneBound_emptyVector
- distanceTest_Intersection.longitudinalDistance_adjacent_noOpposite_change_false
- distanceTest_Intersection.longitudinalDistance_adjacent_noOpposite_change
- distanceTest_Intersection.distanceToRightLaneBound_single
- distanceTest_Intersection.distanceToRightLaneBound_multipleVector
- distanceTest_Intersection.distanceToRightLaneBound_singleVector
- distanceTest_Intersection.distanceToRightLaneBound_emptyVector
- distance.boundingBoxDistance_intersection
- distance.boundingBoxDistance_disjoint
References
Jira ticket: internal link
Destructive Changes
There are no destructive changes.
Regression tests
Jira comment: internal link
Related Issues
4.2.8
Description
I found a bug in ego respawn logic. The ego orientation is not set correctly and respawns with wrong pose.
movie-2024-09-18_08.59.17.mp4
Abstract
I analyzed bug and fixed it in this PR.
Background
I found this line was called even when I set map pose as ego's respawn pose. But I thought it was unexpected result because the new pose was substituted to status.pose
in this case.
Details
I think we have to set flag status.lanelet_pose_valid
to false
when we use map pose.
diff --git a/simulation/traffic_simulator/src/api/api.cpp b/simulation/traffic_simulator/src/api/api.cpp
index d02bbfc7c..5018b3d76 100644
--- a/simulation/traffic_simulator/src/api/api.cpp
+++ b/simulation/traffic_simulator/src/api/api.cpp
@@ -171,6 +171,7 @@ auto API::setEntityStatus(
EntityStatus status = static_cast<EntityStatus>(entity->getCanonicalizedStatus());
status.pose = map_pose;
status.action_status = action_status;
+ status.lanelet_pose_valid = false;
setEntityStatus(name, status);
} else {
THROW_SIMULATION_ERROR("Cannot set entity \"", name, "\" status - such entity does not exist.");
After that ego respawns with correct pose.
movie-2024-09-18_09.25.24.mp4
References
tier4/sim_evaluation_tools#343
Destructive Changes
N/A
Known Limitations
N/A
Related Issues
4.2.7
Description
Now that #1368 was merged, we can change update rate for traffic_simulator::AP
I but I found there was another hard-coded variable in cpp_scenario_node.cpp
.
Abstract
Use global_frame_rate
paramter for timer in cpp_scenario_node.cpp
.
diff --git a/mock/cpp_mock_scenarios/src/cpp_scenario_node.cpp b/mock/cpp_mock_scenarios/src/cpp_scenario_node.cpp
index b9f0d72a0..4fb9bd392 100644
--- a/mock/cpp_mock_scenarios/src/cpp_scenario_node.cpp
+++ b/mock/cpp_mock_scenarios/src/cpp_scenario_node.cpp
@@ -64,8 +64,9 @@ void CppScenarioNode::start()
{
onInitialize();
api_.startNpcLogic();
- using namespace std::chrono_literals;
- update_timer_ = this->create_wall_timer(50ms, std::bind(&CppScenarioNode::update, this));
+ const auto rate =
+ std::chrono::duration<double>(1.0 / get_parameter("global_frame_rate").as_double());
+ update_timer_ = this->create_wall_timer(rate, std::bind(&CppScenarioNode::update, this));
}
Background
N/A
Details
References
N/A
Destructive Changes
N/A
Known Limitations
N/A
Related Issues
4.2.6
Description
Abstract
This PR contains unit tests for the pose namespace, which is a part of traffic_simulator package
Details
List of tests included in this PR:
- pose.quietNaNPose
- pose.quietNaNLaneletPose
- pose.canonicalize_default
- pose.canonicalize_invalid
- pose.canonicalize_valid
- pose.toMapPose_CanonicalizedLaneletPosepose.toMapPose_LaneletPose
- pose.toCanonicalizedLaneletPose_noBoundingBox_noRoute_valid
- pose.toCanonicalizedLaneletPose_noBoundingBox_noRoute_invalid
- pose.toCanonicalizedLaneletPose_BoundingBox_noRoute_valid
- pose.toCanonicalizedLaneletPose_BoundingBox_noRoute_invalid
- pose.toCanonicalizedLaneletPose_BoundingBox_route_emptyInvalid
- pose.toCanonicalizedLaneletPose_BoundingBox_route_emptyValid
- pose.toCanonicalizedLaneletPose_BoundingBox_route_nonEmptyInvalid
- pose.toCanonicalizedLaneletPose_BoundingBox_route_nonEmptyValid
- pose.transformRelativePoseToGlobal
- pose.relativePose_poses_zeros
- pose.relativePose_poses_zero
- pose.relativePose_poses_complex
- pose.relativePose_canonicalized_end_position
- pose.relativePose_canonicalized_start_position
- pose.boundingBoxRelativePose_disjoint
- pose.boundingBoxRelativePose_commonEdge
- pose.boundingBoxRelativePose_intersect
- pose.relativeLaneletPose_s_invalid
- pose.relativeLaneletPose_s_valid
- pose.relativeLaneletPose_offset_invalid
- pose.relativeLaneletPose_offset_valid
- pose.boundingBoxRelativeLaneletPose_s_invalid
- pose.boundingBoxRelativeLaneletPose_s_valid
- pose.boundingBoxRelativeLaneletPose_offset_invalid
- pose.boundingBoxRelativeLaneletPose_offset_valid
- pose.isInLanelet_inside
- pose.isInLanelet_outsideFrontFar
- pose.isInLanelet_outsideFrontClose
- pose.isInLanelet_outsideBackFar
- pose.isInLanelet_outsideBackClose
- pose.isAtEndOfLanelets_noFollowing_within
- pose.isAtEndOfLanelets_singleFollowing_within
- pose.isAtEndOfLanelets_singleFollowing_outside
- pose.isAtEndOfLanelets_multipleFollowing_within
- pose.isAtEndOfLanelets_multipleFollowing_outside
- pose.laneletLength_invalid
- pose.laneletLength_valid
References
Jira ticket: internal link
Destructive Changes
There are no destructive changes.
Related Issues
4.2.5
Description
This PR follows with fix/colcon_build_error.
Abstract
There is an error in some environments due to forgetting to write install.
Background
N/A
Details
With a brand new workspace, add_cpp_mock_scenario_test.cmake needs to be installed in CMakeLists.txt first. Or you will have the error below:
CMake Error at /path_to_workspace/install/cpp_mock_scenarios/share/cpp_mock_scenarios/cmake/cpp_mock_scenarios_ament_cmake-extras.cmake:17 (include):
include could not find requested file:
/path_to_workspace/install/cpp_mock_scenarios/share/cpp_mock_scenarios/cmake/add_cpp_mock_scenario_test.cmake
References
N/A
Destructive Changes
N/A
Known Limitations
N/A
Related Issues
4.2.4
4.2.3
Description
- pass necessary parameters to
cpp_scenario_node
properly. - make it possible to change frame rate and real time factor by parameter.
Abstract
- update
mock_test.launch.py
in order to pass necessary parameters. - fix
cpp_scenario_node
implementation to use parameter.
Background
I found cpp_scenario_node
didn't use proper vehicle model type which was definded in simulator_model.param.yaml when I used mock_test.launch.py
.
Additionally, I think it is better to remove hard-coded variable so that we can change the configuration flexibly.
Details
With this PR, I confirmed cpp_scenario_node works with expecrted vehicle model type and calculates vehicle state with expected step time defined by global_frame_rate
.
Used command:
ros2 launch cpp_mock_scenarios mock_test.launch.py scenario:=random001 global_frame_rate:=30.0 vehicle_model:=lexus sensor_model:=aip_xx1
Used vehicle model: DELAY_STEER_ACC_GEARED
Insert debug snipet:
--- a/simulation/simple_sensor_simulator/src/vehicle_simulation/ego_entity_simulation.cpp
+++ b/simulation/simple_sensor_simulator/src/vehicle_simulation/ego_entity_simulation.cpp
@@ -79,6 +79,7 @@ auto EgoEntitySimulation::getVehicleModelType() -> VehicleModelType
{
const auto vehicle_model_type =
getParameter<std::string>("vehicle_model_type", "IDEAL_STEER_VEL");
+ std::cout << "vehicle_model_type:" << vehicle_model_type << std::endl;
static const std::unordered_map<std::string, VehicleModelType> table{
{"DELAY_STEER_ACC", VehicleModelType::DELAY_STEER_ACC},
@@ -106,6 +107,7 @@ auto EgoEntitySimulation::makeSimulationModel(
{
auto node = rclcpp::Node("get_parameter", "simulation");
+ std::cout << "step_time" << step_time << std::endl;
auto get_parameter = [&](const std::string & name, auto value = {}) {
node.declare_parameter<decltype(value)>(name, value);
node.get_parameter<decltype(value)>(name, value);
Screen output:
[INFO] [launch]: All log files can be found below /home/satoshi/.ros/log/2024-09-11-08-24-44-066448-dpc2406501-5612
[INFO] [launch]: Default logging verbosity is set to INFO
architecture_type := awf/universe/20230906
autoware_launch_file := planning_simulator.launch.xml
autoware_launch_package := autoware_launch
consider_acceleration_by_road_slope := False
consider_pose_by_road_slope := True
global_frame_rate := 30.0
global_real_time_factor := 1.0
global_timeout := 180
initialize_duration := 300
launch_autoware := True
launch_rviz := False
output_directory := /tmp
port := 5555
publish_empty_context := False
record := False
rviz_config := /home/satoshi/pilot-auto/install/traffic_simulator/share/traffic_simulator/config/scenario_simulator_v2.rviz
scenario := random001 ...