ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Following the guidelines of dornhege, this looks the code that it is needed to load a yaml file dynamically (tested in Fuerte).
I firstly expected to be able to use the rosparam.yamlmain method. But it is not possible because it is programed using as argument sys.args.
The below for loop looks like it could be avoided using some method, but if such method exist I haven't found it.
import roslib roslib.load_manifest("rosparam") import rosparam paramlist=rosparam.load_file("/path/to/myfile",default_namespace="my_namespace") for params, ns in paramlist: rosparam.upload_params(ns,params)