def on_msg2(channel, data): global test_init, test_stop msg = utime_t() msg.utime = timestamp_now() lc.publish(test_init, msg.encode()) print "Sent init message" print test_init lc.unsubscribe(sub2)
def on_msg2(channel, data): global test_init, test_stop msg = utime_t() msg.utime = timestamp_now() lc.publish(test_init, msg.encode() ) print "Sent init message" print test_init lc.unsubscribe(sub2)
def on_msg1(channel, data): global test_init, test_stop m = robot_state_t.decode(data) print "got ers" neckmsg = neck_pitch_t() neckmsg.utime = timestamp_now() neckmsg.pitch = 0.43 lc.publish('DESIRED_NECK_PITCH', neckmsg.encode()) time.sleep(10) # for the robot to drop onto the ground msg = utime_t() msg.utime = timestamp_now() lc.publish('START_MIT_STAND', msg.encode()) print "Sent START_MIT_STAND" lc.unsubscribe(sub1)
def on_msg1(channel, data): global test_init, test_stop m = robot_state_t.decode(data) print "got ers" neckmsg = neck_pitch_t() neckmsg.utime = timestamp_now() neckmsg.pitch = 0.43 lc.publish('DESIRED_NECK_PITCH', neckmsg.encode() ) time.sleep(10) # for the robot to drop onto the ground msg = utime_t() msg.utime = timestamp_now() lc.publish('START_MIT_STAND', msg.encode() ) print "Sent START_MIT_STAND" lc.unsubscribe(sub1)