Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ros-coordination-card
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CdF
CdF 2020-2021
modules
coordination-card
ros-coordination-card
Commits
6a06de06
Commit
6a06de06
authored
4 years ago
by
Charles Javerliat
Browse files
Options
Downloads
Patches
Plain Diff
Remove useless is_finished
parent
848e92a8
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
Add/camera node
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
actions_manager/src/tasks/goto.py
+0
-12
0 additions, 12 deletions
actions_manager/src/tasks/goto.py
actions_manager/src/tasks/task.py
+3
-4
3 additions, 4 deletions
actions_manager/src/tasks/task.py
with
3 additions
and
16 deletions
actions_manager/src/tasks/goto.py
+
0
−
12
View file @
6a06de06
...
...
@@ -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
This diff is collapsed.
Click to expand it.
actions_manager/src/tasks/task.py
+
3
−
4
View file @
6a06de06
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment