def __init__(self, **kwargs): # connect to joystick (it must be paired with the computer via bluetooth) Controller.__init__(self, **kwargs) # initialize the node named joystick rospy.init_node('joystick', anonymous=True) # initialize a publisher to send messages to a topic named pos_commands self.pub = rospy.Publisher("pos_commands", Float64MultiArray, queue_size=10) # initialize a publisher to send messages to a topic named image_rot self.pub_rot_angle = rospy.Publisher("image_rot", Float64MultiArray, queue_size=10) self.rate = rospy.Rate(30) # 30hz self.R3_up_down, self.L3_up_down, self.L3_left_right, self.reset, self.reset_shaft, self.enable, self.home = 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 self.rot_angle = 0.0 self.joints = Float64MultiArray() self.joints.data = [ self.R3_up_down, self.L3_up_down, self.L3_left_right, self.reset, self.reset_shaft, self.enable, self.home ] self.pub.publish(self.joints) self.angle = Float64MultiArray() self.angle.data = [self.rot_angle] self.pub.publish(self.angle)
def __init__(self, **kwargs): Controller.__init__(self, **kwargs) self.bearingl = 0 self.bearingr = 0 self.maxStick = 32767 self.limitMax = 88 self.limitMin = 50
def __init__(self, **kwargs): rospy.init_node(node_name) self.pub = rospy.Publisher(topic_name, String, queue_size=1) self.last_cmd = 1 self.recv_cmd = String() rotate_by_degree(20, wheels, 0) rotate_by_degree(-40, wheels, 0) rotate_by_degree(20, wheels, 0) Controller.__init__(self, **kwargs)
def __init__(self, vehicle: Drone, **kwargs): Controller.__init__(self, **kwargs) self.drone = vehicle # initialized drone self.is_hook_open = True self.is_core_open = True self.forward = 0.0 # forward is positive, backwards is negative self.sideways = 0.0 # going right is positive, left is negative self.rise = 0.0 # positive is up, negative down self.tilt = 0.0 # tilting right positive, tilting left is negative
def __init__(self, **kwargs): Controller.__init__(self, **kwargs) self.L3X = 0 self.L3Y = 0 self.R3X = 0 self.R3Y = 0 self.leftMotorPWM = 0 self.rightMotorPWM = 0 self.arrow = "None" self.motor = Motor() self.servo = Servo() self.motor.InitMotorHw() self.servo.InitServoHw() self.BASESTEPSIZE = 5
def __init__(self, **kwargs): # print(rospy.get_namespace()) Controller.__init__(self, **kwargs) self.heading = 0.0 self.depth = 0.0 self.speed = 0.3 self.dive_depth = 0.3 rospy.wait_for_service('uuv_control/arm_control') arm_control = rospy.ServiceProxy('uuv_control/arm_control', ArmControl) resp1 = arm_control() # print(2) rospy.wait_for_service('uuv_control/set_heading_velocity') self.shv = rospy.ServiceProxy('uuv_control/set_heading_velocity', SetHeadingVelocity) # print(3) rospy.wait_for_service('uuv_control/set_heading_depth') self.shd = rospy.ServiceProxy('uuv_control/set_heading_depth', SetHeadingDepth)
def __init__(self, **kwargs): Controller.__init__(self, **kwargs) self.speed = 20
def __init__(self): Controller.__init__(self,interface="/dev/input/js0", connecting_using_ds4drv=False)
def __init__(self, **kwargs): Controller.__init__(self, **kwargs) self.leftX = 0 self.leftY = 0
def __init__(self, **kwargs): Controller.__init__(self, **kwargs) self.Our_car_throttle = 0.0 self.Our_car_brake = 0.0 self.Our_car_steering = 0.0 self.modus_taste = 0
def __init__(self, **kwargs): Controller.__init__(self, **kwargs) self.myVal = 5
def __init__(self, pult: ServerMainPult): Controller.__init__(self, interface="/dev/input/js0", connecting_using_ds4drv=False) self.pult = pult
def __init__(self, **kwargs): Controller.__init__(self, **kwargs) self.motor_left = 0 self.motor_right = 0 self.l2_active = False self.r2_active = True
def __init__(self, **kwargs): Controller.__init__(self, **kwargs) self.car = Autocar() self.axis_data = {0:0.0,1:0.0} #default self.train = True
def __init__(self, **kwargs): Controller.__init__(self, **kwargs) self.logger_controller = logging.getLogger(self.interface)
def __init__(self, **kwargs): Controller.__init__(self, **kwargs)
def __init__(self, **kwargs): Controller.__init__(self, **kwargs) self.arduino = ArduinoCommunicator()