-
Notifications
You must be signed in to change notification settings - Fork 62
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
Publish binary time data when use_sim_time
parameter is true
#114
Conversation
dd182e1
to
b9f1dea
Compare
use_sim_time
parameter is true
@@ -116,14 +115,22 @@ class FoxgloveBridge : public rclcpp::Node { | |||
const auto useTLS = this->get_parameter("tls").as_bool(); | |||
const auto certfile = this->get_parameter("certfile").as_string(); | |||
const auto keyfile = this->get_parameter("keyfile").as_string(); | |||
_useSimTime = this->get_parameter("use_sim_time").as_bool(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ROS 1 we retrieve /use_sim_time
. I'm not familiar enough with ROS 2 params to know if this is correct or if we should be using the /
prefix here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ROS 2 the use_sim_time
is not global anymore but every node declares that paramter (automatically). From what I read, the main challenge is setting this parameter for all nodes when e.g. launching multiple nodes in a launch file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I read, the main challenge is setting this parameter for all nodes when e.g. launching multiple nodes in a launch file
I happened to see this comment by mistake and want to share a tip; You can set the use_sim_time for all your Nodes inside a GroupAction
in this way:
from launch.actions import GroupAction
from launch_ros.actions import SetParameter
GroupAction(
actions=[
SetParameter("use_sim_time", True),
Node(...),
Node(...)
]
)
Public-Facing Changes
use_sim_time
istrue
Description
Depends on foxglove/ws-protocol#299
When the
use_sim_time
parameter is settime
capability/clock
topic and broadcasts binary time messagesI have removed the code that detects presence of the
/clock
topic, since now it has to be known at startup whetheruse_sim_time
is true or falseIncludes Make server capabilities configurable #115 (will rebase after it got merged)