Skip to content
Snippets Groups Projects
Commit 6a06de06 authored by Charles Javerliat's avatar Charles Javerliat
Browse files

Remove useless is_finished

parent 848e92a8
No related branches found
No related tags found
1 merge request!2Add/camera node
......@@ -27,15 +27,3 @@ class Goto(Task):
self.robot.rotate_to(angle_to_target)
self.robot.forward(self.robot.position.distance(self.target_pos))
self.robot.rotate_to(self.target_pos.theta)
def is_finished(self):
"""
Return true if the robot has reached the target position with an error of EPSILON_POSITION on x and y and EPSILON_ROTATION on theta at maximum.
"""
# TODO: take into account the speed of the robot ? Make sure he is pretty still at the target and not just passing it
position_ok = compare_distance(self.robot.position, self.target_pos)
rotation_ok = compare_theta(
self.robot.position.theta, self.target_pos.theta)
return position_ok and rotation_ok
......@@ -8,10 +8,6 @@ class Task():
For instance : goto a position, grab an object, ...
"""
@abstractmethod
def is_finished(self):
pass
def estimatePointsAndTime(self):
"""
return a tuple (points, time) due to the task
......@@ -21,4 +17,7 @@ class Task():
@abstractmethod
def run(self):
"""
Blocking call to process the task
"""
pass
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment