Skip to content

Releases: tier4/scenario_simulator_v2

4.3.2

24 Sep 09:13
Compare
Choose a tag to compare

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

19 Sep 06:05
Compare
Choose a tag to compare

Description

Fixes: #1302, #1312

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

#1302

4.3.0

19 Sep 04:24
Compare
Choose a tag to compare

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

19 Sep 02:53
Compare
Choose a tag to compare

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 and distanceToRightLaneBound.
  • 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:

  1. distanceTest_FourTrackHighway.lateralDistance_impossible_noChange
  2. distanceTest_FourTrackHighway.lateralDistance_possible_noChange
  3. distanceTest_FourTrackHighway.lateralDistance_impossible_change
  4. distanceTest_FourTrackHighway.lateralDistance_possible_change
  5. distanceTest_FourTrackHighway.lateralDistance_impossible_matching
  6. distanceTest_FourTrackHighway.lateralDistance_possible_matching
  7. distanceTest_FourTrackHighway.longitudinalDistance_noAdjacent_noOpposite_noChange_false
  8. distanceTest_FourTrackHighway.longitudinalDistance_adjacent_noOpposite_noChange_false
  9. distanceTest_FourTrackHighway.longitudinalDistance_adjacent_noOpposite_noChange
  10. distanceTest_FourTrackHighway.longitudinalDistance_noAdjacent_noOpposite_change_false
  11. distanceTest_FourTrackHighway.longitudinalDistance_noAdjacent_noOpposite_change
  12. distanceTest_StandardMap.longitudinalDistance_noAdjacent_noOpposite_noChange
  13. distanceTest_StandardMap.distanceToLeftLaneBound_single
  14. distanceTest_StandardMap.distanceToLeftLaneBound_multipleVector
  15. distanceTest_StandardMap.distanceToLeftLaneBound_singleVector
  16. distanceTest_StandardMap.distanceToLeftLaneBound_emptyVector
  17. distanceTest_Intersection.longitudinalDistance_adjacent_noOpposite_change_false
  18. distanceTest_Intersection.longitudinalDistance_adjacent_noOpposite_change
  19. distanceTest_Intersection.distanceToRightLaneBound_single
  20. distanceTest_Intersection.distanceToRightLaneBound_multipleVector
  21. distanceTest_Intersection.distanceToRightLaneBound_singleVector
  22. distanceTest_Intersection.distanceToRightLaneBound_emptyVector
  23. distance.boundingBoxDistance_intersection
  24. 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

18 Sep 07:09
Compare
Choose a tag to compare

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.

https://github.com/tier4/scenario_simulator_v2/blob/8d189b12b2eca96fbe393bd5f433328647871cb8/simulation/traffic_simulator/src/data_type/entity_status.cpp#L76

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

13 Sep 08:25
Compare
Choose a tag to compare

Description

Now that #1368 was merged, we can change update rate for traffic_simulator::API 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

13 Sep 03:23
Compare
Choose a tag to compare

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:

  1. pose.quietNaNPose
  2. pose.quietNaNLaneletPose
  3. pose.canonicalize_default
  4. pose.canonicalize_invalid
  5. pose.canonicalize_valid
  6. pose.toMapPose_CanonicalizedLaneletPosepose.toMapPose_LaneletPose
  7. pose.toCanonicalizedLaneletPose_noBoundingBox_noRoute_valid
  8. pose.toCanonicalizedLaneletPose_noBoundingBox_noRoute_invalid
  9. pose.toCanonicalizedLaneletPose_BoundingBox_noRoute_valid
  10. pose.toCanonicalizedLaneletPose_BoundingBox_noRoute_invalid
  11. pose.toCanonicalizedLaneletPose_BoundingBox_route_emptyInvalid
  12. pose.toCanonicalizedLaneletPose_BoundingBox_route_emptyValid
  13. pose.toCanonicalizedLaneletPose_BoundingBox_route_nonEmptyInvalid
  14. pose.toCanonicalizedLaneletPose_BoundingBox_route_nonEmptyValid
  15. pose.transformRelativePoseToGlobal
  16. pose.relativePose_poses_zeros
  17. pose.relativePose_poses_zero
  18. pose.relativePose_poses_complex
  19. pose.relativePose_canonicalized_end_position
  20. pose.relativePose_canonicalized_start_position
  21. pose.boundingBoxRelativePose_disjoint
  22. pose.boundingBoxRelativePose_commonEdge
  23. pose.boundingBoxRelativePose_intersect
  24. pose.relativeLaneletPose_s_invalid
  25. pose.relativeLaneletPose_s_valid
  26. pose.relativeLaneletPose_offset_invalid
  27. pose.relativeLaneletPose_offset_valid
  28. pose.boundingBoxRelativeLaneletPose_s_invalid
  29. pose.boundingBoxRelativeLaneletPose_s_valid
  30. pose.boundingBoxRelativeLaneletPose_offset_invalid
  31. pose.boundingBoxRelativeLaneletPose_offset_valid
  32. pose.isInLanelet_inside
  33. pose.isInLanelet_outsideFrontFar
  34. pose.isInLanelet_outsideFrontClose
  35. pose.isInLanelet_outsideBackFar
  36. pose.isInLanelet_outsideBackClose
  37. pose.isAtEndOfLanelets_noFollowing_within
  38. pose.isAtEndOfLanelets_singleFollowing_within
  39. pose.isAtEndOfLanelets_singleFollowing_outside
  40. pose.isAtEndOfLanelets_multipleFollowing_within
  41. pose.isAtEndOfLanelets_multipleFollowing_outside
  42. pose.laneletLength_invalid
  43. pose.laneletLength_valid

References

Jira ticket: internal link

Destructive Changes

There are no destructive changes.

Related Issues

4.2.5

12 Sep 09:00
Compare
Choose a tag to compare

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

12 Sep 08:57
Compare
Choose a tag to compare

Description

Abstract

Use awf/universe/20230906 for architecture_type in documentation

Background

related: #1374

References

None

Destructive Changes

None

Known Limitations

None

Related Issues

4.2.3

11 Sep 02:50
Compare
Choose a tag to compare

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                                                                                                                                                                                                                                    ...
Read more