Fixing indentation error
This commit is contained in:
parent
32e55a91ba
commit
7b71d7f207
|
|
@ -55,7 +55,8 @@ def image_callback(msg):
|
||||||
|
|
||||||
twist_msg = Twist()
|
twist_msg = Twist()
|
||||||
if ball_info:
|
if ball_info:
|
||||||
x, _, radius = ball_info[0]
|
center, radius = ball_info
|
||||||
|
x, y = center
|
||||||
err = x - cv_image.shape[1] / 2
|
err = x - cv_image.shape[1] / 2
|
||||||
if abs(err) > 100: # Need to rotate TurtleBot to align with the ball
|
if abs(err) > 100: # Need to rotate TurtleBot to align with the ball
|
||||||
twist_msg.angular.z = -0.005 * err
|
twist_msg.angular.z = -0.005 * err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue