def __init__(self):
self.bridge = cv_bridge.CvBridge()
cv2.namedWindow("input", 1)
cv2.createTrackbar('param1', 'input', 10, 300, nothing)
cv2.createTrackbar('param2', 'input', 15, 300, nothing)
cv2.namedWindow("processed", 1)
self.image_sb = rospy.Subscriber('/usb_cam/image_raw', Image, self.image_callback)
self.motion = Twist()
rate = rospy.Rate(20)
# publish to cmd_vel of the jackal
pub = rospy.Publisher("/jackal_velocity_controller/cmd_vel", Twist, queue_size=10)
while not rospy.is_shutdown():
# publish Twist
pub.publish(self.motion)
rate.sleep()
评论列表
文章目录