ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

m is your message. I search in m (string) the interesting data. Example, search "level":

pos_level = m.find('level')

or

if (m[n] == 'l'):

if (m[n+1] == '2'):

m is your message. I search in m (string) the interesting data. Example, search "level":

pos_level = m.find('level')

or

if (m[n] == 'l'):

'l'): if (m[n+1] == '2'):

'2'): ....

m is your message. I search in m (string) the interesting data. Example, search "level":

pos_level = m.find('level')

or

if (m[n] == 'l'):
     if (m[n+1] == '2'):
'e):
           ....

m is your message. I search in m (string) the interesting data. Example, search "level":

def received_message(self, m):
    #print type(m)
     print("recived => %s \n" %str(m))
     difference_topic(m)

def difference_topic(m):
  pos_level = m.find('level')

or

 if (m[n] == 'l'):
     if (m[n+1] == 'e):
           ....