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
39062197
Commit
39062197
authored
4 years ago
by
Joseph Mirabel
Committed by
Guilhem Saurel
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add function to get state of SimpleSeqPlay
parent
8b45b345
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/sot/tools/simpleseqplay.hh
+5
-0
5 additions, 0 deletions
include/sot/tools/simpleseqplay.hh
src/CMakeLists.txt
+1
-1
1 addition, 1 deletion
src/CMakeLists.txt
src/python-module.cc
+40
-0
40 additions, 0 deletions
src/python-module.cc
src/simpleseqplay.cc
+5
-0
5 additions, 0 deletions
src/simpleseqplay.cc
with
51 additions
and
1 deletion
include/sot/tools/simpleseqplay.hh
+
5
−
0
View file @
39062197
...
...
@@ -42,6 +42,11 @@ class SimpleSeqPlay : public dg::Entity {
void
unhold
();
virtual
std
::
string
getDocString
()
const
;
bool
waiting
()
const
;
bool
initializing
()
const
;
bool
executing
()
const
;
bool
finished
()
const
;
private:
dg
::
Vector
&
computePosture
(
dg
::
Vector
&
pos
,
int
t
);
// 0: motion not started,
...
...
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
1
−
1
View file @
39062197
...
...
@@ -5,7 +5,7 @@
IF
(
BUILD_PYTHON_INTERFACE
)
DYNAMIC_GRAPH_PYTHON_MODULE
(
${
PYTHON_DIR
}
${
PROJECT_NAME
}
wrap
MODULE_HEADER
${
CMAKE_CURRENT_SOURCE_DIR
}
/python
.hh
SOURCE_PYTHON_MODULE
${
CMAKE_CURRENT_SOURCE_DIR
}
/python
-module.cc
)
SET
(
${
PROJECT_NAME
}
_PYTHON
...
...
This diff is collapsed.
Click to expand it.
src/python
.hh
→
src/python
-module.cc
+
40
−
0
View file @
39062197
#include
"dynamic-graph/python/module.hh"
#include
<sot/tools/cubic-interpolation.hh>
#include
<sot/tools/cubic-interpolation-se3.hh>
#include
<sot/tools/kinematic-planner.hh>
...
...
@@ -12,5 +14,27 @@ typedef boost::mpl::vector<
,
dgst
::
CubicInterpolationSE3
,
dgst
::
Oscillator
,
dgst
::
Seqplay
,
dgst
::
SimpleSeqPlay
>
entities_t
;
struct
register_entity
{
template
<
typename
T
>
inline
void
operator
()(
boost
::
type
<
T
>
)
const
{
dynamicgraph
::
python
::
exposeEntity
<
T
>
();
}
};
BOOST_PYTHON_MODULE
(
wrap
)
{
bp
::
import
(
"dynamic_graph"
);
boost
::
mpl
::
for_each
<
entities_t
,
boost
::
type
<
boost
::
mpl
::
_
>
>
(
register_entity
());
using
dgst
::
SimpleSeqPlay
;
dynamicgraph
::
python
::
exposeEntity
<
SimpleSeqPlay
>
()
.
def
(
"waiting"
,
&
SimpleSeqPlay
::
waiting
)
.
def
(
"initializing"
,
&
SimpleSeqPlay
::
initializing
)
.
def
(
"executing"
,
&
SimpleSeqPlay
::
executing
)
.
def
(
"finished"
,
&
SimpleSeqPlay
::
finished
)
;
}
This diff is collapsed.
Click to expand it.
src/simpleseqplay.cc
+
5
−
0
View file @
39062197
...
...
@@ -186,6 +186,11 @@ void SimpleSeqPlay::hold() {
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
;
}
bool
SimpleSeqPlay
::
finished
()
const
{
return
state_
==
3
;
}
std
::
string
SimpleSeqPlay
::
getDocString
()
const
{
return
"Provide joint references for a whole-body motion
\n
"
"
\n
"
...
...
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