Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stack Of Tasks
sot-tools
Commits
a6bde485
Commit
a6bde485
authored
4 years ago
by
Joseph Mirabel
Committed by
Guilhem Saurel
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove method with no effect in SimpleSeqPlay
parent
f31711ed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/sot/tools/simpleseqplay.hh
+0
-8
0 additions, 8 deletions
include/sot/tools/simpleseqplay.hh
src/simpleseqplay.cc
+2
-13
2 additions, 13 deletions
src/simpleseqplay.cc
with
2 additions
and
21 deletions
include/sot/tools/simpleseqplay.hh
+
0
−
8
View file @
a6bde485
...
...
@@ -38,8 +38,6 @@ class SimpleSeqPlay : public dg::Entity {
void
load
(
const
std
::
string
&
filename
);
void
start
();
void
hold
();
void
unhold
();
virtual
std
::
string
getDocString
()
const
;
bool
waiting
()
const
;
...
...
@@ -53,8 +51,6 @@ class SimpleSeqPlay : public dg::Entity {
// 1: going to the current position to the first position.
// 2: motion in progress, 3: motion finished
unsigned
int
state_
;
std
::
size_t
configId_prev_
;
std
::
size_t
configId_hold_
;
int
startTime_
;
std
::
vector
<
dg
::
Vector
>
posture_
;
...
...
@@ -67,10 +63,6 @@ class SimpleSeqPlay : public dg::Entity {
// Number of iterations performed in state1.
int
it_nbs_in_state1_
;
/// Boolean to hold or not the posture.
bool
hold_
;
/// Current shift between holding time and startTime.
};
// class SimpleSeqPlay
}
// namespace tools
}
// namespace sot
...
...
This diff is collapsed.
Click to expand it.
src/simpleseqplay.cc
+
2
−
13
View file @
a6bde485
...
...
@@ -40,7 +40,6 @@ SimpleSeqPlay::SimpleSeqPlay(const std::string& name)
"SimpleSeqPlay("
+
name
+
")::output(vector)::posture"
),
currentPostureSIN_
(
NULL
,
"SimpleSeqPlay("
+
name
+
")::input(vector)::currentPosture"
),
state_
(
0
),
configId_prev_
(
0
),
startTime_
(
0
),
posture_
(),
time_
(
0
),
...
...
@@ -67,8 +66,6 @@ SimpleSeqPlay::SimpleSeqPlay(const std::string& name)
addCommand
(
"load"
,
makeCommandVoid1
(
*
this
,
&
SimpleSeqPlay
::
load
,
docstring
));
addCommand
(
"start"
,
makeCommandVoid0
(
*
this
,
&
SimpleSeqPlay
::
start
,
docCommandVoid0
(
"Start motion"
)));
addCommand
(
"hold"
,
makeCommandVoid0
(
*
this
,
&
SimpleSeqPlay
::
hold
,
docCommandVoid0
(
"Hold motion"
)));
addCommand
(
"unhold"
,
makeCommandVoid0
(
*
this
,
&
SimpleSeqPlay
::
unhold
,
docCommandVoid0
(
"Restart motion"
)));
docstring
=
"Set the time between the robot current pose and the starting of the buffer
\n
"
;
...
...
@@ -145,8 +142,9 @@ dg::Vector& SimpleSeqPlay::computePosture(dg::Vector& pos, int t) {
if
(
posture_
.
size
()
==
0
)
{
throw
std
::
runtime_error
(
"SimpleSeqPlay posture: Signals not initialized. read files first."
);
}
// Going to the first position
else
if
(
state_
==
1
)
{
if
(
state_
==
1
)
{
// Compute the difference between current posture and desired one.
dg
::
Vector
deltapos
=
posture_
[
0
]
-
currentPostureSIN_
.
access
(
t
);
...
...
@@ -167,7 +165,6 @@ dg::Vector& SimpleSeqPlay::computePosture(dg::Vector& pos, int t) {
// Tries to go through the list of postures.
else
if
(
state_
==
2
)
{
configId
=
t
-
startTime_
;
if
(
hold_
)
configId_hold_
=
configId
;
if
(
configId
==
posture_
.
size
()
-
1
)
{
state_
=
3
;
}
...
...
@@ -175,17 +172,9 @@ dg::Vector& SimpleSeqPlay::computePosture(dg::Vector& pos, int t) {
configId
=
posture_
.
size
()
-
1
;
}
pos
=
posture_
[
configId
];
configId_prev_
=
configId
;
return
pos
;
}
void
SimpleSeqPlay
::
hold
()
{
hold_
=
true
;
configId_hold_
=
configId_prev_
;
}
void
SimpleSeqPlay
::
unhold
()
{
hold_
=
false
;
}
bool
SimpleSeqPlay
::
waiting
()
const
{
return
state_
==
0
;
}
bool
SimpleSeqPlay
::
initializing
()
const
{
return
state_
==
1
;
}
bool
SimpleSeqPlay
::
executing
()
const
{
return
state_
==
2
;
}
...
...
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