-
Notifications
You must be signed in to change notification settings - Fork 993
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
Bugfix/update map origin with home position #1892
Bugfix/update map origin with home position #1892
Conversation
@@ -89,7 +90,7 @@ class GlobalPositionPlugin : public plugin::PluginBase { | |||
|
|||
// home position subscriber to set "map" origin | |||
// TODO use UAS | |||
hp_sub = gp_nh.subscribe("home", 10, &GlobalPositionPlugin::home_position_cb, this); | |||
hp_sub = nh.subscribe("/mavros/home_position/home", 10, &GlobalPositionPlugin::home_position_cb, 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.
No! Node mustn't use absolute paths.
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.
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.
NodeHandle priv_nh("~");
sub = priv_nh.subscribe("home_position/home", ...);
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.
Or even:
NodeHandle hp_nh("~home_position");
sub = hp_nh.subscribe("home", ...);
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.
Changed
// GPS_STATUS: there no corresponding ROS message, and it is not supported by APM | ||
make_handler(&GlobalPositionPlugin::handle_global_position_int), | ||
make_handler(&GlobalPositionPlugin::handle_gps_global_origin), | ||
make_handler(&GlobalPositionPlugin::handle_lpned_system_global_offset) |
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.
Do not change style.
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. Style was changed by uncrustify
This reverts commit f1387c7.
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!
* master: 1.17.0 update changelog cog: regenerate all Bugfix/update map origin with home position (#1892) mavros: Remove extra ';' mavros_extras: Fix some init order warnings Suppress warnings from included headers 1.16.0 update changelog made it such that the gp_origin topic published latched. use hpp instead of deprecated .h pluginlib headers
Updates the
map_origin
in the callbackhome_position_cb
after new home has been updated from the FMU over the mavtlink message HOME_POSITION and in the ros topic/mavros/home_position/home