ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ros2run help parameters

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

Sriram gravatar image

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

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 -0500

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 image Sriram  ( 2018-09-06 10:57:24 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 349 times

Last updated: Sep 04 '18