ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

ros2run help parameters

asked 2018-09-03 11:31:55 -0600

Sriram gravatar image

updated 2018-09-04 01:09:46 -0600


I was checking the ros2 run examples to launch a node. like mentioned here

How does the node, which is being launched with the above command use the parameters? i.e accessing the loaded parameters for the first time without registering the on_event_callback.

For ex: I've

ros2 run demo_nodes_cpp talker __params:=test.yaml

How do I access the parameters from test.yaml within talker node? (This is just an example I'm quoting not the use case though).

Thanks Sriram

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-04 09:40:01 -0600

Dirk Thomas gravatar image

A node has an API to query parameters which you can e.g. invoke locally within the node to list / get parameters:

edit flag offensive delete link more


Thanks Dirk. I missed looking into the latest rclcpp/node.cpp.

Sriram gravatar image Sriram  ( 2018-09-06 10:57:24 -0600 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2018-09-03 11:31:55 -0600

Seen: 304 times

Last updated: Sep 04 '18