Accept incoming routes - #81
Merged
Merged
Conversation
Signed-off-by: Francisco Martín Rico <fmrico@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends easynav_routes_maps_manager to support updating routes at runtime via an incoming_routes ROS topic (in addition to loading routes from parameters/YAML), enabling integration with an external navigation manager that publishes routes dynamically. It also embeds the required ROS interface definitions directly in this package and factors route YAML parsing and message conversion into reusable helpers.
Changes:
- Add
incoming_routessubscription to replace the in-memory routes map on receipt of aRoutesMapmessage. - Introduce
RouteSegment/RoutesMapROS messages and refactor route YAML parsing + msg conversions intoroute_io.*. - Update build/test targets to accommodate ROSIDL-generated targets and the renamed library target.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| maps_managers/easynav_routes_maps_manager/src/easynav_routes_maps_manager/RoutesMapsManager.cpp | Adds incoming_routes subscriber and refactors YAML loading to route_io. |
| maps_managers/easynav_routes_maps_manager/include/easynav_routes_maps_manager/RoutesMapsManager.hpp | Switches route types to a dedicated header and adds subscription member for incoming routes. |
| maps_managers/easynav_routes_maps_manager/include/easynav_routes_maps_manager/routes_map.hpp | New lightweight header for RouteSegment/RoutesMap in-memory types. |
| maps_managers/easynav_routes_maps_manager/include/easynav_routes_maps_manager/route_io.hpp | Declares YAML loader and RoutesMap ↔ message conversion helpers. |
| maps_managers/easynav_routes_maps_manager/src/easynav_routes_maps_manager/route_io.cpp | Implements YAML parsing fallback logic and msg conversion helpers. |
| maps_managers/easynav_routes_maps_manager/msg/RouteSegment.msg | New ROS message for a route segment (wire format). |
| maps_managers/easynav_routes_maps_manager/msg/RoutesMap.msg | New ROS message for the full set of routes (wire format). |
| maps_managers/easynav_routes_maps_manager/CMakeLists.txt | Adds rosidl generation and renames library target to avoid target-name collision. |
| maps_managers/easynav_routes_maps_manager/package.xml | Adds rosidl generator/runtime dependencies and interface package group membership. |
| maps_managers/easynav_routes_maps_manager/tests/routes_mapsmanager_tests.cpp | Adds a unit test validating that incoming_routes updates internal routes and NavState. |
| maps_managers/easynav_routes_maps_manager/tests/CMakeLists.txt | Updates tests to link against the renamed library target. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+194
to
+201
| incoming_routes_sub_ = node->create_subscription<easynav_routes_maps_manager::msg::RoutesMap>( | ||
| node->get_fully_qualified_name() + std::string("/") + plugin_name + "/incoming_routes", | ||
| rclcpp::QoS(1).transient_local().reliable(), | ||
| [this](easynav_routes_maps_manager::msg::RoutesMap::UniquePtr msg) { | ||
| routes_ = from_msg(*msg); | ||
| publish_routes_markers(); | ||
| publish_interactive_markers(); | ||
| }); |
Comment on lines
+1
to
+3
| # A single directed segment between two poses -- the wire form of | ||
| # easynav::RouteSegment (see RoutesMapsManager.hpp), minus its | ||
| # UI-editor-only `edit_mode` field. |
Signed-off-by: Francisco Martín Rico <fmrico@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
Routes were read only from parameters. This PR adds the option to recive them by the
incoming_routestopic, which is very convinient if there is a navigation manager managing them.I have created ROS interfaces inside the package, because it was excessive for me having a separate package only for a this, so linked to this plugin.
I hope you find it useful