def __init__(self):
#constants for racecar speed and angle calculations
self.pSpeed = 0.3 #tweak
self.pAngle = 1
#positive charge behind racecar to give it a "kick" (forward vector)
self.propelling_charge = 4.5
#more constants
self.charge = 0.01
self.safety_threshold = 0.3
self.speeds = [1] #Creates a list of speeds
self.stuck_time = 0
self.stuck = False
self.stuck_threshold = 2
rospy.init_node("explorer")
self.sub = rospy.Subscriber('scan', LaserScan, self.laser_callback)
self.pub = rospy.Publisher('/vesc/ackermann_cmd_mux/input/navigation', AckermannDriveStamped)
rospy.on_shutdown(self.shutdown)
评论列表
文章目录