def publishThrottleCmd(self, pedalVal): msg = ThrottleCmd() msg.pedal_cmd = pedalVal msg.pedal_cmd_type = 2 msg.enable = True msg.clear = False msg.ignore = False msg.count = 0 self.throttle_pub.publish(msg)
def publishThrottleCmd(self, pedalVal): msg = ThrottleCmd() msg.pedal_cmd = pedalVal msg.pedal_cmd_type = 2 ''' pedal_cmd_type=1: Unitless, range 0.15 to 0.50 =2: Percent of maximum throttle, range 0 to 1 ''' msg.enable = True msg.clear = False msg.ignore = False msg.count = 0 self.throttle_pub.publish(msg)