Package rospy :: Module msproxy :: Class MasterProxy

Class MasterProxy

source code

object --+
         |
        MasterProxy

Convenience wrapper for ROS master API and XML-RPC implementation. The Master API methods can be invoked on this object and will be forwarded appropriately. Names in arguments will be remapped according to current node settings. Provides dictionary-like access to parameter server, e.g.:

 master[key] = value

All methods are thread-safe.

Instance Methods
 
__init__(self, uri)
Constructor for wrapping a remote master instance.
source code
 
__getattr__(self, key) source code
 
__getitem__(self, key)
Fetch item from parameter server and subscribe to future updates so that values can be cached.
source code
 
__setitem__(self, key, val)
Set parameter value on Parameter Server
source code
str
search_param(self, key)
Search for a parameter matching key on the parameter server
source code
 
get_param_cached(self, key) source code
 
__delitem__(self, key)
Delete parameter key from the parameter server.
source code
 
__contains__(self, key)
Check if parameter is set on Parameter Server
source code
 
__iter__(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, uri)
(Constructor)

source code 

Constructor for wrapping a remote master instance.

Parameters:
  • uri (str) - XML-RPC URI of master
Overrides: object.__init__

__getitem__(self, key)
(Indexing operator)

source code 

Fetch item from parameter server and subscribe to future updates so that values can be cached.

Parameters:
  • key (str) - parameter key
Raises:
  • KeyError - if key is not set

__setitem__(self, key, val)
(Index assignment operator)

source code 

Set parameter value on Parameter Server

Parameters:
  • key (str) - parameter key
  • val (XMLRPC legal value) - parameter value

search_param(self, key)

source code 

Search for a parameter matching key on the parameter server

Returns: str
found key or None if search did not succeed
Raises:

__delitem__(self, key)
(Index deletion operator)

source code 

Delete parameter key from the parameter server.

Raises:
  • KeyError - if key is not set
  • ROSException - if parameter server reports an error

__contains__(self, key)
(In operator)

source code 

Check if parameter is set on Parameter Server

Parameters:
  • key (str) - parameter key
Raises:

__iter__(self)

source code 
Raises: