Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lrs_turtle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lrs2
lrs_turtle
Commits
c5dc06e4
Commit
c5dc06e4
authored
2 years ago
by
Tommy Persson
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring execution.
parent
cbd426c5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lrs_turtle/executors/base_executor.py
+1
-2
1 addition, 2 deletions
lrs_turtle/executors/base_executor.py
lrs_turtle/executors/move_to.py
+4
-5
4 additions, 5 deletions
lrs_turtle/executors/move_to.py
with
5 additions
and
7 deletions
lrs_turtle/executors/base_executor.py
+
1
−
2
View file @
c5dc06e4
...
@@ -47,8 +47,7 @@ class BaseExecutor(Executor):
...
@@ -47,8 +47,7 @@ class BaseExecutor(Executor):
self
.
course
=
90.0
-
self
.
theta
self
.
course
=
90.0
-
self
.
theta
self
.
have_turtle_pose
=
True
self
.
have_turtle_pose
=
True
except
Exception
as
exc
:
except
Exception
as
exc
:
print
(
"
EXCEPTION pose_callback:
"
,
type
(
exc
))
self
.
node
.
get_logger
().
error
(
f
'
EXCEPTION pose_callback:
{
type
(
exc
)
}
-
{
exc
}
'
)
print
(
exc
)
def
check
(
self
):
def
check
(
self
):
lx
=
0.5
lx
=
0.5
...
...
This diff is collapsed.
Click to expand it.
lrs_turtle/executors/move_to.py
+
4
−
5
View file @
c5dc06e4
...
@@ -13,10 +13,10 @@ class MoveToExecutor(BaseExecutor):
...
@@ -13,10 +13,10 @@ class MoveToExecutor(BaseExecutor):
def
start
(
self
):
def
start
(
self
):
try
:
try
:
print
(
"
MoveToExecutor start
"
)
self
.
node
.
get_logger
().
info
(
"
MoveToExecutor start
"
)
self
.
params
.
print
()
self
.
params
.
print
()
gp
=
self
.
params
.
get_value
(
"
waypoint
"
)
gp
=
self
.
params
.
get_value
(
"
waypoint
"
)
print
(
"
GP:
"
,
gp
)
self
.
node
.
get_logger
().
info
(
f
'
GP:
{
gp
}
'
)
self
.
commanded_speed
=
self
.
get_commanded_speed
()
self
.
commanded_speed
=
self
.
get_commanded_speed
()
self
.
set_goal_gp
(
gp
.
latitude
,
gp
.
longitude
,
gp
.
altitude
)
self
.
set_goal_gp
(
gp
.
latitude
,
gp
.
longitude
,
gp
.
altitude
)
...
@@ -25,10 +25,9 @@ class MoveToExecutor(BaseExecutor):
...
@@ -25,10 +25,9 @@ class MoveToExecutor(BaseExecutor):
self
.
stop
()
self
.
stop
()
self
.
cleanup
()
self
.
cleanup
()
print
(
"
MoveToExecutor end
"
)
self
.
node
.
get_logger
().
info
(
"
MoveToExecutor end
"
)
except
Exception
as
exc
:
except
Exception
as
exc
:
print
(
"
EXCEPTION start move-to
"
,
type
(
exc
))
self
.
node
.
get_logger
().
error
(
f
'
EXCEPTION start:
{
type
(
exc
)
}
-
{
exc
}
'
)
print
(
exc
)
class
MoveToExecutorFactory
(
ExecutorFactory
):
class
MoveToExecutorFactory
(
ExecutorFactory
):
def
__init__
(
self
):
def
__init__
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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