Ask Your Question
0

ros2run help parameters

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

Sriram gravatar image

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

Hi,

I was checking the ros2 run examples to launch a node. like mentioned here https://github.com/ros2/ros2/wiki/Nod...

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
0

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: http://docs.ros2.org/bouncy/api/rclcp...

edit flag offensive delete link more

Comments

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

Sriram gravatar imageSriram ( 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

Stats

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

Seen: 178 times

Last updated: Sep 04 '18