Skip to content
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

feat(realtime_factor): pass use_sim_time to Autoware #1207

Merged
merged 24 commits into from
Sep 3, 2024

Conversation

pawellech1
Copy link
Contributor

@pawellech1 pawellech1 commented Mar 5, 2024

Description

Abstract

use_sim_time parameter is passed to the concealer's launch arguments based on the parameter passed to the scenario test runner launch command. It is False by default.

Background

Jira: RJD-822, RJD-1273
Document with stages 1,2,3: doc

Details

Usage of use_sim_time in Autoware and SS2 simulations:

  • Stage 1: merged #1150
  • Stage 2: merged #746 but reverted - because former way of propagating use_sim_time param to Autoware made it impossible to use the parameter outside of the simulation other solution was necessary - it is included in this PR
  • Stage 3: omitted due to multiple regressions after setting use_sim_time to True as default

Multiple situations were tested:

  1. SS2 with Autoware
  • use_sim_time:=True passed using command line
    • Both Autoware and SS2 are launched with use_sim_time=true.
    • Time published on /clock is the simulation time (starting from 0).
    • Time published on /clock can be controlled by RViz plugin.
    • Simulation time can be controlled by RViz plugin.
  • use_sim_time:=False passed using command line (default value)
    • Both Autoware and SS2 are launched with use_sim_time=false.
    • Time published on /clock is the walltime.
    • Time published on /clock cannot be controlled by RViz plugin.
    • Simulation time can be controlled by RViz plugin.
  1. SS2 with Autoware and AWSIM (tested on awsim-ss2-stable)
  • use_sim_time:=True passed using command line
    • Both Autoware and SS2 are launched with use_sim_time=true.
    • Time published on /clock is the simulation time (starting from 0).
    • Although the speed of time published on /clock can be controlled by RViz plugin it only affects the Autoware.
    • AWSIM behaves as if the speed of time was not changed which leads to invalid behavior.
    • It is possible to use the global_real_time_factor launch parameter if the StepExecution is turned on in ScenarioSimulatorConnector before AWSIM launch.
  • use_sim_time:=False passed using command line (default value)
    • SS2 is launched with use_sim_time=false but Autoware is launched with use_sim_time=true.
    • Time published on /clock is raw time.
    • Time cannot be controlled by RViz plugin.
    • It is also not possible to control the speed of the simulation using the RViz plugin.

Destructive Changes

  • Now the value of the use_sim_time parameter is passed to the Autoware launchr.

Copy link

github-actions bot commented Mar 5, 2024

Checklist for reviewers ☑️

All references to "You" in the following text refer to the code reviewer.

  • Is this pull request written in a way that is easy to read from a third-party perspective?
  • Is there sufficient information (background, purpose, specification, algorithm description, list of disruptive changes, and migration guide) in the description of this pull request?
  • If this pull request contains a destructive change, does this pull request contain the migration guide?
  • Labels of this pull request are valid?
  • All unit tests/integration tests are included in this pull request? If you think adding test cases is unnecessary, please describe why and cross out this line.
  • The documentation for this pull request is enough? If you think adding documents for this pull request is unnecessary, please describe why and cross out this line.

@dmoszynski dmoszynski self-assigned this Jul 30, 2024
@dmoszynski dmoszynski added bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 documentation Improvements or additions to documentation and removed wait for regression test labels Jul 30, 2024
@dmoszynski dmoszynski changed the title use_sim_time used in concealer initialization feat(realtime_factor): pass use_sim_time to Autoware, set default==True Jul 30, 2024
@dmoszynski dmoszynski marked this pull request as ready for review August 29, 2024 08:31
@HansRobo
Copy link
Member

@dmoszynski @pawellech1
Finally, we've made use_sim_time default to false, so please update your pull-request title and description accordingly.

@dmoszynski dmoszynski changed the title feat(realtime_factor): pass use_sim_time to Autoware, set default==True feat(realtime_factor): pass use_sim_time to Autoware Aug 30, 2024
@dmoszynski
Copy link
Contributor

@HansRobo Done

@HansRobo
Copy link
Member

HansRobo commented Sep 2, 2024

I've pointed out a few minor inconsistencies.
That's all the requests to change.

@dmoszynski
Copy link
Contributor

@HansRobo
Please forgive me that I did not correct this earlier. 🙇
All requested changes introduced.

@HansRobo
Copy link
Member

HansRobo commented Sep 2, 2024

I'll merge after checking all CIs are green.

@HansRobo HansRobo merged commit dacb77c into master Sep 3, 2024
10 checks passed
@HansRobo HansRobo deleted the fix/use-sim-time-for-real-time-factor-control branch September 3, 2024 03:48
@github-actions github-actions bot restored the fix/use-sim-time-for-real-time-factor-control branch September 3, 2024 03:49
@github-actions github-actions bot deleted the fix/use-sim-time-for-real-time-factor-control branch September 3, 2024 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants