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

Initialize parameters via yaml in ros2

asked 2018-06-19 18:44:02 -0500

aarushg gravatar image

updated 2018-06-19 18:55:26 -0500

jayess gravatar image

According to this PR, we can now initialize parameters via yaml file. I edited the talker example to have the parameter client so I can see the changes in parameters, but when I try to load the parameters via this line as given in the PR comments

ros2 run demo_nodes_cpp talker_with_params __params:=install/share/demo_nodes_cpp/talker_params.yaml

I get this error

terminate called after throwing an instance of 'std::runtime_error' 
what(): Failed to parse parameters install/share/demo_nodes_cpp/talker_params.yaml

anything I'm doing wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-06-19 18:48:30 -0500

dhood gravatar image

Likely the syntax of the yaml file is not correct. Can you post its contents? It should have syntax as described here: https://github.com/ros2/rcl/blob/mast...

edit flag offensive delete link more

Comments

1

yes, thank you. I wasn't aware of this yaml syntax it works now.

aarushg gravatar image aarushg  ( 2018-06-19 19:13:29 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-06-19 18:44:02 -0500

Seen: 4,100 times

Last updated: Jun 19 '18