Ask Your Question

ROS2 Run __params not affecting node

asked 2019-10-09 14:33:13 -0600

updated 2019-10-09 14:53:36 -0600


I'm running on D and E, neither can I get my read in parameter file to affect the node, ei

ros2 run slam_toolbox localization_slam_toolbox_node __params:=install/slam_toolbox/share/config/mapper_params_localization.yaml

and a more simple example:

ros2 run demo_nodes_cpp parameter_blackboard __params:=install/slam_toolbox/share/config/mapper_params_localization.yaml

For the blackboard example I directly copied the example from the tutorials page into that config file:

        some_int: 42
        a_string: "Hello world"
            some_integers: [1, 2, 3, 4]
            some_doubles : [3.14, 2.718]

and for the slam_toolbox example, a simple minimum look at a single parameter:

    solver_plugin: blahblah::FakePluginFailToLoadPlz

When I run the blackboard demo, it crashes if I give it a bad file path, but my node doesnt, but still fails to have anything from it included.

Any thoughts? It seems like none of the ROS2 nodes I have will accept any comandline params, but when I do


on the blackboard, that will take fine. My other node again produces no errors even if this namespace is invalid and just doesn't take.

I am declaring my parameters:

  std::string solver_plugin = std::string("solver_plugins::CeresSolver");
  solver_plugin = this->declare_parameter("solver_plugin", solver_plugin);


I'm seeing though the 1 random param in blackboard (use_sim_time, with all nodes) will work if I set it in the file, but not reading the others in the file at all.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-10-09 15:03:50 -0600

Huh, after a full day on this, I cleaned up paths and tried again and started working. Can't really explain why, maybe something got cached in an odd state. Closing

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-10-09 14:33:13 -0600

Seen: 274 times

Last updated: Oct 09 '19