diff --git a/redball_chase.py b/redball_chase.py index 2f87279..945b5b4 100644 --- a/redball_chase.py +++ b/redball_chase.py @@ -55,7 +55,8 @@ def image_callback(msg): twist_msg = Twist() if ball_info: - x, _, radius = ball_info[0] + center, radius = ball_info + x, y = center err = x - cv_image.shape[1] / 2 if abs(err) > 100: # Need to rotate TurtleBot to align with the ball twist_msg.angular.z = -0.005 * err