def __init__(self): self.bridge = cv_bridge.CvBridge() #cv2.namedWindow("window", 1) self.pose_msg = Deu_pose() self.pose_pub = rospy.Publisher('/right_pose', Deu_pose, queue_size=1) self.image_sub = rospy.Subscriber( '/front_right_camera/image_raw/compressed', CompressedImage, self.image_callback)
def __init__(self): self.bridge = cv_bridge.CvBridge() self.pose_msg = Deu_pose() self.pose_pub = rospy.Publisher('/line_pose',Deu_pose,queue_size = 1) self.stabilizer_pub = rospy.Publisher('/tb3/control/stabilize',Bool,queue_size = 1) self.image_sub = rospy.Subscriber('/python_image0/compressed', CompressedImage, self.image_callback) #self.image_sub = rospy.Subscriber('/python_image0',Image, self.image_callback) self.area = 3 self.stabilizer = True if rospy.has_param('~area'): rospy.logdebug('%s', rospy.get_param('~area')) if rospy.get_param('~area') > 5: pass else: self.area = rospy.get_param('~area')
def __init__(self): self.pose_msg = Deu_pose() self.xpose = 160 self.ypose = 160 self.control_state = False self.nav_state = False self.p_state = False self.parking_white = False self.timer = ElapsedTime() self.twist = Twist() self.control_sub = rospy.Subscriber('tb3/control/block',Bool, self.control_callback) self.navmode_sub = rospy.Subscriber('tb3/control/navmode',Bool, self.navmode_callback) self.parking_sub = rospy.Subscriber('tb3/control/parking',Bool, self.parking_callback) self.parking_white_sub = rospy.Subscriber('/tb3/control/parking_white',Bool, self.parking_white_callback) self.pose_sub = rospy.Subscriber('/line_pose',Deu_pose, self.pose_callback) self.cmd_vel_pub = rospy.Publisher('/cmd_vel',Twist,queue_size = 1)