Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-core
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-core
Commits
358877f1
Commit
358877f1
authored
4 years ago
by
Maximilien Naveau
Committed by
Olivier Stasse
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[dg plugins] re-package the smooth-reach plugins.
parent
fd002b2d
No related branches found
No related tags found
No related merge requests found
Pipeline
#12619
passed with warnings
4 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/CMakeLists.txt
+1
-0
1 addition, 0 deletions
src/CMakeLists.txt
src/tools/smooth-reach-python.h
+3
-0
3 additions, 0 deletions
src/tools/smooth-reach-python.h
src/tools/smooth-reach.hpp
+0
-73
0 additions, 73 deletions
src/tools/smooth-reach.hpp
with
4 additions
and
73 deletions
src/CMakeLists.txt
+
1
−
0
View file @
358877f1
...
...
@@ -61,6 +61,7 @@ SET(plugins
tools/exp-moving-avg
tools/gradient-ascent
tools/parameter-server
tools/smooth-reach
control/control-gr
control/control-pd
...
...
This diff is collapsed.
Click to expand it.
src/tools/smooth-reach-python.h
0 → 100644
+
3
−
0
View file @
358877f1
#include
<sot/core/smooth-reach.hh>
typedef
boost
::
mpl
::
vector
<
dynamicgraph
::
sot
::
SmoothReach
>
entities_t
;
This diff is collapsed.
Click to expand it.
src/tools/smooth-reach.hpp
deleted
100644 → 0
+
0
−
73
View file @
fd002b2d
/*
* Copyright 2010,
* François Bleibel,
* Olivier Stasse,
*
* CNRS/AIST
*
*/
#include
<dynamic-graph/factory.h>
#include
<sot/core/debug.hh>
#include
<sot/core/smooth-reach.hh>
using
namespace
dynamicgraph
;
using
namespace
dynamicgraph
::
sot
;
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN
(
SmoothReach
,
"SmoothReach"
);
SmoothReach
::
SmoothReach
(
const
std
::
string
&
name
)
:
Entity
(
name
)
,
start
(
0
),
goal
(
0
),
startTime
(
-
1
),
lengthTime
(
-
1
),
isStarted
(
false
),
isParam
(
true
)
,
startSIN
(
NULL
,
"SmoothReach("
+
name
+
")::input(vector)::start"
),
goalSOUT
(
boost
::
bind
(
&
SmoothReach
::
goalSOUT_function
,
this
,
_1
,
_2
),
sotNOSIGNAL
"SmoothReach("
+
name
+
")::output(vector)::goal"
)
{
sotDEBUGIN
(
5
);
signalRegistration
(
startSIN
<<
goalSOUT
);
sotDEBUGOUT
(
5
);
}
double
smoothFunction
(
double
x
)
{
return
x
;
}
dynamicgraph
::
Vector
&
SmoothReach
::
goalSOUT_function
(
dynamicgraph
::
Vector
&
goal
,
const
int
&
time
)
{
if
(
isParam
)
{
start
=
startSIN
(
time
);
startTime
=
time
;
assert
(
start
.
size
()
==
goal
.
size
());
isParam
=
false
;
isStarted
=
true
;
}
if
(
isReady
)
{
double
x
=
double
(
time
-
start
)
/
length
;
if
(
x
>
1
)
x
=
1
;
double
x1
=
smoothFunction
(
x
);
double
x0
=
1
-
x1
;
goal
=
start
*
x0
+
goal
*
x1
;
}
return
goal
;
}
void
SmoothReach
::
gset
(
const
dynamicgraph
::
Vector
&
goalDes
,
const
int
&
lengthDes
)
{
goal
=
goalDes
;
length
=
lengthDes
;
isParam
=
true
;
}
const
dynamicgraph
::
Vector
&
SmoothReach
::
getGoal
(
void
)
{
return
goal
;
}
const
int
&
SmoothReach
::
getLength
(
void
)
{
return
length
;
}
const
int
&
SmoothReach
::
getStart
(
void
)
{
return
start
;
}
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