Example #1
0
 def callback(topic, data):
     msg = lcmutil.decode(lcm_type, data)
     loop.create_task(self.websocket.send(json.dumps({
         'type': 'lcm_message',
         'topic': topic,
         'message': lcmutil.lcm_to_dict(msg)
     })))
Example #2
0
def recv_message(type, channel, data):
    msg = lcmutil.decode(type, data)
    now = datetime.datetime.now()
    print('----- {}'.format(now.strftime('%Y-%m-%d %H:%M:%S.%f')))
    pprint.pprint(lcmutil.lcm_to_dict(msg))
    print()
Example #3
0
 def callback(topic, data):
     msg = lcmutil.decode(lcm_type, data)
     loop.create_task(self._send_subscription(topic, msg, websocket))