Skip to content

Releases: tier4/scenario_simulator_v2

9.0.0

30 Jan 02:37
Compare
Choose a tag to compare

Description

Abstract

This pull request introduces the change of exposing direct access to Entity objects through the API. This change increases flexibility of using the API and removes the need to have many forwarding functions to Entities member functions.

Background

This pull request is one of many that aim to modularize the scenario_simulator_v2.

The main goal of this PR was to remove numerous member functions of EntityManager (and subsequently some of API too) that forwarded calls to Entities member functions:
https://github.com/tier4/scenario_simulator_v2/blob/0dbf4ec0e573372306716f8d77933891564b36d6/simulation/traffic_simulator/include/traffic_simulator/entity/entity_manager.hpp#L162-L216

This has largely been achieved by exposing direct access to Entity and its member functions through the API::getEntity function:
https://github.com/tier4/scenario_simulator_v2/blob/8940b3e2f127bbca92295a91d580887030e45be6/simulation/traffic_simulator/include/traffic_simulator/api/api.hpp#L303

The following change was to adjust all cpp mock scenarios to use the new interface.
This is the main reason why this PR is so large - all mock scenarios had to be corrected.

Scenarios using the new interface have been changed similarly to the example below.
Before:
https://github.com/tier4/scenario_simulator_v2/blob/0dbf4ec0e573372306716f8d77933891564b36d6/mock/cpp_mock_scenarios/src/follow_lane/acquire_position_in_world_frame.cpp#L41-L64
After:
https://github.com/tier4/scenario_simulator_v2/blob/8940b3e2f127bbca92295a91d580887030e45be6/mock/cpp_mock_scenarios/src/follow_lane/acquire_position_in_world_frame.cpp#L41-L64

Similar changes had to be applied to the whole codebase relying on the API like simulator_core.hpp.

What is more, EgoEntity has been modified in such a way, that the function
https://github.com/tier4/scenario_simulator_v2/blob/0dbf4ec0e573372306716f8d77933891564b36d6/simulation/traffic_simulator/include/traffic_simulator/entity/ego_entity.hpp#L68
has been replaced with a set of other functions below:
https://github.com/tier4/scenario_simulator_v2/blob/8940b3e2f127bbca92295a91d580887030e45be6/simulation/traffic_simulator/include/traffic_simulator/entity/ego_entity.hpp#L155-L164

This change simplifies the interface of calling Ego specific actions like engage or sendCooperateCommand.

Details

Below are the detailed interface changes that have been made to EntityStatus, EntityBase, EntityManager and the API.

EntityStatus

  • Renamed laneMatchingSucceed to isInLanelet:
    auto laneMatchingSucceed() const noexcept -> bool;
    ->
    auto isInLanelet() const noexcept -> bool;

EntityBase

  • Removed forwarded using macro to EntityStatus: laneMatchingSucceed:
    laneMatchingSucceed

  • Removed asFieldOperatorApplication, reachPosition and requestClearRoute:
    auto asFieldOperatorApplication() const -> concealer::FieldOperatorApplication &;
    bool reachPosition(const geometry_msgs::msg::Pose & target_pose, const double tolerance) const;
    bool reachPosition(const CanonicalizedLaneletPose & lanelet_pose, const double tolerance) const;
    bool reachPosition(const std::string & target_name, const double tolerance) const;
    void requestClearRoute();

  • Added: isStopped, isInPosition and isInLanelet.

auto isStopped() const -> bool;

auto isInPosition(const geometry_msgs::msg::Pose & pose, const double tolerance) const -> bool;
auto isInPosition(const CanonicalizedLaneletPose & lanelet_pose, const double tolerance) const -> bool;

auto isInLanelet() const -> bool;
auto isInLanelet(const lanelet::Id lanelet_id, std::optional<double> tolerance = std::nullopt) const -> bool;

Note: Maybe it's a good idea to provide that tolerance is always of type std::optional<double>?

