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

tier4_simulated_clock_rviz_plugin does not work with planning_simulator.launch.xml #293

Closed
3 tasks done
VRichardJP opened this issue Apr 13, 2023 · 2 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@VRichardJP
Copy link
Contributor

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I'm convinced that this is not my fault but a bug.

Description

It seems Rviz is not configured properly when planning_simulator.launch.xml is used (it's maybe the same for the logging_simulator.launch.xml too):

image

As you can see, in Rviz "ROS time" is actually wall time.
One consequence is that the SimulatedClockPanel does not work.

A simple workaround is to start rviz in a separate terminal like this:

$ ros2 run rviz2 rviz2 -d src/launcher/autoware_launch/autoware_launch/rviz/autoware.rviz  --ros-args -p use_sim_time:=true

image

Then the SimulatedClockPanel works just fine.

I am wondering what is the proper fix though. I thought the global_params.launch.py should set the parameter for every Ros2 node, but apparently it is not the case.

Expected behavior

Rviz is started with simulated clock

Actual behavior

not the case

Steps to reproduce

run the planning simulator

Versions

No response

Possible causes

No response

Additional context

No response

@maxime-clem
Copy link
Contributor

When launching with the following command, the use_sim_time should be applied to all nodes (including rviz).

ros2 launch autoware_launch planning_simulator.launch.xml map_path:="$MAP" vehicle_model:="$VEHICLE" sensor_model:="$SENSOR" use_sim_time:=true

This is how I launch autoware when I want to use the simulated clock.

@VRichardJP VRichardJP added the bug Something isn't working label Apr 13, 2023
@VRichardJP
Copy link
Contributor Author

VRichardJP commented Apr 13, 2023

Oh sorry, I was using planning_simulator.launch.xml while reading the code of logging_simulator.launch.xml ^^
The use_sim_time works indeed!

tkimura4 referenced this issue in tier4/autoware_launch Apr 18, 2023
)

Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
soblin pushed a commit to soblin/autoware_launch that referenced this issue May 7, 2023
Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
kyoichi-sugahara pushed a commit that referenced this issue Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants