-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
Required Info:
- ROS2 Version:
- jazzy
- Version or commit hash:
- main
Steps to reproduce issue
using SmacPlannerLattice change smooth_path parameter dynamically (i tried from false to true). Probably reproduces for SmacPlannerHybrid as well.
Expected behavior
No crash
Actual behavior
Crash:
[planner_server-3] terminate called after throwing an instance of 'rclcpp::exceptions::ParameterModifiedInCallbackException'
[planner_server-3] what(): cannot set or declare a parameter, or change the callback from within set callback
[planner_server-3] Stack trace (most recent call last):
[planner_server-3] #26 Object "/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2", at 0xffffffffffffffff, in
[planner_server-3] #25 Object "/home/angsa/underlay_ws/build/nav2_planner/planner_server", at 0x65116d546a14, in _start
[planner_server-3] #24 Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x77876b73e28a, in __libc_start_main
[planner_server-3] #23 Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x77876b73e1c9, in
[planner_server-3] #22 Object "/home/angsa/underlay_ws/build/nav2_planner/planner_server", at 0x65116d5468bd, in main
[planner_server-3] #21 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bd26258, in rclcpp::spin(std::shared_ptr<rclcpp::node_interfaces::NodeBaseInterface>)
[planner_server-3] #20 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bd2df33, in rclcpp::executors::SingleThreadedExecutor::spin()
[planner_server-3] #19 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bd1c079, in rclcpp::Executor::execute_any_executable(rclcpp::AnyExecutable&)
[planner_server-3] #18 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bd17db3, in rclcpp::Executor::execute_service(std::shared_ptr<rclcpp::ServiceBase>)
[planner_server-3] #17 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bdf1f09, in
[planner_server-3] #16 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bdaf774, in
[planner_server-3] #15 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bda1cb7, in
[planner_server-3] #14 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bdf26d8, in
[planner_server-3] #13 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bd613fe, in rclcpp::node_interfaces::NodeParameters::set_parameters_atomically(std::vector<rclcpp::Parameter, std::allocator<rclcpp::Parameter> > const&)
[planner_server-3] #12 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bd5efb3, in
[planner_server-3] #11 Object "/home/angsa/underlay_ws/install/nav2_smac_planner/lib/libnav2_smac_planner_lattice.so", at 0x7787399b0461, in std::_Function_handler<rcl_interfaces::msg::SetParametersResult_<std::allocator<void> > (std::vector<rclcpp::Parameter, std::allocator<rclcpp::Parameter> > const&), std::_Bind<rcl_interfaces::msg::SetParametersResult_<std::allocator<void> > (nav2_smac_planner::SmacPlannerLattice::*(nav2_smac_planner::SmacPlannerLattice*, std::_Placeholder<1>))(std::vector<rclcpp::Parameter, std::allocator<rclcpp::Parameter> >)> >::_M_invoke(std::_Any_data const&, std::vector<rclcpp::Parameter, std::allocator<rclcpp::Parameter> > const&)
[planner_server-3] #10 Object "/home/angsa/underlay_ws/install/nav2_smac_planner/lib/libnav2_smac_planner_lattice.so", at 0x778739970a41, in nav2_smac_planner::SmacPlannerLattice::dynamicParametersCallback(std::vector<rclcpp::Parameter, std::allocator<rclcpp::Parameter> >)
[planner_server-3] #9 Object "/home/angsa/underlay_ws/install/nav2_smac_planner/lib/libnav2_smac_planner_lattice.so", at 0x778739994165, in nav2_smac_planner::SmootherParams::get(std::shared_ptr<nav2::LifecycleNode>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
[planner_server-3] #8 Object "/home/angsa/underlay_ws/install/nav2_smac_planner/lib/libnav2_smac_planner_lattice.so", at 0x778739990374, in void nav2::declare_parameter_if_not_declared<std::shared_ptr<nav2::LifecycleNode> >(std::shared_ptr<nav2::LifecycleNode>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::ParameterValue const&, rcl_interfaces::msg::ParameterDescriptor_<std::allocator<void> > const&)
[planner_server-3] #7 Object "/opt/ros/jazzy/lib/librclcpp.so", at 0x77876bce5295, in
[planner_server-3] #6 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33", at 0x77876ba11390, in __cxa_throw
[planner_server-3] #5 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33", at 0x77876b9fba54, in std::terminate()
[planner_server-3] #4 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33", at 0x77876ba110d9, in
[planner_server-3] #3 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.33", at 0x77876b9fbff4, in
[planner_server-3] #2 Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x77876b73c8fe, in abort
[planner_server-3] #1 Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x77876b75927d, in raise
[planner_server-3] #0 Object "/usr/lib/x86_64-linux-gnu/libc.so.6", at 0x77876b7b2b2c, in pthread_kill
[planner_server-3] Aborted (Signal sent by tkill() 1033830 1000)
[ERROR] [planner_server-3]: process has died [pid 1033830, exit code -6, cmd '/home/angsa/underlay_ws/install/nav2_planner/lib/nav2_planner/planner_server --ros-args -r __node:=planner_server --params-file /home/angsa/overlay_ws/src/angsa-robot/angsa_bringup/config/base/nav2.yaml --params-file /home/angsa/overlay_ws/install/angsa_navigation_playground/share/angsa_navigation_playground/config/nav2_overrides.yaml -r /map:=/playground_map'].
Reproduction instructions
Additional information
From the error message [planner_server-3] what(): cannot set or declare a parameter, or change the callback from within set callback, I'm pretty sure it's because params.get(node, _name); calls
declare_parameter_if_not_declared
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working