EgoEntity

  • Removed asFieldOperatorApplication:
    auto asFieldOperatorApplication() const -> concealer::FieldOperatorApplication & override;

FieldOperatorApplicationFor

  • Added visibility to members of FieldOperatorApplication (see this comment).
  • EgoEntity now exposes these inherited members as a replacement of previous asFieldOperatorApplication:
auto isStopRequested() const -> bool;
auto isEngageable() const -> bool;
auto isEngaged() const -> bool;
auto engage() -> void;
auto sendCooperateCommand(const std::string & module_name, const std::string & command) -> void;
auto getAutowareStateName() const -> const std::string &;
auto getEmergencyStateName() const -> const std::string &;
auto getMinimumRiskManeuverBehaviorName() const -> const std::string &;
auto getMinimumRiskManeuverStateName() const -> const std::string &;
auto getTurnIndicatorsCommandName() const -> std::string;
auto requestAutoModeForCooperation(const std::string & module_name, const bool enable) -> void;
auto getWaypoints() const -> traffic_simulator_msgs::msg::WaypointsArray;

EntityManager

  • Removed forwarded using macro to EntityBase: activateOutOfRangeJob, asFieldOperatorApplication, cancelRequest, get2DPolygon, getBehaviorParameter, getBoundingBox, getCanonicalizedStatusBeforeUpdate, getCurrentAccel, getCurrentTwist, getDefaultMatchingDistanceForLaneletPoseCalculation, getEntityType, getEntityTypename, getLinearJerk, getRouteLanelets, getStandStillDuration, getTraveledDistance, isControlledBySimulator, laneMatchingSucceed, reachPosition, requestAcquirePosition, requestAssignRoute, requestClearRoute, requestFollowTrajectory, requestLaneChange, requestSpeedChange, requestSynchronize, requestWalkStraight, setAcceleration, setAccelerationLimit, setAccelerationRateLimit, setBehaviorParameter, setControlledBySimulator, setDecelerationLimit, setDecelerationRateLimit, setLinearJerk, setLinearVelocity, setMapPose, setTwist, setVelocityLimit:
    FORWARD_TO_ENTITY(activateOutOfRangeJob);,
    FORWARD_TO_ENTITY(asFieldOperatorApplication);,
    FORWARD_TO_ENTITY(cancelRequest);,
    FORWARD_TO_ENTITY(get2DPolygon);,
    FORWARD_TO_ENTITY(getBehaviorParameter);,
    FORWARD_TO_ENTITY(getBoundingBox);,
    FORWARD_TO_ENTITY(getCanonicalizedStatusBeforeUpdate);,
    FORWARD_TO_ENTITY(getCurrentAccel);,
    FORWARD_TO_ENTITY(getCurrentTwist);,
    FORWARD_TO_ENTITY(getDefaultMatchingDistanceForLaneletPoseCalculation);,
    FORWARD_TO_ENTITY(getEntityType);,
    FORWARD_TO_ENTITY(getEntityTypename);,
    FORWARD_TO_ENTITY(getLinearJerk);,
    FORWARD_TO_ENTITY(getRouteLanelets);,
    FORWARD_TO_ENTITY(getStandStillDuration);,
    FORWARD_TO_ENTITY(getTraveledDistance);,
    FORWARD_TO_ENTITY(isControlledBySimulator);,
    FORWARD_TO_ENTITY(laneMatchingSucceed);,
    FORWARD_TO_ENTITY(reachPosition);,
    FORWARD_TO_ENTITY(requestAcquirePosition);,
    FORWARD_TO_ENTITY(requestAssignRoute);,
    FORWARD_TO_ENTITY(requestClearRoute);,
    FORWARD_TO_ENTITY(requestFollowTrajectory);,
    FORWARD_TO_ENTITY(requestLaneChange);,
    FORWARD_TO_ENTITY(requestSpeedChange);,
    FORWARD_TO_ENTITY(requestSynchronize);,
    FORWARD_TO_ENTITY(requestWalkStraight);,
    FORWARD_TO_ENTITY(setAcceleration);,
    FORWARD_TO_ENTITY(setAccelerationLimit);,
    FORWARD_TO_ENTITY(setAccelerationRateLimit);,
    FORWARD_TO_ENTITY(setBehaviorParameter);,
    FORWARD_TO_ENTITY(setControlledBySimulator);,
    FORWARD_TO_ENTITY(setDecelerationLimit);,
    FORWARD_TO_ENTITY(setDecelerationRateLimit);,
    FORWARD_TO_ENTITY(setLinearJerk);,
    FORWARD_TO_ENTITY(setLinearVelocity);,
    FORWARD_TO_ENTITY(setMapPose);,
    FORWARD_TO_ENTITY(setTwist);,
    FORWARD_TO_ENTITY(setVelocityLimit);

  • Removed is, isStopping, isInLanelet, checkCollision, getEntityStatus, getCurrentAction:
    bool is(const std::string & name) const;
    ~~`bool isStopping(co...

Read more

8.0.2

28 Jan 04:37
Compare
Choose a tag to compare

Abstract

This PR contains a bug fix for the issue described here.

Details

The reference to a value managed by the shared pointer escapes (Line 30).
https://github.com/tier4/scenario_simulator_v2/blob/fa9ca062dfd0cb5ca6ea55ae28d29c8935dee668/external/concealer/include/concealer/subscriber.hpp#L21-L56

When that const & is used and the underlying value is modified by the owner, a race condition occurs.
Return by value instead of by const & to force a copy and avoid the problem.

References

Regressions OK

Related Issues

8.0.1

28 Jan 01:18
Compare
Choose a tag to compare

Description

Abstract

Background

From 1/24 in 2025, we do not update master branch but build error was found on master branch.

https://github.com/tier4/scenario_simulator_v2/actions/runs/12940509859

Details

2025-01-24T00:14:42.5803676Z E: Unable to locate package ros-humble-autoware-internal-planning-msgs
2025-01-24T00:14:42.5816288Z ERROR: the following rosdeps failed to install
2025-01-24T00:14:42.5817029Z   apt: command [apt-get install -y ros-humble-autoware-internal-planning-msgs] failed
2025-01-24T00:14:42.5846292Z �[1mexecuting command [apt-get install -y ros-humble-lanelet2-core]�[0m
2025-01-24T00:14:42.5847386Z �[1mexecuting command [apt-get install -y ros-humble-lanelet2-io]�[0m
2025-01-24T00:14:42.5849015Z �[1mexecuting command [apt-get install -y ros-humble-lanelet2-projection]�[0m
2025-01-24T00:14:42.5850832Z �[1mexecuting command [apt-get install -y ros-humble-lanelet2-python]�[0m
2025-01-24T00:14:42.5852002Z �[1mexecuting command [apt-get install -y ros-humble-lanelet2-routing]�[0m
2025-01-24T00:14:42.5852993Z �[1mexecuting command [apt-get install -y ros-humble-lanelet2-traffic-rules]�[0m
2025-01-24T00:14:42.5853567Z �[1mexecuting command [apt-get install -y ros-humble-lanelet2-validation]�[0m
2025-01-24T00:14:42.5854090Z �[1mexecuting command [apt-get install -y libboost-python-dev]�[0m
2025-01-24T00:14:42.5854519Z �[1mexecuting command [pip3 install -U yamale]�[0m
2025-01-24T00:14:42.5854912Z �[1mexecuting command [pip3 install -U xmlschema]�[0m
2025-01-24T00:14:42.5855333Z �[1mexecuting command [apt-get install -y libglfw3-dev]�[0m
2025-01-24T00:14:42.5855749Z �[1mexecuting command [apt-get install -y libtbb-dev]�[0m
2025-01-24T00:14:42.5856214Z �[1mexecuting command [apt-get install -y ros-humble-geographic-msgs]�[0m
2025-01-24T00:14:42.5856676Z �[1mexecuting command [apt-get install -y libomp-dev]�[0m
2025-01-24T00:14:42.5857114Z �[1mexecuting command [apt-get install -y nlohmann-json3-dev]�[0m
2025-01-24T00:14:42.5857571Z �[1mexecuting command [apt-get install -y ros-humble-rviz2]�[0m
2025-01-24T00:14:42.5858098Z �[1mexecuting command [apt-get install -y ros-humble-ament-cmake-clang-format]�[0m
2025-01-24T00:14:42.5858589Z �[1mexecuting command [apt-get install -y qtbase5-dev]�[0m
2025-01-24T00:14:42.5859041Z �[1mexecuting command [apt-get install -y ros-humble-rviz-common]�[0m
2025-01-24T00:14:42.5859503Z �[1mexecuting command [apt-get install -y libxerces-c-dev]�[0m
2025-01-24T00:14:42.5859979Z �[1mexecuting command [apt-get install -y ros-humble-lanelet2-maps]�[0m
2025-01-24T00:14:42.5860450Z �[1mexecuting command [apt-get install -y librange-v3-dev]�[0m
2025-01-24T00:14:42.5861008Z �[1mexecuting command [apt-get install -y ros-humble-behaviortree-cpp-v3]�[0m
2025-01-24T00:14:42.5861486Z �[1mexecuting command [apt-get install -y libqt5core5a]�[0m
2025-01-24T00:14:42.5861911Z �[1mexecuting command [apt-get install -y libqt5widgets5]�[0m
2025-01-24T00:14:42.5862442Z �[1mexecuting command [apt-get install -y ros-humble-generate-parameter-library]�[0m
2025-01-24T00:14:42.5863020Z �[1mexecuting command [apt-get install -y ros-humble-ouxt-lint-common]�[0m
2025-01-24T00:14:42.5863579Z �[1mexecuting command [apt-get install -y ros-humble-autoware-internal-debug-msgs]�[0m
2025-01-24T00:14:42.5864147Z �[1mexecuting command [apt-get install -y ros-humble-autoware-internal-msgs]�[0m
2025-01-24T00:14:42.5864717Z �[1mexecuting command [apt-get install -y ros-humble-autoware-internal-planning-msgs]�[0m

After analyzing the error, we found that ros-humble-autoware-internal-planning-msgs, an unreleased ROS 2 package, was trying to be resolved by rosdep.

So we added the GitHub repository for autoware-internal-msgs to the repos file

References

N/A

Destructive Changes

N/A

Known Limitations

N/A

Related Issues

8.0.0

24 Jan 01:21
Compare
Choose a tag to compare

Description

The non-regression is evidenced here.

Abstract

This is the first PR of 6 related to the HdMapUtils refactor - a class that allows you to get access to lanelet data - from an *.osm file.

The refactor is implemented in accordance with the proposal presented in the report WP11_Q2_2023: shared here.

As a result of merging all 6 PRs, HdMapUtils will no longer exist in the source code - it will be replaced by the LaneletWrapper and its namespace lanelet_wrapper - see a diagram below.

hdmaputils_refactor_init drawio

Background

The lanelet_wrapper namespace contains:

Main class LaneletWrapper is developed in the singleton pattern, and contains the activate(<path_to_lanelet_file>) method. LaneletWrapper uses static methods from the LaneletLoader class to load data from a *.osm file. This namespace also contains RouteCache, CenterPointsCache and LaneletLengthCache classes which are analogous to those in HdMapUtils. LaneletWrapper allows access to map data, graphs, rules and caches via static methods:

https://github.com/tier4/scenario_simulator_v2/blob/2645a653162bf9cc7ed7e998f64c22e5387a67ee/simulation/traffic_simulator/include/traffic_simulator/lanelet_wrapper/lanelet_wrapper.hpp#L271-L281

These static methods are used by the sub-namespaces of lanelet_wrapper.
lanelet_wrapper namespace consist of 6 sub-namespaces:

As a result of the merge of this PR 1/6, the necessary source code for LaneletWrapper as a singleton and its activation in the required places is added to the project. As well as the first and second namespaces: lanelet_wrapper::lanelet_map, lanelet_wrapper::pose are added, But most importantly, the ::pose from utils is adapted for its use.
In addition to this, PR is making several other improvements to the code, see below for details.

Details

LaneletWrapper is added and the lanelet_map namespace in utils is developed.
Now, in order to access the lanelet data, there is no need to create HdMapUtils, just call lanelet_map::activate() in a single instance of the program - passing the path to the *.osm map.

Currently, LaneletWrapper is activated in:

Note: By moving from HdMapUtils, we mean moving the entire method to lanelet_wrapper (as a free function), which traffic_simulator has access to via free functions from utils. Sample of the relationship between utils and lanelet_wrapper after changes: <HdMapUtils method name> to <utils namespace and function name> -> <lanelet_wrapper namespace and function name>.

Moved from HdMapUtils to lanelet_wrapper namespaces - used by lanelet_map and pose from utils:

  • getLaneletLength to lanelet_map::laneletLength -> lanelet_wrapper::lanelet_map::laneletLength

  • getLaneletAltitude to lanelet_map::laneletAltitude -> lanelet_wrapper::lanelet_map::laneletAltitude

  • getCenterPoints to lanelet_wrapper::lanelet_map::centerPoints - this has been copied, the original will be deleted soon

  • canonicalizeLaneletPose to pose::canonicalize() -> lanelet_wrapper::pose::canonicalizeLaneletPose

  • getAllCanonicalizedLaneletPoses to pose::alternativeLaneletPoses -> lanelet_wrapper::pose::alternativeLaneletPoses

  • getAlongLaneletPose to pose::alongLaneletPose -> lanelet_wrapper::pose::alongLaneletPose

  • getLeftLaneletIds to pose::leftLaneletIds -> lanelet_wrapper::pose::leftLaneletIds

  • getRightLaneletIds to pose::rightLaneletIds -> lanelet_wrapper::pose::rightLaneletIds

  • getNextLaneletIds to pose::nextLaneletIds -> lanelet_wrapper::pose::nextLaneletIds

  • getPreviousLaneletIds to pose::previousLaneletIds -> lanelet_wrapper::pose::previousLaneletIds

  • toMapPose to pose::toMapPose -> lanelet_wrapper::pose::toMapPose

  • matchToLane to pose::matchToLane -> lanelet_wrapper::pose::matchToLane

  • toLaneletPose to pose::toLaneletPose -> lanelet_wrapper::pose::toLaneletPose

  • toLaneletPoses to pose::toLaneletPoses -> lanelet_wrapper::pose::toLaneletPoses

  • isAltitudeMatching to pose::isAltitudeMatching -> lanelet_wrapper::pose::isAltitudeMatching

Thanks to this, the passing of HdMapUtils ptr has been removed from functions:

  • CanonicalizedEntityStatus::set
  • pose::canonicalize
  • pose::toCanonicalizedLaneletPose
  • pose::toMapPose
  • pose::pedestrian::transformToCanonicalizedLaneletPose
  • CanonicalizedLaneletPose contructor
  • helper::constructCanonicalizedLaneletPose
  • helper::constructLaneletPose

In addition:

  • Adapted:
    • test_hdmap_utils - to use functions from lanelet_wrapper - in the next PRs this file will be broken down so that tests for each sub-namespace of lanelet_wrapper will be separated file.
    • helper_functions and other files from the test/* folder to lanelet_wrapper.
    • Returned type and the definition of pose::canonicalize() - now it returns LaneletPose and throws an exception - which is in harmony with the name and expectations. Whenever CanonicalizedLaneletPose is needed, the pose::toCanonicalizedLaneletPose() function is used. In addition, there is no longer a CanonicalizedLaneletPose::canonicalize() method - common pose::canonicalize is used there.
    • Configuration constructor and its use in cpp_scenario_node and openscenario_interpreter.
  • Fixed
    • Distance along lanelet calculation in follow_trajectory_action - previously the orientation was not taken into account leading to failures in some scenarios,
  • Simplified:
Read more

7.4.7

20 Jan 08:44
Compare
Choose a tag to compare

Abstract

This PR contains a bug fix for the issue described here.
After applying this fix, the scenario in question now passes.

Details

  1. The problem arises when behavior_plugin_ptr_->getWaypoints() is called while the Blackboard does not contain the Waypoints value yet. In this function:
    https://github.com/tier4/scenario_simulator_v2/blob/ee61ede05d2969a395e9a946d0d035b73c845910/simulation/traffic_simulator/src/entity/vehicle_entity.cpp#L114-L127
  2. Default-initializing the missing values (that is, Waypoints and Obstacle) in the vehicle constructor seems to be fixing the issue.
  3. But after a deeper dive into the behavior tree actions, I have found an abnormality in the code:
    https://github.com/tier4/scenario_simulator_v2/blob/ee61ede05d2969a395e9a946d0d035b73c845910/simulation/behavior_tree_plugin/src/vehicle/follow_lane_sequence/follow_lane_action.cpp#L69-L138
  • There are multiple actions overloading tick() method (such as StopAtStopLineAction or FollowFrontEntityAction).
  • if the tick() method returns BT::NodeStatus::RUNNING or BT::NodeStatus::SUCCESS there is always setOutput("waypoints", waypoints); setOutput("obstacle", calculateObstacle(waypoints));.
  • if the tick() method returns BT::NodeStatus::FAILURE waypoints and obstacle is never set.
  • the only exception to this rule is changed in this PR.
  • removing this abnormality also fixes the issue.

References

Regressions OK

Related Issues

7.4.6

10 Jan 08:22
Compare
Choose a tag to compare

Bumps jinja2 from 3.1.4 to 3.1.5.

Release notes

Sourced from jinja2's releases.

3.1.5

This is the Jinja 3.1.5 security fix release, which fixes security issues and bugs but does not otherwise change behavior and should not result in breaking changes compared to the latest feature release.

PyPI: https://pypi.org/project/Jinja2/3.1.5/ Changes: https://jinja.palletsprojects.com/changes/#version-3-1-5 Milestone: https://github.com/pallets/jinja/milestone/16?closed=1

  • The sandboxed environment handles indirect calls to str.format, such as by passing a stored reference to a filter that calls its argument. GHSA-q2x7-8rv6-6q7h
  • Escape template name before formatting it into error messages, to avoid issues with names that contain f-string syntax. #1792, GHSA-gmj6-6f8f-6699
  • Sandbox does not allow clear and pop on known mutable sequence types. #2032
  • Calling sync render for an async template uses asyncio.run. #1952
  • Avoid unclosed auto_aiter warnings. #1960
  • Return an aclose-able AsyncGenerator from Template.generate_async. #1960
  • Avoid leaving root_render_func() unclosed in Template.generate_async. #1960
  • Avoid leaving async generators unclosed in blocks, includes and extends. #1960
  • The runtime uses the correct concat function for the current environment when calling block references. #1701
  • Make |unique async-aware, allowing it to be used after another async-aware filter. #1781
  • |int filter handles OverflowError from scientific notation. #1921
  • Make compiling deterministic for tuple unpacking in a {% set ... %} call. #2021
  • Fix dunder protocol (copy/pickle/etc) interaction with Undefined objects. #2025
  • Fix copy/pickle support for the internal missing object. #2027
  • Environment.overlay(enable_async) is applied correctly. #2061
  • The error message from FileSystemLoader includes the paths that were searched. #1661
  • PackageLoader shows a clearer error message when the package does not contain the templates directory. #1705
  • Improve annotations for methods returning copies. #1880
  • urlize does not add mailto: to values like @a@b. #1870
  • Tests decorated with @pass_context can be used with the |select filter. #1624
  • Using set for multiple assignment (a, b = 1, 2) does not fail when the target is a namespace attribute. #1413
  • Using set in all branches of {% if %}{% elif %}{% else %} blocks does not cause the variable to be considered initially undefined. #1253
Changelog

Sourced from jinja2's changelog.

Version 3.1.5

Released 2024-12-21

  • The sandboxed environment handles indirect calls to str.format, such as by passing a stored reference to a filter that calls its argument. :ghsa:q2x7-8rv6-6q7h
  • Escape template name before formatting it into error messages, to avoid issues with names that contain f-string syntax. :issue:1792, :ghsa:gmj6-6f8f-6699
  • Sandbox does not allow clear and pop on known mutable sequence types. :issue:2032
  • Calling sync render for an async template uses asyncio.run. :pr:1952
  • Avoid unclosed auto_aiter warnings. :pr:1960
  • Return an aclose-able AsyncGenerator from Template.generate_async. :pr:1960
  • Avoid leaving root_render_func() unclosed in Template.generate_async. :pr:1960
  • Avoid leaving async generators unclosed in blocks, includes and extends. :pr:1960
  • The runtime uses the correct concat function for the current environment when calling block references. :issue:1701
  • Make |unique async-aware, allowing it to be used after another async-aware filter. :issue:1781
  • |int filter handles OverflowError from scientific notation. :issue:1921
  • Make compiling deterministic for tuple unpacking in a {% set ... %} call. :issue:2021
  • Fix dunder protocol (copy/pickle/etc) interaction with Undefined objects. :issue:2025
  • Fix copy/pickle support for the internal missing object. :issue:2027
  • Environment.overlay(enable_async) is applied correctly. :pr:2061
  • The error message from FileSystemLoader includes the paths that were searched. :issue:1661
  • PackageLoader shows a clearer error message when the package does not contain the templates directory. :issue:1705
  • Improve annotations for methods returning copies. :pr:1880
  • urlize does not add mailto: to values like @a@b. :pr:1870
  • Tests decorated with @pass_context`` can be used with the ``|select`` filter. :issue:1624`
  • Using set for multiple assignment (a, b = 1, 2) does not fail when the target is a namespace attribute. :issue:1413
  • Using set in all branches of {% if %}{% elif %}{% else %} blocks does not cause the variable to be considered initially undefined. :issue:1253
