0
$\begingroup$

Rosanswers logo

(https://wiki.ros.org/ROS/Tutorials/UnderstandingServicesParams) I can understand the namespace use in rosparam load [file_name] [namespace] command in the example given, but what is the use for it in dump file generation, i tried to understand it by using double tab key, and ran this command rosparam dump roslog.yaml /background_b it ran successfully but when i tried to load it by rosparam load roslog.yaml copy it resulted in error :-

Traceback (most recent call last):
  File "/opt/ros/kinetic/bin/rosparam", line 35, in <module>
    rosparam.yamlmain()
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosparam/__init__.py", line 626, in yamlmain
    _rosparam_cmd_set_load(command, argv)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosparam/__init__.py", line 545, in _rosparam_cmd_set_load
    paramlist = load_file(arg, default_namespace=script_resolve_name(NAME, arg2), verbose=options.verbose)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosparam/__init__.py", line 174, in load_file
    return load_str(f.read(), filename, default_namespace=default_namespace, verbose=verbose)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosparam/__init__.py", line 189, in load_str
    if NS in doc:
TypeError: argument of type 'int' is not iterable

Any clue on what happened and what went wrong?


Originally posted by Subhassh on ROS Answers with karma: 1 on 2018-02-22

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

From a look at the code (here) it looks like this allows you to dump only a subhierarchy of parameters from the server.

Note the overlap between rosparam get and rosparam dump: they are handled by almost the same code.


Originally posted by gvdhoorn with karma: 86574 on 2018-02-23

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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