Fixing indentation error

This commit is contained in:
Nathan BEAUD 2024-03-13 13:51:26 +01:00
parent 32e55a91ba
commit 7b71d7f207
1 changed files with 2 additions and 1 deletions

View File

@ -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