def __init__(self): self.lc = lcm.LCM(settings.LCM_URI) self.msg = forseti2.piemos_cmd() self.msg.header = forseti2.header() self.msg.header.seq = 0 self.msg.header.time = time.time() self.msg.auton = False self.msg.game_time = 0 self.bad_rfids = [-1, -1, -1, -1] self.enable = False self.team_override = [True, True, True, True]
#!/usr/bin/env python2.7 """ This node tests piemos by scrubbing through all option. """ import lcm import time import forseti2 as fs2 import settings lc = lcm.LCM(settings.LCM_URI) msg = fs2.piemos_cmd() msg.header = fs2.header() msg.header.seq = 0 msg.header.time = time.time() msg.auton = True msg.enabled = True def send_msg(m): m.header.seq+=1 m.header.time = time.time() print('fs2.health: enabled=' + str(m.enabled) + ', auton=' + str(m.auton) + ', header.seq=' + str(m.header.seq)