Releases: tier4/scenario_simulator_v2
9.0.0
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
toisInLanelet
:
auto laneMatchingSucceed() const noexcept -> bool;
->
auto isInLanelet() const noexcept -> bool;
EntityBase
-
Removed forwarded using macro to
EntityStatus
:laneMatchingSucceed
:
laneMatchingSucceed
-
Removed
asFieldOperatorApplication
,reachPosition
andrequestClearRoute
:
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
andisInLanelet
.
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...
8.0.2
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
Description
Abstract
- Add autoware_internal_msgs to the repos file.
- Update docker-bake action version. (from
v3.0
tov6.3.0
) - Remove URL of cudnn EULA because of the URL become old.
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
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.
Background
The lanelet_wrapper
namespace contains:
LaneletLoader
LaneletWrapper
RouteCache
,CenterPointsCache
,LaneletLengthCache
TrafficRulesWithRoutingGraph
- 6 category-specific sub-namespaces
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:
These static methods are used by the sub-namespaces of lanelet_wrapper
.
lanelet_wrapper
namespace consist of 6 sub-namespaces:
lanelet_wrapper::lanelet_map
,lanelet_wrapper::pose
,lanelet_wrapper::distance
,lanelet_wrapper::route
,lanelet_wrapper::lane_change
,lanelet_wrapper::traffic_lights
.
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:
- Configuration constructor - i.e. in
openscenario_intepreter
andcpp_scenario_node
, simple_sensor_simulator
,- classes used in the unittests, such as
TrafficLightsTest
.
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
tolanelet_map::laneletLength -> lanelet_wrapper::lanelet_map::laneletLength
-
getLaneletAltitude
tolanelet_map::laneletAltitude -> lanelet_wrapper::lanelet_map::laneletAltitude
-
getCenterPoints
tolanelet_wrapper::lanelet_map::centerPoints
- this has been copied, the original will be deleted soon -
canonicalizeLaneletPose
topose::canonicalize() -> lanelet_wrapper::pose::canonicalizeLaneletPose
-
getAllCanonicalizedLaneletPoses
topose::alternativeLaneletPoses -> lanelet_wrapper::pose::alternativeLaneletPoses
-
getAlongLaneletPose
topose::alongLaneletPose -> lanelet_wrapper::pose::alongLaneletPose
-
getLeftLaneletIds
topose::leftLaneletIds -> lanelet_wrapper::pose::leftLaneletIds
-
getRightLaneletIds
topose::rightLaneletIds -> lanelet_wrapper::pose::rightLaneletIds
-
getNextLaneletIds
topose::nextLaneletIds -> lanelet_wrapper::pose::nextLaneletIds
-
getPreviousLaneletIds
topose::previousLaneletIds -> lanelet_wrapper::pose::previousLaneletIds
-
toMapPose
topose::toMapPose -> lanelet_wrapper::pose::toMapPose
-
matchToLane
topose::matchToLane -> lanelet_wrapper::pose::matchToLane
-
toLaneletPose
topose::toLaneletPose -> lanelet_wrapper::pose::toLaneletPose
-
toLaneletPoses
topose::toLaneletPoses -> lanelet_wrapper::pose::toLaneletPoses
-
isAltitudeMatching
topose::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
contructorhelper::constructCanonicalizedLaneletPose
helper::constructLaneletPose
In addition:
- Adapted:
test_hdmap_utils
- to use functions fromlanelet_wrapper
- in the next PRs this file will be broken down so that tests for each sub-namespace oflanelet_wrapper
will be separated file.helper_functions
and other files from thetest/*
folder tolanelet_wrapper
.- Returned type and the definition of
pose::canonicalize()
- now it returnsLaneletPose
and throws an exception - which is in harmony with the name and expectations. WheneverCanonicalizedLaneletPose
is needed, thepose::toCanonicalizedLaneletPose()
function is used. In addition, there is no longer aCanonicalizedLaneletPose::canonicalize()
method - commonpose::canonicalize
is used there. Configuration
constructor and its use incpp_scenario_node
andopenscenario_interpreter
.
- Fixed
- Distance along lanelet calculation in
follow_trajectory_action
- previously the orientation was not taken into account leading to failures in some scenarios,
- Distance along lanelet calculation in
- Simplified:
ActionNode::getDistanceToTargetEntityPolygon
- by developing a more coherent version ofpose::isAltitudeMatching
ActionNode::calculateUpdatedEntityStatus
- thanks to the separation of the functionlanelet_wrapper::pose::alongLaneletPose
(in subsequent PRs an intermediate route:: sub-namespace will be created, then it will be route::moveAlongLaneletPose)TrafficController::appendAutoSinks
- by separating the function `la...
7.4.7
Abstract
This PR contains a bug fix for the issue described here.
After applying this fix, the scenario in question now passes.
Details
- The problem arises when
behavior_plugin_ptr_->getWaypoints()
is called while theBlackboard
does not contain theWaypoints
value yet. In this function:
https://github.com/tier4/scenario_simulator_v2/blob/ee61ede05d2969a395e9a946d0d035b73c845910/simulation/traffic_simulator/src/entity/vehicle_entity.cpp#L114-L127 - Default-initializing the missing values (that is,
Waypoints
andObstacle
) in the vehicle constructor seems to be fixing the issue. - 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 asStopAtStopLineAction
orFollowFrontEntityAction
). - if the
tick()
method returnsBT::NodeStatus::RUNNING
orBT::NodeStatus::SUCCESS
there is alwayssetOutput("waypoints", waypoints); setOutput("obstacle", calculateObstacle(waypoints));
. - if the
tick()
method returnsBT::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
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
andpop
on known mutable sequence types. #2032- Calling sync
render
for an async template usesasyncio.run
. #1952- Avoid unclosed
auto_aiter
warnings. #1960- Return an
aclose
-ableAsyncGenerator
fromTemplate.generate_async
. #1960- Avoid leaving
root_render_func()
unclosed inTemplate.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 handlesOverflowError
from scientific notation. #1921- Make compiling deterministic for tuple unpacking in a
{% set ... %}
call. #2021- Fix dunder protocol (
copy
/pickle
/etc) interaction withUndefined
objects. #2025- Fix
copy
/pickle
support for the internalmissing
object. #2027Environment.overlay(enable_async)
is applied correctly. #2061- The error message from
FileSystemLoader
includes the paths that were searched. #1661PackageLoader
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 addmailto:
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
andpop
on known mutable sequence types. :issue:2032
- Calling sync
render
for an async template usesasyncio.run
. :pr:1952
- Avoid unclosed
auto_aiter
warnings. :pr:1960
- Return an
aclose
-ableAsyncGenerator
fromTemplate.generate_async
. :pr:1960
- Avoid leaving
root_render_func()
unclosed inTemplate.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 handlesOverflowError
from scientific notation. :issue:1921
- Make compiling deterministic for tuple unpacking in a
{% set ... %}
call. :issue:2021
- Fix dunder protocol (
copy
/pickle
/etc) interaction withUndefined
objects. :issue:2025
- Fix
copy
/pickle
support for the internalmissing
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 addmailto:
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.58d58859
remove test pypieda8fe8
update dev dependenciesc8fdce1
Fix bug involving calling set on a template parameter within all branches of ...66587ce
Fix bug where set would sometimes fail within iffbc3a69
Add support for namespaces in tuple parsing (#1664)b8f4831
more comments about nsref assignmentee83219
Add support for namespaces in tuple assignment1d55cdd
Triple quotes in docs (#2064)
7.4.5
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
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
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.
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.
References
N/A
Destructive Changes
N/A
Known Limitations
N/A
Related Issues
7.4.2
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.
Background
Continuation of #1349
References
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