Beispiel #1
0
 def publishBrakeCmd(self, pedalVal):
     msg = BrakeCmd()
     msg.pedal_cmd = pedalVal
     msg.pedal_cmd_type = 2
     msg.boo_cmd = False
     msg.enable = True
     msg.clear = False
     msg.ignore = False
     msg.count = 0
     self.brake_pub.publish(msg)
	def publishBrakeCmd(self, pedalVal):
		msg = BrakeCmd()
		msg.pedal_cmd = pedalVal
		msg.pedal_cmd_type = 2
		'''
		pedal_cmd_type=1: Unitless, range 0.15 to 0.50
					  =2: Percent of maximum torque, range 0 to 1
					  =3: Torque (unit: N.m), range 0 to 3250
		'''
		msg.boo_cmd = False
		msg.enable = True
		msg.clear = False
		msg.ignore = False
		msg.count = 0
		self.brake_pub.publish(msg)