ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
roslaunch
first parses all your launch files and creates an ordered list of parameters. Parameter definitions that are parsed later overwrite earlier definitions. After all parameters are parsed, they are set on the parameter server. That means, parameters cannot reference other parameters. Using rosparam dump will only dump parameters that have been set before you called roslaunch
.
What should work though is dumping the parameters in a node since nodes are executed after the parameters are set. Try the following:
<node name="dump_parameters" pkg="rosparam" type="rosparam" args="dump parameters_dump.yaml" />
Note that the file will be created in your ROS_HOME
, i.e. ~/.ros
per default. If you want to change that, use an absolute path for your output file. You can also use something like $(find <ros package>)/parameters_dump.yaml
to put the file into a ROS package. Of course, that package must not be a system package but a user package since you need write permissions to its directory.
2 | No.2 Revision |
roslaunch
first parses all your launch file and all included launch files in order and creates an ordered list of parameters. parameters to set. Parameter definitions that are parsed later overwrite earlier definitions. After all parameters are parsed, they are set on the parameter server. That means, parameters cannot reference other parameters. Using rosparam
dump dump will only dump parameters that have been set before you called roslaunch
.
What should work though is dumping the parameters in a node since nodes are executed after the parameters are set. Try the following:
<node name="dump_parameters" pkg="rosparam" type="rosparam" args="dump parameters_dump.yaml" />
Note that the file will be created in your ROS_HOME
, i.e. ~/.ros
per default. If you want to change that, use an absolute path for your output file. You can also use something like $(find <ros package>)/parameters_dump.yaml
to put the file into a ROS package. Of course, that package must not be a system package but a user package since you need write permissions to its directory.