-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/real time factor control #1150
Conversation
Signed-off-by: Paweł Lech <[email protected]>
…imulation with ROS 2 topic
Signed-off-by: Paweł Lech <[email protected]>
Signed-off-by: Paweł Lech <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the implementation. I noticed several places for improvement. Please address the comments
rviz_plugins/real_time_factor_control_rviz_plugin/src/real_time_factor_slider.cpp
Outdated
Show resolved
Hide resolved
rviz_plugins/real_time_factor_control_rviz_plugin/src/real_time_factor_slider.cpp
Outdated
Show resolved
Hide resolved
rviz_plugins/real_time_factor_control_rviz_plugin/src/real_time_factor_slider.hpp
Outdated
Show resolved
Hide resolved
simulation/traffic_simulator/include/traffic_simulator/simulation_clock/simulation_clock.hpp
Outdated
Show resolved
Hide resolved
simulation/traffic_simulator/include/traffic_simulator/simulation_clock/simulation_clock.hpp
Outdated
Show resolved
Hide resolved
rviz_plugins/real_time_factor_control_rviz_plugin/src/real_time_factor_slider.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Paweł Lech <[email protected]>
82d1c1e
to
8265b55
Compare
…ents. Signed-off-by: Paweł Lech <[email protected]>
8265b55
to
0970a4c
Compare
…plugin Signed-off-by: Paweł Lech <[email protected]>
Signed-off-by: Paweł Lech <[email protected]>
…by default Signed-off-by: Paweł Lech <[email protected]>
rviz_plugins/real_time_factor_control_rviz_plugin/plugins/plugin_description.xml
Outdated
Show resolved
Hide resolved
rviz_plugins/real_time_factor_control_rviz_plugin/CMakeLists.txt
Outdated
Show resolved
Hide resolved
rviz_plugins/real_time_factor_control_rviz_plugin/src/real_time_factor_slider.cpp
Outdated
Show resolved
Hide resolved
rviz_plugins/real_time_factor_control_rviz_plugin/src/real_time_factor_slider.hpp
Outdated
Show resolved
Hide resolved
test_runner/scenario_test_runner/launch/scenario_test_runner.launch.py
Outdated
Show resolved
Hide resolved
simulation/traffic_simulator/src/simulation_clock/simulation_clock.cpp
Outdated
Show resolved
Hide resolved
simulation/traffic_simulator/src/simulation_clock/simulation_clock.cpp
Outdated
Show resolved
Hide resolved
simulation/traffic_simulator/src/simulation_clock/simulation_clock.cpp
Outdated
Show resolved
Hide resolved
simulation/traffic_simulator/src/simulation_clock/simulation_clock.cpp
Outdated
Show resolved
Hide resolved
simulation/traffic_simulator/src/simulation_clock/simulation_clock.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Paweł Lech <[email protected]>
Signed-off-by: Paweł Lech <[email protected]>
@yamacir-kit thank you for your first review, I have implemented the changes you requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is likely to include disruptive changes regarding integration with AWSIM.
To prevent accidental merges, we will temporarily set this to Request Changes.
@hakuturu583 I wanted to verify if this PR impairs the ss2 and AWSIM integration. In order to do that I tried running
It seems for now that running I will be trying to identify the root of this issue in order to run the scenario successfully. |
I've tested the code from the PR and I was able to reproduce the issue mentioned by @pawellech1. Updating the branch to the newest master solved the issue for me and I was able to run AWSIM with code from this PR successfully. Regarding the potential breaking of the communication with AWSIM - the AWSIM code should be updated to fully support the functionality to change the step time in runtime. I prepared a PR to introduce this in AWSIM: tier4/AWSIM#259 |
simulation/traffic_simulator/include/traffic_simulator/api/api.hpp
Outdated
Show resolved
Hide resolved
I have checked the source code and feel that there are no problems left. |
Signed-off-by: Paweł Lech <[email protected]>
Types of PR
Link to the issue
https://tier4.atlassian.net/browse/RJD-821
https://tier4.atlassian.net/browse/RJD-822
Description
Enabling using real_time_factor as the launch argument:
real_time_factor
insideSimulationClock
, which makes the clock work correctly when thereal_time_factor
is set as the launch argumentscenario_test_runner.launch.py
bothsimple_sensor_simulator_node
andopenscenario_interpreter_node
are now started withuse_sim_time:=True
.use_sim_time
parameter for concealer::AutowareUniverse created byEgoEntitySimulation
is now based on the globaluse_sim_time
parameter value.real_time_factor value control during the simulation
/real_time_factor
topic subscriber is created insidetraffic_simulator::API
. It is used to control the value ofreal_time_factor
during the simulation runtime.SimulationClock
passed time is now stored as a single double value representing seconds. Since thereal_time_factor
value might change during the simulation simple counting passed frames number would not work properly anymore.updateStepTimeRequest
in zeroMQ communication betweentraffic_simulator::API
andSimpleSensorSimulator
is created. The purpose of this request is to allow changing the value ofScenarioSimulator::step_time_
from thetraffic_simulator::API
when newreal_time_factor
value is received on the newly defined topic.GUI plugin controlling the value of
real_time_factor
real_time_factor
value, was created.How to test and review this PR.
To test this PR please use Autoware from this fork branch https://github.com/RobotecAI/autoware-1/tree/autoware-real-time-factor-stable.
The branch linked above uses fork of
autoware_launch
repository insideautoware.repos
file. On this autoware_launch fork, changes toplanning_simulator.launch.xml
file (from this unmerged PR autowarefoundation/autoware_launch#746) are introduced. These changes are necessary for the changes from this real-time-factor-control PR to work properly. Using the repository linked above ensures building a stable version. Except for the need to checkout different repository and branch, the rest of the Autoware building steps remain unchanged.This step is necessary since the versions of the repositories which Autoware depends on might differ in time, a simple checkout to the branch from the PR linked above might and probably will cause unexpected trouble.
Others