You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
use_sim_time error message is logged from multiple nodes #746
Set the use_sim_time parameter for the talker to something other than a bool:
ros2 param set talker use_sim_time foo
Expected behavior
We see an error (or warning) logged from the talker node regarding the type mismatch for the use_sim_time parameter. E.g.
[ERROR] [talker]: use_sim_time parameter set to something besides a bool
Actual behavior
We see the above error message, not only for the talker node, but also for the listener node. I.e. both the talker and the listener log the following error message:
[ERROR] [talker]: use_sim_time parameter set to something besides a bool
Additional information
We can see that the parameter is set on the talker node, but not on the listener node, which is correct. The bug is that we see the listener log an error when it is not expected.
So, it looks like rclcpp::TimeSource is listening to changes to use_sim_time system wide (see here). Judging by #609, this subscription serves no specific purpose and could/should be replaced by an on_set_parameters callback. Is that right @wjwwood ? If so, I'll do so.
So, it looks like rclcpp::TimeSource is listening to changes to use_sim_time system wide (see here). Judging by #609, this subscription serves no specific purpose and could/should be replaced by an on_set_parameters callback. Is that right @wjwwood ? If so, I'll do so.
on_set_parameter is for rejecting/accepting a parameter.
It shouldn't be used for updating a "global" state.
See discussion here #772 (comment). #609 is asking for a local "on_parameter_change" callback, but we currently don't have that feature.
At the moment, using on_parameter_event is the only correct way of doing this.
The fully qualified node name is part of the Parameter Eventmessage.
It should be used for filter nodes out.
Activity
hidmic commentedon Jul 26, 2019
So, it looks like
rclcpp::TimeSourceis listening to changes touse_sim_timesystem wide (see here). Judging by #609, this subscription serves no specific purpose and could/should be replaced by anon_set_parameterscallback. Is that right @wjwwood ? If so, I'll do so.ivanpauno commentedon Jul 26, 2019
on_set_parameteris for rejecting/accepting a parameter.It shouldn't be used for updating a "global" state.
See discussion here #772 (comment).
#609 is asking for a local "on_parameter_change" callback, but we currently don't have that feature.
At the moment, using
on_parameter_eventis the only correct way of doing this.The fully qualified node name is part of the
Parameter Eventmessage.It should be used for filter nodes out.
hidmic commentedon Jul 26, 2019
Fair enough.
Yes, I can work with that. Just checking if there's a better way to do so.
hidmic commentedon Jul 29, 2019
@jacobperron #799 should've addressed your issue.
jacobperron commentedon Jul 29, 2019
Works for me 👍
Fix rcl package's logging API error specs and handling. (ros2#746)