ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You could load a yaml-file with parameters in your launch file: rosparam load
2 | No.2 Revision |
You could load a yaml-file with parameters in your launch file: rosparam load
asd.yaml:
servo_1:
center: 333
range: 100
direction: -1
servo_2:
center: 336
range: 108
direction: 1
You can load this file in a launch file or on the command line (with added namespace):
rosparam load asd.yaml foo
/tmp$ rosparam list
/foo/servo_1/center
/foo/servo_1/direction
...
3 | No.3 Revision |
You could load a yaml-file with parameters in your launch file: parameters: rosparam load
asd.yaml:
servo_1:
center: 333
range: 100
direction: -1
servo_2:
center: 336
range: 108
direction: 1
You can load this file in a launch file or on the command line (with added namespace):
rosparam load asd.yaml foo
/tmp$ rosparam list
/foo/servo_1/center
/foo/servo_1/direction
...
4 | No.4 Revision |
You could load a yaml-file with your parameters: rosparam load
asd.yaml:
servo_1: base_joint_motor:
center: 333
range: 100
direction: -1
servo_2:
wrist_joint_motor:
center: 336
range: 108
direction: 1
or if you have a list of similar motors:
servos:
- id: 1
center: 333
range: 100
direction: -1
- id: 2
center: 336
range: 108
direction: 1
You can load this file in a launch file or on the command line (with added namespace):namespace).
rosparam load asd.yaml foo
// Added @gvdhoorn's proposal with lists