ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
![]() | 1 | initial version |
Hi @MechLc!
You say it doesn't work because you can't see the example.yaml
file that should be generated, right?
The rosparam dump example.yaml
will generate the file on the current working directory.
In order to see the current working directory, you can use the pwd
command, like: system(" echo 'ROS Params dumped at: ' $(pwd); rosparam dump example.yaml");
Or you can pass the full path of the yaml file, like: rosparam dump /full/path/to/example.yaml
.
Below I have attached a code of a ROS Node in CPP that just dumps the ros params.
If you run the node using roslaunch
, the file is going to be generated probably on ~/.ros/example.yaml
, as you can see on this video (https://youtu.be/w5cVKlhy37w).
#include <ros/ros.h>
int main(int argc, char **argv){
ros::init(argc, argv, "tutorial_node");
system(" echo 'ROS Params dumped at: ' $(pwd); rosparam dump example.yaml");
ros::spin();
return 0;
}