Ask Your Question

what is the use of namespace in `rosparam dump [file_name] [namespace]` command?

asked 2018-02-22 16:45:40 -0600

Subhassh gravatar image

updated 2018-02-23 03:22:53 -0600

gvdhoorn gravatar image

( ) 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>
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosparam/", line 626, in yamlmain
    _rosparam_cmd_set_load(command, argv)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosparam/", 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/", line 174, in load_file
    return load_str(, filename, default_namespace=default_namespace, verbose=verbose)
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosparam/", 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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-23 03:45:24 -0600

gvdhoorn gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-02-22 16:45:40 -0600

Seen: 193 times

Last updated: Feb 23 '18