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

Set time/publish_sim_time to false by default #1672

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

okalachev
Copy link
Contributor

@okalachev okalachev commented Dec 9, 2021

Problem: parameter time/publish_sim_time = true pretty much breaks the simulation.

As I understand using getParam without checking the return value keeps publish_sim_time variable random. So param with the default value must be used here.

@vooon vooon added this to the Version 1.13 milestone Dec 10, 2021
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!

@@ -217,7 +217,7 @@ class SystemTimePlugin : public plugin::PluginBase {
m_uas->set_timesync_mode(ts_mode);
ROS_INFO_STREAM_NAMED("time", "TM: Timesync mode: " << utils::to_string(ts_mode));

nh.getParam("time/publish_sim_time", publish_sim_time);
nh.param("time/publish_sim_time", publish_sim_time, false);
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, it should be initialized in class too. Will do.

@vooon vooon merged commit c9c9927 into mavlink:master Dec 10, 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