Skip to content

Commit 7046850

Browse files
RBT22SteveMacenskithandalantonkesyCihatAltiparmak
authored
Nav2 Sync 3 2024 April 9 (#15)
* Fix ros-navigation#4001 (ros-navigation#4028) * Humble Sync 9: Jan 23, 2024 (ros-navigation#4064) * Update README.md: fix typo (ros-navigation#3842) * Update package.xml * fix typo (ros-navigation#3850) * adjust link to point to v3.8 of behavior tree docs (ros-navigation#3851) BT.CPP_v3 is used, thereby the correct docs should be linked * Fix bug in nav2_behavior_tree/bt_action_node (ros-navigation#3849) * Fix bug in nav2_behavior_tree/bt_action_node * Fixed the bug in halt function inside nav2_behavior_tree/plugin/action/bt_action_node.hpp * Added new case to nav2_behavior_tree/plugin/action/bt_action_node.hpp for testing the scenario to cancel * Refactored existing cases in nav2_behavior_tree/plugin/action/bt_action_node.hpp Signed-off-by: CihatAltiparmak <[email protected]> * Fix bug in nav2_behavior_tree/bt_action_node * Fixed the bug in halt function inside nav2_behavior_tree/plugin/action/bt_action_node.hpp * Added new case to nav2_behavior_tree/plugin/action/bt_action_node.hpp for testing the scenario to cancel * Refactored existing cases in nav2_behavior_tree/plugin/action/bt_action_node.hpp Signed-off-by: CihatAltiparmak <[email protected]> --------- Signed-off-by: CihatAltiparmak <[email protected]> * simplication of lattice_generator.py, fixes ros-navigation#3858 (ros-navigation#3859) * simplification of equation to compute the max_value/outer edge of the lattice based on number of headings. * Fix class doxygen * fix minor typos (ros-navigation#3892) Signed-off-by: Anton Kesy <[email protected]> * fix use after free (ros-navigation#3910) * fix build mppi (ros-navigation#3927) Signed-off-by: kevin <[email protected]> Co-authored-by: kevin <[email protected]> * Removing old TODOs * Fixed links for install and build in README (ros-navigation#3963) Currently the readme is linking to an invalida page in the docs (404 error). * fix a few outdated comments in smac planners (ros-navigation#3978) * Update README.md * bump to 1.1.13 for release --------- Signed-off-by: CihatAltiparmak <[email protected]> Signed-off-by: Anton Kesy <[email protected]> Signed-off-by: kevin <[email protected]> Co-authored-by: thandal <[email protected]> Co-authored-by: Anton Kesy <[email protected]> Co-authored-by: CihatAltiparmak <[email protected]> Co-authored-by: Anil Kumar Chavali <[email protected]> Co-authored-by: 정찬희 <[email protected]> Co-authored-by: kevin <[email protected]> Co-authored-by: Abiel Fernandez <[email protected]> Co-authored-by: Michael Ferguson <[email protected]> * Fixes for compiling with clang on macOS (ros-navigation#4051) amcl: declare void parameter for functions with no args amcl: remove unused variables behavior_tree: address clang compilation issues behaviors: add missing override specifier bt_navigator: add missing override specifier collision_monitor: address clang compilation issues constrained_smoother: address clang compilation issues controller: address clang compilation issues costmap_2d: add missing override specifier costmap_2d: address clang compilation issues costmap_2d: fix link issue for order_layer dwb_controller: fix clang compile issue, replace ulong with uint32_t map_server: replace std::experimental::filesystem map_server: remove dependency on stdc++fs waypoint_follower: address clang compilation issues waypoint_follower: remove dependency on stdc++fs waypoint_follower: replace std::experimental::filesystem smoother: address clang compilation issues smoother: remove unused variables system_tests: remove dependency on stdc++fs rotation_shim_controller: update percentage arg in setSpeedLimit to boolean planner: remove unused variables costmap_2d: address clang compilation issues mppi_controller: replace use of auto as function param with templates mppi_controller: address clang compilation issues costmap_2d: resolve clang issue with std::pair non-const copy Signed-off-by: Rhys Mainwaring <[email protected]> * critical fix for path tracking MPPI (ros-navigation#4099) (ros-navigation#4101) (cherry picked from commit 8f7b6ce) Co-authored-by: Steve Macenski <[email protected]> * backport graceful controller to humble (ros-navigation#4119) * Added cast to float to getClosestAngularBin return for behavior consistency (ros-navigation#4123) (ros-navigation#4125) * Added cast to float to getClosestAngularBin return for behavior consistency. Signed-off-by: Hunter Song <[email protected]> * Revised test name Signed-off-by: Hunter Song <[email protected]> --------- Signed-off-by: Hunter Song <[email protected]> (cherry picked from commit c59e0f3) Co-authored-by: hsong-MLE <[email protected]> * Fix goal handle was not freed correctly (ros-navigation#4137) (ros-navigation#4143) * Fix goal handle was not freed correctly * Update nav2_util/include/nav2_util/simple_action_server.hpp Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: Steve Macenski <[email protected]> Co-authored-by: Ziohang <[email protected]> Co-authored-by: Steve Macenski <[email protected]> (cherry picked from commit 2e491b1) Co-authored-by: iceuw <[email protected]> * bug fix (ros-navigation#4160) (ros-navigation#4162) Signed-off-by: Tianchu <[email protected]> (cherry picked from commit 623434b) Co-authored-by: Chortine <[email protected]> * Add uint suffix (ros-navigation#4213) (ros-navigation#4216) (cherry picked from commit 46ff0ec) Co-authored-by: Michael Wrock <[email protected]> * Fix merge conflict in nav2_mppi_controller README (humble) (ros-navigation#4239) Signed-off-by: Stephanie Eng <[email protected]> * Humble sync 10: April 4, 2024 (ros-navigation#4241) * change pointer free order in amcl to avoid use-after-free bug mentioned in ros-navigation#4068 (ros-navigation#4070) Signed-off-by: GoesM <[email protected]> Co-authored-by: GoesM <[email protected]> * Allow path end pose deviation revive (ros-navigation#4065) * Support stitching paths in compute path to poses * Update nav2_planner/src/planner_server.cpp Co-authored-by: Steve Macenski <[email protected]> * Rename parameter to allow_path_through_poses_goal_deviation * Fix description * restore nav2_params * missing whitespace * lint fix * removed parameter Signed-off-by: gg <[email protected]> * Update planner_server.hpp * Update planner_server.cpp --------- Signed-off-by: gg <[email protected]> Co-authored-by: pepisg <[email protected]> Co-authored-by: Pedro Alejandro González <[email protected]> Co-authored-by: Steve Macenski <[email protected]> * Change costmap_queue to shared library (ros-navigation#4072) Signed-off-by: cybaol <[email protected]> * free `map_sub_` before `map_free(map_)` to avoid UAF&&NullPtr bug mentioned in ros-navigation#4078 (ros-navigation#4079) * free `map_sub_` before `map_free(map_)` Signed-off-by: GoesM <[email protected]> * reformat Signed-off-by: GoesM <[email protected]> --------- Signed-off-by: GoesM <[email protected]> Co-authored-by: GoesM <[email protected]> * adding progress checker selector BT node (ros-navigation#4109) * New MPPI Cost Critic (Contrib: Brice Renaudeau) (ros-navigation#4090) * Share code Signed-off-by: Brice <[email protected]> * Update inflation_cost_critic.hpp - copyright - ifndef Signed-off-by: Brice <[email protected]> * fix lint cpp - extra space Signed-off-by: Brice <[email protected]> * Fix Smac Planner confined collision checker (ros-navigation#4055) * Update collision_checker.cpp Signed-off-by: Steve Macenski <[email protected]> * Fix tests Signed-off-by: Steve Macenski <[email protected]> * Update test_a_star.cpp Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: Brice <[email protected]> * Prevent analytic expansions from shortcutting Smac Planner feasible paths (ros-navigation#3962) * a potential solution to smac shortcutting * costmap reoslution * some fixes * completed prototype * some fixes for collision detection and performance * completing shortcutting fix * updating tests * adding readme --------- Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: Brice <[email protected]> * change pointer free order in amcl to avoid use-after-free bug mentioned in ros-navigation#4068 (ros-navigation#4070) Signed-off-by: GoesM <[email protected]> Co-authored-by: GoesM <[email protected]> Signed-off-by: Brice <[email protected]> * [Smac Planner] Massive Improvement of Behavior for SE2 Footprint Checking (ie non-circular robots) In Confined Settings (ros-navigation#4067) * prototype to test SE2 footprint H improvements * some fixes * fixed * invert logic * Working final prototype to be tested * complete unit test conversions * Update inflation_layer.hpp Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: Brice <[email protected]> * Adding new Smac paper to readme Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: Brice <[email protected]> * Update README.md Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: Brice <[email protected]> * [behavior_tree] don't repeat yourself in "blackboard->set" (ros-navigation#4074) * don't repeat yourself: templates in tests Signed-off-by: Davide Faconti <[email protected]> * misse change Signed-off-by: Davide Faconti <[email protected]> --------- Signed-off-by: Davide Faconti <[email protected]> Signed-off-by: Brice <[email protected]> * Allow path end pose deviation revive (ros-navigation#4065) * Support stitching paths in compute path to poses * Update nav2_planner/src/planner_server.cpp Co-authored-by: Steve Macenski <[email protected]> * Rename parameter to allow_path_through_poses_goal_deviation * Fix description * restore nav2_params * missing whitespace * lint fix * removed parameter Signed-off-by: gg <[email protected]> * Update planner_server.hpp * Update planner_server.cpp --------- Signed-off-by: gg <[email protected]> Co-authored-by: pepisg <[email protected]> Co-authored-by: Pedro Alejandro González <[email protected]> Co-authored-by: Steve Macenski <[email protected]> Signed-off-by: Brice <[email protected]> * Updated code to use getInflationLayer() method (ros-navigation#4076) * updated code to use getInflationLayer method Signed-off-by: Jose Faria <[email protected]> * Fix linting Signed-off-by: Jose Faria <[email protected]> --------- Signed-off-by: Jose Faria <[email protected]> Signed-off-by: Brice <[email protected]> * 1594 twist stamped publisher (ros-navigation#4077) * Add TwistStamped to controller_server via TwistPublisher util * Add a new util class for publishing either Twist or TwistStamped * Add a new parameter for selecting to stamp the twist data * Consume TwistPublisher in nav2_controller Signed-off-by: Ryan Friedman <[email protected]> * Fix small issues * Unused variable * Incorrect doxygen Signed-off-by: Ryan Friedman <[email protected]> * Remove stored node and assert Signed-off-by: Ryan Friedman <[email protected]> * Add tests for node * Facing timeout even though it does the same thing as velocity smoother test Signed-off-by: Ryan Friedman <[email protected]> * Add missing spin call to solve timeout Signed-off-by: Ryan Friedman <[email protected]> * Fix copyright (me instead of intel) Signed-off-by: Ryan Friedman <[email protected]> * Add full test coverage with subscriber Signed-off-by: Ryan Friedman <[email protected]> * Remove unused rclcpp fixture * Can't use it due to needing to join the pub thread after rclcpp shuts down Signed-off-by: Ryan Friedman <[email protected]> * Use TwistStamped in nav2_behaviors Signed-off-by: Ryan Friedman <[email protected]> * Use TwistStamped in collision monitor node Signed-off-by: Ryan Friedman <[email protected]> * Add TwistStamped readme updates to velocity smoother Signed-off-by: Ryan Friedman <[email protected]> * Add TwistSubscriber implementation Signed-off-by: Ryan Friedman <[email protected]> * Fix syntax errors Signed-off-by: Ryan Friedman <[email protected]> * Use TwistSubscriber in test_velocity_smoother Signed-off-by: Ryan Friedman <[email protected]> * Use TwistSubscriber in assisted_teleop Signed-off-by: Ryan Friedman <[email protected]> * Use TwistSubscriber in collision monitor node Signed-off-by: Ryan Friedman <[email protected]> * Use TwistSubscriber in velocity smoother Signed-off-by: Ryan Friedman <[email protected]> * Remove unused code Signed-off-by: Ryan Friedman <[email protected]> * add timestamp and frame_id to TwistStamped message * Add missing utility include Signed-off-by: Ryan Friedman <[email protected]> * Document TwistPublisher and TwistSubscriber usage Signed-off-by: Ryan Friedman <[email protected]> * Use pass-by-reference * Instead of std::move(std::unique_ptr<TwistStamped>) Signed-off-by: Ryan Friedman <[email protected]> * Finish twist subscriber tests Signed-off-by: Ryan Friedman <[email protected]> * Add other constructor and docs Signed-off-by: Ryan Friedman <[email protected]> * Fix linter issues Signed-off-by: Ryan Friedman <[email protected]> * Manually fix paren alignment Signed-off-by: Ryan Friedman <[email protected]> * Remove GSoC reference Signed-off-by: Ryan Friedman <[email protected]> * Document twist bool param in README Signed-off-by: Ryan Friedman <[email protected]> * Handle twistPublisher in collision monitor * Implement behavior in the stamped callback * Unstamped callback calls the stamped callback * Switch to unique pointer for publisher Signed-off-by: Ryan Friedman <[email protected]> * Convert to using TwistStamped interally * Use incoming twistStamped timestamp if available * Convert all internal representations to use TwistStamped Signed-off-by: Ryan Friedman <[email protected]> * Remove nav2_util usage instructions Signed-off-by: Ryan Friedman <[email protected]> * Remove unused Twist only subscriber Signed-off-by: Ryan Friedman <[email protected]> * More linter fixes Signed-off-by: Ryan Friedman <[email protected]> * Prefer working with unique_ptr for cmd_vel * This makes it easier to switch to std::move instead of dereference on publish Signed-off-by: Ryan Friedman <[email protected]> * Completing twist stamped migration * shared to unique ptr Signed-off-by: Steve Macenski <[email protected]> * twist add stamps and properly propogated * nav2_util: fix for compiling with clang - Resolve error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] Signed-off-by: Rhys Mainwaring <[email protected]> --------- Signed-off-by: Ryan Friedman <[email protected]> Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: Rhys Mainwaring <[email protected]> Co-authored-by: pedro-fuoco <[email protected]> Co-authored-by: Steve Macenski <[email protected]> Co-authored-by: Rhys Mainwaring <[email protected]> Signed-off-by: Brice <[email protected]> * Change costmap_queue to shared library (ros-navigation#4072) Signed-off-by: cybaol <[email protected]> Signed-off-by: Brice <[email protected]> * fix include of hpp Signed-off-by: Brice Renaudeau <[email protected]> * inflation cost optmiizations and cleanu * rename, add defaults, and docs * smoke test addition * lintg * normalize weight * update readme * increment cache * Update cost_critic.hpp Signed-off-by: Steve Macenski <[email protected]> * Update cost_critic.cpp Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: Brice <[email protected]> Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: GoesM <[email protected]> Signed-off-by: Davide Faconti <[email protected]> Signed-off-by: gg <[email protected]> Signed-off-by: Jose Faria <[email protected]> Signed-off-by: Ryan Friedman <[email protected]> Signed-off-by: Rhys Mainwaring <[email protected]> Signed-off-by: cybaol <[email protected]> Signed-off-by: Brice Renaudeau <[email protected]> Co-authored-by: BriceRenaudeau <[email protected]> Co-authored-by: GoesM <[email protected]> Co-authored-by: GoesM <[email protected]> Co-authored-by: Davide Faconti <[email protected]> Co-authored-by: Joshua Wallace <[email protected]> Co-authored-by: pepisg <[email protected]> Co-authored-by: Pedro Alejandro González <[email protected]> Co-authored-by: jncfa <[email protected]> Co-authored-by: Ryan <[email protected]> Co-authored-by: pedro-fuoco <[email protected]> Co-authored-by: Rhys Mainwaring <[email protected]> Co-authored-by: Kino <[email protected]> * Use ament_export_targets for all targets (ros-navigation#4112) * Matches new internal ALIAS targets * Use ALIAS targets for all internal linkage * Remove unnecessary calls to ament_target_dependencies in test code * Export includes in proper folders for overlays in colcon Signed-off-by: Ryan Friedman <[email protected]> * Update default recommendation from Obstacles to Cost critic in MPPI (ros-navigation#4170) Signed-off-by: Steve Macenski <[email protected]> * completely shutdown inital_pose_sub_ (ros-navigation#4176) Signed-off-by: GoesM <[email protected]> Co-authored-by: GoesM <[email protected]> * fix typos in description messages (ros-navigation#4188) Signed-off-by: Antonio Park <[email protected]> * AMCL: Set an initial guess by service call (ros-navigation#4182) * Added initial guess service. Signed-off-by: Alexander Mock Signed-off-by: Alexander Mock <[email protected]> * - Removed added empty line - Renamed initialGuessCallback to initialPoseReceivedSrv - Added new line to SetInitialPose service definition - Removed mutex from initialPoseReceived - Cleanup service server Signed-off-by: Alexander Mock <[email protected]> * added whitespace Signed-off-by: Alexander Mock <[email protected]> * renamed initial pose service in callback bind Signed-off-by: Alexander Mock <[email protected]> --------- Signed-off-by: Alexander Mock <[email protected]> * Move lines for pre-computation to outside a loop (ros-navigation#4191) Signed-off-by: Kyungsik Park <[email protected]> * Fix typo (ros-navigation#4196) * Fix BT.CPP import Signed-off-by: Tony Najjar <[email protected]> * Update README.md --------- Signed-off-by: Tony Najjar <[email protected]> * Update footprint iif changed (ros-navigation#4193) Signed-off-by: Brice <[email protected]> * bump humble to 1.1.14 for sync * fix merge conflict * custom version of cost critic's cost method --------- Signed-off-by: GoesM <[email protected]> Signed-off-by: gg <[email protected]> Signed-off-by: cybaol <[email protected]> Signed-off-by: Brice <[email protected]> Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: Davide Faconti <[email protected]> Signed-off-by: Jose Faria <[email protected]> Signed-off-by: Ryan Friedman <[email protected]> Signed-off-by: Rhys Mainwaring <[email protected]> Signed-off-by: Brice Renaudeau <[email protected]> Signed-off-by: Antonio Park <[email protected]> Signed-off-by: Alexander Mock <[email protected]> Signed-off-by: Kyungsik Park <[email protected]> Signed-off-by: Tony Najjar <[email protected]> Co-authored-by: GoesM <[email protected]> Co-authored-by: GoesM <[email protected]> Co-authored-by: Joshua Wallace <[email protected]> Co-authored-by: pepisg <[email protected]> Co-authored-by: Pedro Alejandro González <[email protected]> Co-authored-by: Kino <[email protected]> Co-authored-by: BriceRenaudeau <[email protected]> Co-authored-by: Davide Faconti <[email protected]> Co-authored-by: jncfa <[email protected]> Co-authored-by: Ryan <[email protected]> Co-authored-by: pedro-fuoco <[email protected]> Co-authored-by: Rhys Mainwaring <[email protected]> Co-authored-by: Antonio Park <[email protected]> Co-authored-by: Alexander Mock <[email protected]> Co-authored-by: Tony Najjar <[email protected]> * Fix graceful humble release version Signed-off-by: Steve Macenski <[email protected]> * Fix graceful_controller exceptions --------- Signed-off-by: CihatAltiparmak <[email protected]> Signed-off-by: Anton Kesy <[email protected]> Signed-off-by: kevin <[email protected]> Signed-off-by: Rhys Mainwaring <[email protected]> Signed-off-by: Stephanie Eng <[email protected]> Signed-off-by: GoesM <[email protected]> Signed-off-by: gg <[email protected]> Signed-off-by: cybaol <[email protected]> Signed-off-by: Brice <[email protected]> Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: Davide Faconti <[email protected]> Signed-off-by: Jose Faria <[email protected]> Signed-off-by: Ryan Friedman <[email protected]> Signed-off-by: Brice Renaudeau <[email protected]> Signed-off-by: Antonio Park <[email protected]> Signed-off-by: Alexander Mock <[email protected]> Signed-off-by: Kyungsik Park <[email protected]> Signed-off-by: Tony Najjar <[email protected]> Co-authored-by: Steve Macenski <[email protected]> Co-authored-by: thandal <[email protected]> Co-authored-by: Anton Kesy <[email protected]> Co-authored-by: CihatAltiparmak <[email protected]> Co-authored-by: Anil Kumar Chavali <[email protected]> Co-authored-by: 정찬희 <[email protected]> Co-authored-by: kevin <[email protected]> Co-authored-by: Abiel Fernandez <[email protected]> Co-authored-by: Michael Ferguson <[email protected]> Co-authored-by: Rhys Mainwaring <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: hsong-MLE <[email protected]> Co-authored-by: iceuw <[email protected]> Co-authored-by: Chortine <[email protected]> Co-authored-by: Michael Wrock <[email protected]> Co-authored-by: Stephanie Eng <[email protected]> Co-authored-by: GoesM <[email protected]> Co-authored-by: GoesM <[email protected]> Co-authored-by: Joshua Wallace <[email protected]> Co-authored-by: pepisg <[email protected]> Co-authored-by: Pedro Alejandro González <[email protected]> Co-authored-by: Kino <[email protected]> Co-authored-by: BriceRenaudeau <[email protected]> Co-authored-by: Davide Faconti <[email protected]> Co-authored-by: jncfa <[email protected]> Co-authored-by: Ryan <[email protected]> Co-authored-by: pedro-fuoco <[email protected]> Co-authored-by: Antonio Park <[email protected]> Co-authored-by: Alexander Mock <[email protected]> Co-authored-by: Tony Najjar <[email protected]>
1 parent b7953db commit 7046850

File tree

147 files changed

+4284
-337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+4284
-337
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
For detailed instructions on how to:
1010
- [Getting Started](https://navigation.ros.org/getting_started/index.html)
1111
- [Concepts](https://navigation.ros.org/concepts/index.html)
12-
- [Build](https://navigation.ros.org/build_instructions/index.html#build)
13-
- [Install](https://navigation.ros.org/build_instructions/index.html#install)
12+
- [Build](https://navigation.ros.org/development_guides/build_docs/index.html#build)
13+
- [Install](https://navigation.ros.org/development_guides/build_docs/index.html#install)
1414
- [General Tutorials](https://navigation.ros.org/tutorials/index.html) and [Algorithm Developer Tutorials](https://navigation.ros.org/plugin_tutorials/index.html)
1515
- [Configure](https://navigation.ros.org/configuration/index.html)
1616
- [Navigation Plugins](https://navigation.ros.org/plugins/index.html)
@@ -20,6 +20,8 @@ For detailed instructions on how to:
2020

2121
Please visit our [documentation site](https://navigation.ros.org/). [Please visit our community Slack here](https://join.slack.com/t/navigation2/shared_invite/zt-hu52lnnq-cKYjuhTY~sEMbZXL8p9tOw) (if this link does not work, please contact maintainers to reactivate).
2222

23+
If you need professional services related to Nav2, please contact Open Navigation at [email protected].
24+
2325
## Our Sponsors
2426

2527
Please thank our amazing sponsors for their generous support of Nav2 on behalf of the community to allow the project to continue to be professionally maintained, developed, and supported for the long-haul! [Open Navigation LLC](https://www.opennav.org/) provides project leadership, maintenance, development, and support services to the Nav2 & ROS community.

nav2_amcl/include/nav2_amcl/amcl_node.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "nav2_amcl/sensors/laser/laser.hpp"
3636
#include "nav2_msgs/msg/particle.hpp"
3737
#include "nav2_msgs/msg/particle_cloud.hpp"
38+
#include "nav2_msgs/srv/set_initial_pose.hpp"
3839
#include "nav_msgs/srv/set_map.hpp"
3940
#include "sensor_msgs/msg/laser_scan.hpp"
4041
#include "std_srvs/srv/empty.hpp"
@@ -210,6 +211,16 @@ class AmclNode : public nav2_util::LifecycleNode
210211
const std::shared_ptr<std_srvs::srv::Empty::Request> request,
211212
std::shared_ptr<std_srvs::srv::Empty::Response> response);
212213

214+
// service server for providing an initial pose guess
215+
rclcpp::Service<nav2_msgs::srv::SetInitialPose>::SharedPtr initial_guess_srv_;
216+
/*
217+
* @brief Service callback for an initial pose guess request
218+
*/
219+
void initialPoseReceivedSrv(
220+
const std::shared_ptr<rmw_request_id_t> request_header,
221+
const std::shared_ptr<nav2_msgs::srv::SetInitialPose::Request> request,
222+
std::shared_ptr<nav2_msgs::srv::SetInitialPose::Response> response);
223+
213224
// Let amcl update samples without requiring motion
214225
rclcpp::Service<std_srvs::srv::Empty>::SharedPtr nomotion_update_srv_;
215226
/*

nav2_amcl/include/nav2_amcl/pf/pf_vector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ typedef struct
4949

5050

5151
// Return a zero vector
52-
pf_vector_t pf_vector_zero();
52+
pf_vector_t pf_vector_zero(void);
5353

5454
// Check for NAN or INF in any component
5555
// int pf_vector_finite(pf_vector_t a);
@@ -71,7 +71,7 @@ pf_vector_t pf_vector_coord_add(pf_vector_t a, pf_vector_t b);
7171

7272

7373
// Return a zero matrix
74-
pf_matrix_t pf_matrix_zero();
74+
pf_matrix_t pf_matrix_zero(void);
7575

7676
// Check for NAN or INF in any component
7777
// int pf_matrix_finite(pf_matrix_t a);

nav2_amcl/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>nav2_amcl</name>
5-
<version>1.1.12</version>
5+
<version>1.1.14</version>
66
<description>
77
<p>
88
amcl is a probabilistic localization system for a robot moving in

nav2_amcl/src/amcl_node.cpp

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,13 +325,17 @@ AmclNode::on_cleanup(const rclcpp_lifecycle::State & /*state*/)
325325
// Get rid of the inputs first (services and message filter input), so we
326326
// don't continue to process incoming messages
327327
global_loc_srv_.reset();
328+
initial_guess_srv_.reset();
328329
nomotion_update_srv_.reset();
330+
executor_thread_.reset(); // to make sure initial_pose_sub_ completely exit
329331
initial_pose_sub_.reset();
330332
laser_scan_connection_.disconnect();
333+
tf_listener_.reset(); // listener may access lase_scan_filter_, so it should be reset earlier
331334
laser_scan_filter_.reset();
332335
laser_scan_sub_.reset();
333336

334337
// Map
338+
map_sub_.reset(); // map_sub_ may access map_, so it should be reset earlier
335339
if (map_ != NULL) {
336340
map_free(map_);
337341
map_ = nullptr;
@@ -341,7 +345,6 @@ AmclNode::on_cleanup(const rclcpp_lifecycle::State & /*state*/)
341345

342346
// Transforms
343347
tf_broadcaster_.reset();
344-
tf_listener_.reset();
345348
tf_buffer_.reset();
346349

347350
// PubSub
@@ -493,6 +496,15 @@ AmclNode::globalLocalizationCallback(
493496
pf_init_ = false;
494497
}
495498

499+
void
500+
AmclNode::initialPoseReceivedSrv(
501+
const std::shared_ptr<rmw_request_id_t>/*request_header*/,
502+
const std::shared_ptr<nav2_msgs::srv::SetInitialPose::Request> req,
503+
std::shared_ptr<nav2_msgs::srv::SetInitialPose::Response>/*res*/)
504+
{
505+
initialPoseReceived(std::make_shared<geometry_msgs::msg::PoseWithCovarianceStamped>(req->pose));
506+
}
507+
496508
// force nomotion updates (amcl updating without requiring motion)
497509
void
498510
AmclNode::nomotionUpdateCallback(
@@ -1093,20 +1105,20 @@ AmclNode::initParameters()
10931105
// Semantic checks
10941106
if (laser_likelihood_max_dist_ < 0) {
10951107
RCLCPP_WARN(
1096-
get_logger(), "You've set laser_likelihood_max_dist to be negtive,"
1108+
get_logger(), "You've set laser_likelihood_max_dist to be negative,"
10971109
" this isn't allowed so it will be set to default value 2.0.");
10981110
laser_likelihood_max_dist_ = 2.0;
10991111
}
11001112
if (max_particles_ < 0) {
11011113
RCLCPP_WARN(
1102-
get_logger(), "You've set max_particles to be negtive,"
1114+
get_logger(), "You've set max_particles to be negative,"
11031115
" this isn't allowed so it will be set to default value 2000.");
11041116
max_particles_ = 2000;
11051117
}
11061118

11071119
if (min_particles_ < 0) {
11081120
RCLCPP_WARN(
1109-
get_logger(), "You've set min_particles to be negtive,"
1121+
get_logger(), "You've set min_particles to be negative,"
11101122
" this isn't allowed so it will be set to default value 500.");
11111123
min_particles_ = 500;
11121124
}
@@ -1120,7 +1132,7 @@ AmclNode::initParameters()
11201132

11211133
if (resample_interval_ <= 0) {
11221134
RCLCPP_WARN(
1123-
get_logger(), "You've set resample_interval to be zero or negtive,"
1135+
get_logger(), "You've set resample_interval to be zero or negative,"
11241136
" this isn't allowed so it will be set to default value to 1.");
11251137
resample_interval_ = 1;
11261138
}
@@ -1533,6 +1545,10 @@ AmclNode::initServices()
15331545
"reinitialize_global_localization",
15341546
std::bind(&AmclNode::globalLocalizationCallback, this, _1, _2, _3));
15351547

1548+
initial_guess_srv_ = create_service<nav2_msgs::srv::SetInitialPose>(
1549+
"set_initial_pose",
1550+
std::bind(&AmclNode::initialPoseReceivedSrv, this, _1, _2, _3));
1551+
15361552
nomotion_update_srv_ = create_service<std_srvs::srv::Empty>(
15371553
"request_nomotion_update",
15381554
std::bind(&AmclNode::nomotionUpdateCallback, this, _1, _2, _3));

nav2_amcl/src/pf/pf.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ void pf_cluster_stats(pf_t * pf, pf_sample_set_t * set)
463463

464464
// Workspace
465465
double m[4], c[2][2];
466-
size_t count;
467466
double weight;
468467

469468
// Cluster the samples
@@ -474,7 +473,6 @@ void pf_cluster_stats(pf_t * pf, pf_sample_set_t * set)
474473

475474
for (i = 0; i < set->cluster_max_count; i++) {
476475
cluster = set->clusters + i;
477-
cluster->count = 0;
478476
cluster->weight = 0;
479477
cluster->mean = pf_vector_zero();
480478
cluster->cov = pf_matrix_zero();
@@ -490,7 +488,6 @@ void pf_cluster_stats(pf_t * pf, pf_sample_set_t * set)
490488
}
491489

492490
// Initialize overall filter stats
493-
count = 0;
494491
weight = 0.0;
495492
set->mean = pf_vector_zero();
496493
set->cov = pf_matrix_zero();
@@ -521,10 +518,8 @@ void pf_cluster_stats(pf_t * pf, pf_sample_set_t * set)
521518

522519
cluster = set->clusters + cidx;
523520

524-
cluster->count += 1;
525521
cluster->weight += sample->weight;
526522

527-
count += 1;
528523
weight += sample->weight;
529524

530525
// Compute mean

nav2_amcl/src/pf/pf_vector.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636

3737
// Return a zero vector
38-
pf_vector_t pf_vector_zero()
38+
pf_vector_t pf_vector_zero(void)
3939
{
4040
pf_vector_t c;
4141

@@ -130,7 +130,7 @@ pf_vector_t pf_vector_coord_add(pf_vector_t a, pf_vector_t b)
130130

131131

132132
// Return a zero matrix
133-
pf_matrix_t pf_matrix_zero()
133+
pf_matrix_t pf_matrix_zero(void)
134134
{
135135
int i, j;
136136
pf_matrix_t c;

nav2_amcl/src/sensors/laser/likelihood_field_model.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,17 @@ LikelihoodFieldModel::sensorFunction(LaserData * data, pf_sample_set_t * set)
5353

5454
self = reinterpret_cast<LikelihoodFieldModel *>(data->laser);
5555

56+
// Pre-compute a couple of things
57+
double z_hit_denom = 2 * self->sigma_hit_ * self->sigma_hit_;
58+
double z_rand_mult = 1.0 / data->range_max;
59+
60+
step = (data->range_count - 1) / (self->max_beams_ - 1);
61+
62+
// Step size must be at least 1
63+
if (step < 1) {
64+
step = 1;
65+
}
66+
5667
total_weight = 0.0;
5768

5869
// Compute the sample weights
@@ -65,17 +76,6 @@ LikelihoodFieldModel::sensorFunction(LaserData * data, pf_sample_set_t * set)
6576

6677
p = 1.0;
6778

68-
// Pre-compute a couple of things
69-
double z_hit_denom = 2 * self->sigma_hit_ * self->sigma_hit_;
70-
double z_rand_mult = 1.0 / data->range_max;
71-
72-
step = (data->range_count - 1) / (self->max_beams_ - 1);
73-
74-
// Step size must be at least 1
75-
if (step < 1) {
76-
step = 1;
77-
}
78-
7979
for (i = 0; i < data->range_count; i += step) {
8080
obs_range = data->ranges[i][0];
8181
obs_bearing = data->ranges[i][1];

nav2_behavior_tree/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ list(APPEND plugin_libs nav2_smoother_selector_bt_node)
204204
add_library(nav2_goal_checker_selector_bt_node SHARED plugins/action/goal_checker_selector_node.cpp)
205205
list(APPEND plugin_libs nav2_goal_checker_selector_bt_node)
206206

207+
add_library(nav2_progress_checker_selector_bt_node SHARED plugins/action/progress_checker_selector_node.cpp)
208+
list(APPEND plugin_libs nav2_progress_checker_selector_bt_node)
209+
207210
add_library(nav2_goal_updated_controller_bt_node SHARED plugins/decorator/goal_updated_controller.cpp)
208211
list(APPEND plugin_libs nav2_goal_updated_controller_bt_node)
209212

nav2_behavior_tree/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ The BehaviorTree engine has a run method that accepts an XML description of a BT
6363
6464
See the code in the [BT Navigator](../nav2_bt_navigator/src/bt_navigator.cpp) for an example usage of the BehaviorTreeEngine.
6565
66-
For more information about the behavior tree nodes that are available in the default BehaviorTreeCPP library, see documentation here: https://www.behaviortree.dev/docs/learn-the-basics/bt_basics/
66+
For more information about the behavior tree nodes that are available in the default BehaviorTreeCPP library, see documentation here: https://www.behaviortree.dev/docs/3.8/learn-the-basics/BT_basics

0 commit comments

Comments
 (0)