rosros 0.2.5
Simple unified interface to ROS1 / ROS2 Python API
Loading...
Searching...
No Matches
rosros.rospify.msproxy.MasterProxy Class Reference

Partial stand-in for `rospy.MasterProxy`. More...

Public Member Functions

 __init__ (self, node)
 
 getPublishedTopics (self, subgraph="")
 Get list of topics that can be subscribed to.
 
 getSystemState (self)
 Retrieve list representation of system state (i.e.
 
 getTopicTypes (self)
 Returns a list of topic names and their types.
 

Protected Attributes

 _node
 

Detailed Description

Partial stand-in for `rospy.MasterProxy`.

Definition at line 18 of file msproxy.py.

Constructor & Destructor Documentation

◆ __init__()

rosros.rospify.msproxy.MasterProxy.__init__ (   self,
  node 
)
Parameters
noderclpy.Node instance

Definition at line 24 of file msproxy.py.

Member Function Documentation

◆ getPublishedTopics()

rosros.rospify.msproxy.MasterProxy.getPublishedTopics (   self,
  subgraph = "" 
)

Get list of topics that can be subscribed to.

This does not return topics that have no publishers. See `getSystemState()` to get more comprehensive list.

Parameters
subgraphreturn only topics under subgraph, e.g. "/foo" will match "/foo/bar" but not "/foobar". "" returns all topics.
Returns
: (1, "current topics", [[topicName, typeName], ])

Definition at line 74 of file msproxy.py.

◆ getSystemState()

rosros.rospify.msproxy.MasterProxy.getSystemState (   self)

Retrieve list representation of system state (i.e.

publishers, subscribers, and services).

Returns
: (1, "current system state", systemState).

System state is in list representation:: [publishers, subscribers, services].

publishers is of the form:: [ [topic1, [topic1Publisher1...topic1PublisherN]] ... ]

subscribers is of the form:: [ [topic1, [topic1Subscriber1...topic1SubscriberN]] ... ]

services is of the form:: [ [service1, []] ... ]

Definition at line 44 of file msproxy.py.

◆ getTopicTypes()

rosros.rospify.msproxy.MasterProxy.getTopicTypes (   self)

Returns a list of topic names and their types.

Returns
(1, "current system state", [[topicName, topocType], ])

Definition at line 89 of file msproxy.py.

Member Data Documentation

◆ _node

rosros.rospify.msproxy.MasterProxy._node
protected

Definition at line 25 of file msproxy.py.


The documentation for this class was generated from the following file: