Esempio n. 1
0
    def get_topics(self, clb=None):
        """Returns a list of currently alive ROS Topics. Similar to `rostopic list`
        Args:
            topic_type (str): The Topic type.
            clb (function, optional): Callback function that is called upon response is received.
        """

        topics_list = client.get_published_topics('/')

        return topics_list
Esempio n. 2
0
import rosservice
import rostopic
import rosnode
from rospy import client

if __name__ == '__main__':
    service_list = rosservice.get_service_list()
    list = client.get_published_topics('/')
    type = rostopic.get_topic_type('/rosout_agg')
    type = rosservice.get_service_type('/rosout/get_loggers')
    printvalue = True
    # question = "select the topics"
    # title = "bridge"
    # listofoptions = ["option1" , "option2"]
    # choise = easygui.multchoicebox(question,title,listofoptions)
    pass
Esempio n. 3
0
def getTopicsList():
    return client.get_published_topics()
Esempio n. 4
0
import rostools
rostools.update_path('rospy')
from rospy import client
import rospy
client.get_published_topics()

rostools.update_path('wxpy_ros')
import wxpy_ros


class MySubscriber:
    """Since only one callback should subscribe to each topic, this class subscribes """
    def __init__(self):
        self.channels = []

    def callback(self, state):
        #print 'call'
        for channel in self.channels:
            channel.callback(state)


class MyChannel:
    def callback(self, state):
        print 'received state ', (state.PosCmd)


class RosChannel(wxpy_ros.Channel):
    def __init__(self, style, slotName):
        wxpy_ros.Channel.__init__(self, style)
        self.slotName = slotName
        print 'Created ROS channel'
Esempio n. 5
0
import rostools
rostools.update_path('rospy')
from rospy import client
import rospy
client.get_published_topics()

rostools.update_path('wxpy_ros')
import wxpy_ros

class MySubscriber:
    """Since only one callback should subscribe to each topic, this class subscribes """
    def __init__(self):
        self.channels = []
    
    def callback(self, state):
        #print 'call'
        for channel in self.channels:
            channel.callback(state)

class MyChannel:
    
    def callback(self, state):
        print 'received state ',(state.PosCmd)

class RosChannel(wxpy_ros.Channel):
    def __init__(self, style, slotName):
        wxpy_ros.Channel.__init__(self, style)
        self.slotName = slotName
        print 'Created ROS channel'
    
    def callback(self, state):