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

sys_time: publish /clock for simulation times #1622

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

dayjaby
Copy link
Contributor

@dayjaby dayjaby commented Sep 13, 2021

I hope ROS1 Pull Requests are still ok :-)

When replaying PX4 log files plus rosbag files, we need a way to sync the times between PX4 ulg and the rosbag. This can be accomplished by the following procedure:

  • Set /mavros/time/publish_sim_time to true
  • increasing the rate of SYSTEM_TIME being sent to mavros, e.g. by mavlink stream -u 14556 -s SYSTEM_TIME -r 100
  • Set /use_sim_time to true
  • Run rosbag play with --clock argument

Alternative: Don't invent a new parameter, but rely on /use_sim_time instead.

Copy link
Member

@vooon vooon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

I think in that case extra parameter is preferable as it gives you more flexibility for debugging.

@vooon vooon added this to the Version 1.10 milestone Sep 13, 2021
@vooon vooon merged commit 37b65a7 into mavlink:master Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants