-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add support for EVENT messages #1922
Conversation
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.
Overall looks good, just a few things.
mavros/src/plugins/sys_status.cpp
Outdated
evt_msg.header.stamp = node->now(); | ||
evt_msg.severity = severity; | ||
evt_msg.px4_id = px4_id; | ||
evt_msg.event_time_boot_ms = eventm.event_time_boot_ms; |
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.
Usually time boot used to calculate header's time stamp.
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.
Done in new commit
mavros/src/plugins/sys_status.cpp
Outdated
@@ -1010,10 +1010,10 @@ class SystemStatusPlugin : public plugin::Plugin | |||
process_event_normal(severity, px4_id, eventm.arguments); | |||
|
|||
auto evt_msg = mavros_msgs::msg::StatusEvent(); | |||
evt_msg.header.stamp = node->now(); | |||
evt_msg.header.stamp.sec = event_time_boot_ms / 1000; | |||
evt_msg.header.stamp.nanosec = (event_time_boot_ms % 1000) * 1000000; |
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.
mavros/mavros/include/mavros/mavros_uas.hpp
Line 409 in ca50f1a
rclcpp::Time synchronise_stamp(uint32_t time_boot_ms); |
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.
oh that's nice, added a commit for this
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.
LGTM, Thanks!
Perfect, thank you! |
Hello all, working with PX4 we are starting to use EVENT instead of STATUS_TEXT for more details over the status of the autopilot. For this we needed to have the EVENT messages bridged to ROS2. This is my implementation, taking input from other people to have it merged in upstream mavros