0
$\begingroup$

Rosanswers logo

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?


Originally posted by aarushg on ROS Answers with karma: 65 on 2018-06-19

Post score: 3

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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/master/rcl_yaml_param_parser/README.md


Originally posted by dhood with karma: 621 on 2018-06-19

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by aarushg on 2018-06-19:
yes, thank you. I wasn't aware of this yaml syntax it works now.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.