Commits
  • 877f6e5 release version 3.1.5
  • 8d58859 remove test pypi
  • eda8fe8 update dev dependencies
  • c8fdce1 Fix bug involving calling set on a template parameter within all branches of ...
  • 66587ce Fix bug where set would sometimes fail within if
  • fbc3a69 Add support for namespaces in tuple parsing (#1664)
  • b8f4831 more comments about nsref assignment
  • ee83219 Add support for namespaces in tuple assignment
  • 1d55cdd Triple quotes in docs (#2064)
Read more

7.4.5

10 Jan 01:24
Compare
Choose a tag to compare

Description

Abstract

Add const std::function<void(const std::string &)> & despawn_function argument to the TrafficSink/TrafficController class.

Background

Fixed #1464 to call EntityManager::despawnEntity function instead of API::despawn function during PR review process.
The API::despawn function included a function to communicate with sensor_simulator, and the function to delete Entity in sensor simulator via inter-process communication was implemented.
The EntityManager::despawnEntity function has been changed to call the EntityManager::despawnEntity function, so Entity in sensor simulator is no longer deleted.

Details

Add const std::function<void(const std::string &)> & despawn_function argument to the TrafficSink/TrafficController class and pass API::despawn function in member initialize list of the API class.

class API
{
public:
  template <typename NodeT, typename AllocatorT = std::allocator<void>, typename... Ts>
  explicit API(NodeT && node, const Configuration & configuration, Ts &&... xs)
  : traffic_controller_ptr_(std::make_shared<traffic::TrafficController>(
      [this](const std::string & name) { despawn(name); }, entity_manager_ptr_,
      configuration.auto_sink_entity_types))

References

#1464
https://star4.slack.com/archives/C04TZBEABDM/p1735261646158039?thread_ts=1735102371.414719&cid=C04TZBEABDM
Regression test.

Destructive Changes

N/A

Known Limitations

The design of this PR is not desirable, but for now it is a PR to solve the problems that have occurred.
In the future, use the Job class to replace the TrafficSink/TrafficSource class for a more reasonable refactor.

Related Issues

7.4.4

09 Jan 09:34
Compare
Choose a tag to compare

Description

Abstract

The package concealer code was refactored. (continuation of #1488.)

Background

See #1488 description.

Details

Reducing Member Functions

Several member functions were removed for the same purpose as in #1488. Below is the background and policy for this as described in #1488.

Member functions that are only used by certain member functions have been changed to function local functions. Making them private member functions was also an option, but we decided not to do so. Based on our experience in maintenance over the past few years, the cost of understanding where a certain member function is being called from is a burden both in terms of code modification and code review. This is just a matter of preference. I don't mind changing function-local functions to private member functions at some point, so I'm doing it this way for now to make refactoring following this pull request easier.

References

Destructive Changes

None.

Known Limitations

None.

Related Issues

7.4.3

07 Jan 08:01
Compare
Choose a tag to compare

Description

The following function in traffic_light_base.cpp is quite heavy because it always tries adding traffic light even when the traffic light has been registered in simulator.

auto TrafficLightsBase::getTrafficLight(const lanelet::Id traffic_light_id) -> TrafficLight &
{
  addTrafficLight(traffic_light_id);
  return traffic_lights_map_.at(traffic_light_id);
}

As a result, it becomes a bottle neck of simulator when I write a code to update traffic light color frequently.

Screenshot from 2024-11-13 13-29-45

Abstract

I added the guard to prevent redundant process like this:

diff --git a/simulation/traffic_simulator/src/traffic_lights/traffic_lights_base.cpp b/simulation/traffic_simulator/src/traffic_lights/traffic_lights_base.cpp
index 48110784a..906e80258 100644
--- a/simulation/traffic_simulator/src/traffic_lights/traffic_lights_base.cpp
+++ b/simulation/traffic_simulator/src/traffic_lights/traffic_lights_base.cpp
@@ -123,6 +123,10 @@ auto TrafficLightsBase::addTrafficLight(const lanelet::Id traffic_light_id) -> v
 
 auto TrafficLightsBase::getTrafficLight(const lanelet::Id traffic_light_id) -> TrafficLight &
 {
+  if (isTrafficLightAdded(traffic_light_id)) {
+    return traffic_lights_map_.at(traffic_light_id);
+  }
+
   addTrafficLight(traffic_light_id);
   return traffic_lights_map_.at(traffic_light_id);
 }

Background

N/A

Details

With this PR, I confirmed the process load became light.

image

References

N/A

Destructive Changes

N/A

Known Limitations

N/A

Related Issues

7.4.2

07 Jan 01:16
Compare
Choose a tag to compare

Description

Abstract

Updated the rviz config file based on autoware.rviz to display the latest Rviz plugin used by Autoware developers.
However, some modifications have been made so as not to disrupt the appearance of the previous scenario_simulator_v2 Rviz.

Screenshot from 2025-01-06 11-27-04

Background

Continuation of #1349

References

#1342

Destructive Changes

This is a destructive change for rviz config file.
But, there are no effects for simulation and autoware behaviors even if some rviz plugins are missing.

Known Limitations

None

Related Issues