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
e3f7451e
Commit
e3f7451e
authored
3 years ago
by
Tommy Persson
Browse files
Options
Downloads
Patches
Plain Diff
Work on ROS2
parent
1bc6432c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lrs_turtle/executors/move_to.py
+8
-4
8 additions, 4 deletions
lrs_turtle/executors/move_to.py
with
8 additions
and
4 deletions
lrs_turtle/executors/move_to.py
+
8
−
4
View file @
e3f7451e
import
json
import
json
from
lrs_exec.executor_factory
import
ExecutorFactory
from
lrs_exec.executor_factory
import
ExecutorFactory
from
lrs_util.constraints
import
Constraints
from
lrs_turtle.executors.base_executor
import
BaseExecutor
from
lrs_turtle.executors.base_executor
import
BaseExecutor
...
@@ -37,8 +38,11 @@ class MoveToExecutorFactory(ExecutorFactory):
...
@@ -37,8 +38,11 @@ class MoveToExecutorFactory(ExecutorFactory):
return
MoveToExecutor
(
node
,
id
)
return
MoveToExecutor
(
node
,
id
)
def
json_constraints
(
self
,
node_json
):
def
json_constraints
(
self
,
node_json
):
res
=
""
try
:
jobj
=
{
"
speed
"
:
[
"
slow
"
,
"
standard
"
]}
cons
=
Constraints
()
res
=
json
.
dumps
(
jobj
,
sort_keys
=
True
,
indent
=
4
,
separators
=
(
'
,
'
,
'
:
'
))
cons
.
set_possible_speeds
([
"
slow
"
,
"
standard
"
])
return
res
res
=
cons
.
get_json_str
()
return
res
except
Exception
as
exc
:
self
.
get_logger
().
error
(
f
'
EXCEPTION json_constraints:
{
type
(
exc
)
}
-
{
exc
}
'
)
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