Skip to content
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

Param dump on slam node not working if stack_size_to_use is not specified #755

Open
MarcoMagriDev opened this issue Feb 20, 2025 · 0 comments

Comments

@MarcoMagriDev
Copy link

Required Info:

  • Operating System:
    • Ubuntu 24.04
  • Installation type:
    • Both
  • ROS Version
    • ROS2 Jazzy
  • Version or commit hash:
    • Tag 2.8.2
  • Laser unit:
    • Simulated

Steps to reproduce issue

ros2 launch slam_toolbox online_async_launch.py slam_params_file:=./my_params.yaml 

where my_params.yaml does not contain a specific value for stack_size_to_use

ros2 param dump /slam_node

Expected behavior

The dump output should contain parameters

Actual behavior

/slam_toolbox:
  ros__parameters: {}

Additional information

After investigating, I suspect the issue is related to how parameters with unspecified values are handled. Specifically, in the code, here:

"stack_size_to_use", rclcpp::ParameterType::PARAMETER_INTEGER, descriptor);

It seems that the /slam_node/get_parameters service returns an empty list when requesting a parameter with an unspecified value.
I'm not sure if this is a ROS-level issue or specific to this package, but the issue might stem from the handling of the stack_size parameter.
The value for stack_size, defined here, will never be used unless you modify this line as follows:

this->declare_parameter(
-      "stack_size_to_use", rclcpp::ParameterType::PARAMETER_INTEGER, descriptor);
+      "stack_size_to_use", stack_size, descriptor);

This would ensure the stack_size value is used properly.


If you’d like, I can submit a pull request to fix this. Let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant