fkie / multimaster_fkie

ROS stack with FKIE packages for multi-robot (discovering, synchronizing and management GUI)
BSD 3-Clause "New" or "Revised" License
267 stars 108 forks source link

ROS Parameter Server Sync #66

Closed baronep closed 5 years ago

baronep commented 6 years ago

I saw on the github page that the parameter server is not synced with the current version of the software. What was the reason for this? Is there a blocking issue on this?

atiderko commented 6 years ago

it was a decision to not implement this feature. Key arguments are:

If you still need parameter synchronization, there is one in a fork with parameter sync node

atiderko commented 5 years ago

added separate script param_sync.py, see commit b5805b3

marcus011 commented 2 years ago

Hi @atiderko , How to use this param_sync file ,can you explain more about it

atiderko commented 2 years ago

Hi @marcus011, an example of the .sync file can be found in the launch folder of the fkie_master_sync. Es ist eine ROS-format compatible YAML-Datei mit den gleichen Parametern wie in der Launch-Datei. It can be loaded in the launch file using either the rosparam or the~interface_url parameter.

The ~interface_url parameter was introduced for use with Node Manager. On launch the master_sync using the button in host description panel you can choose a .sync file.

marcus011 commented 2 years ago

Hi @atiderko , Thanks for the information, basically I want to load /robot_description parameter from another roscore using a launch file to my gazebo roscore, so can you guide how I can sync those parameter to my gazebo ,so that robot can be loaded up

atiderko commented 2 years ago

On the machine where you need remote parameter run: rosrun fkie_master_sync param_sync.py

It is a simple script which listen to changes published by master_discovery and get parameter from remote roscore.

marcus011 commented 2 years ago

I have tested that command & robot_description is not loading up on gazebo side

atiderko commented 2 years ago

Sorry, I see now, a namespace is added by default. Try this: rosrun fkie_master_sync param_sync.py _add_ns:=False

marcus011 commented 2 years ago

I am getting this error when using command rosrun fkie_master_sync param_sync.py _add_ns:=False

[ERROR] [1627628967.414029]: bad callback: <function master_changed at 0x7f0eb5c1e2d0>
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 748, in _invoke_callback
    cb(msg, cb_args)
  File "/home/marcus/catkin_ws/src/multimaster/fkie_master_sync/nodes/param_sync.py", line 32, in master_changed
    master_to['/'+_ns] = params_from
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/msproxy.py", line 138, in __setitem__
    rospy.impl.paramserver.get_param_server_cache().update(resolved_key, val)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/impl/paramserver.py", line 102, in update
    value_key = namespaces[-1]
IndexError: list index out of range
atiderko commented 2 years ago

hmm... currently I have no time to debug. Perhaps something is wrong with provided namespaces to MasterProxy. The script is very easy if you want to try to fix ;-)