Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-dyninv
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Stack Of Tasks
sot-dyninv
Commits
10f3e443
Commit
10f3e443
authored
12 years ago
by
Nicolas Mansard
Browse files
Options
Downloads
Patches
Plain Diff
Finally, the active-set init-guess solver for inv kine.
parent
fb859b3a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/solver-kine.cpp
+0
-46
0 additions, 46 deletions
src/solver-kine.cpp
with
0 additions
and
46 deletions
src/solver-kine.cpp
+
0
−
46
View file @
10f3e443
...
@@ -178,25 +178,6 @@ namespace dynamicgraph
...
@@ -178,25 +178,6 @@ namespace dynamicgraph
controlSOUT
.
setReady
();
controlSOUT
.
setReady
();
}
}
/* --- NOTIFICATION HCOD ------------------------------------------------ */
struct
HCODUpdateCounter
{
void
operator
()
(
std
::
string
stage
,
soth
::
ConstraintRef
cst
,
std
::
string
event
)
{
if
(
!
onoff
)
return
;
//sotDEBUG(0)
//std::cout<< "At t="<<iter<<" [" << stage << "," << cst << "]: " << event << std::endl;
count
++
;
}
static
int
iter
;
static
int
count
;
static
bool
onoff
;
HCODUpdateCounter
()
{
count
=
0
;}
};
int
HCODUpdateCounter
::
count
=
0
;
int
HCODUpdateCounter
::
iter
=
0
;
bool
HCODUpdateCounter
::
onoff
=
true
;
/* --- INIT SOLVER ------------------------------------------------------ */
/* --- INIT SOLVER ------------------------------------------------------ */
/* --- INIT SOLVER ------------------------------------------------------ */
/* --- INIT SOLVER ------------------------------------------------------ */
...
@@ -227,17 +208,6 @@ namespace dynamicgraph
...
@@ -227,17 +208,6 @@ namespace dynamicgraph
btasks
.
resize
(
stack
.
size
());
btasks
.
resize
(
stack
.
size
());
relevantActiveSet
=
false
;
relevantActiveSet
=
false
;
// std::cout << controlSOUT.getTime() << std::endl;
// if( controlSOUT.getTime() == 10)
// {
// std::cout <<"Exceptionaly keep the aset." << std::endl;
// relevantActiveSet = true;
// activeSet[5] = soth::cstref_vector_t();
// activeSet[6] = soth::cstref_vector_t();
// activeSet.push_back(soth::cstref_vector_t());
// activeSet.push_back(soth::cstref_vector_t());
// }
int
i
=
0
;
int
i
=
0
;
BOOST_FOREACH
(
TaskAbstract
*
task
,
stack
)
BOOST_FOREACH
(
TaskAbstract
*
task
,
stack
)
{
{
...
@@ -251,7 +221,6 @@ namespace dynamicgraph
...
@@ -251,7 +221,6 @@ namespace dynamicgraph
}
}
solution
.
resize
(
nbDofs
);
solution
.
resize
(
nbDofs
);
hsolver
->
notifiorRegistration
(
HCODUpdateCounter
());
}
}
/* Return true iff the solver sizes fit to the task set. */
/* Return true iff the solver sizes fit to the task set. */
...
@@ -284,14 +253,11 @@ namespace dynamicgraph
...
@@ -284,14 +253,11 @@ namespace dynamicgraph
/* --- SIGNALS ---------------------------------------------------------- */
/* --- SIGNALS ---------------------------------------------------------- */
/* --- SIGNALS ---------------------------------------------------------- */
/* --- SIGNALS ---------------------------------------------------------- */
/* --- SIGNALS ---------------------------------------------------------- */
/* --- SIGNALS ---------------------------------------------------------- */
std
::
ofstream
fup
(
"/tmp/up.dat"
);
ml
::
Vector
&
SolverKine
::
ml
::
Vector
&
SolverKine
::
controlSOUT_function
(
ml
::
Vector
&
mlcontrol
,
int
t
)
controlSOUT_function
(
ml
::
Vector
&
mlcontrol
,
int
t
)
{
{
sotDEBUG
(
15
)
<<
" # In time = "
<<
t
<<
std
::
endl
;
sotDEBUG
(
15
)
<<
" # In time = "
<<
t
<<
std
::
endl
;
HCODUpdateCounter
::
iter
=
t
;
refreshTaskTime
(
t
);
refreshTaskTime
(
t
);
if
(
!
checkSolverSize
()
)
resizeSolver
();
if
(
!
checkSolverSize
()
)
resizeSolver
();
...
@@ -342,16 +308,10 @@ namespace dynamicgraph
...
@@ -342,16 +308,10 @@ namespace dynamicgraph
hsolver
->
setInitialActiveSet
(
activeSet
);
hsolver
->
setInitialActiveSet
(
activeSet
);
else
hsolver
->
setInitialActiveSet
();
else
hsolver
->
setInitialActiveSet
();
struct
timeval
t0
,
t1
;
gettimeofday
(
&
t0
,
NULL
);
sotDEBUG
(
1
)
<<
"Run for a solution."
<<
std
::
endl
;
sotDEBUG
(
1
)
<<
"Run for a solution."
<<
std
::
endl
;
hsolver
->
activeSearch
(
solution
);
hsolver
->
activeSearch
(
solution
);
sotDEBUG
(
1
)
<<
"solution = "
<<
(
MATLAB
)
solution
<<
std
::
endl
;
sotDEBUG
(
1
)
<<
"solution = "
<<
(
MATLAB
)
solution
<<
std
::
endl
;
gettimeofday
(
&
t1
,
NULL
);
time
=
((
t1
.
tv_sec
-
t0
.
tv_sec
)
+
(
t1
.
tv_usec
-
t0
.
tv_usec
)
/
1.0e6
);
activeSet
=
hsolver
->
getOptimalActiveSet
();
relevantActiveSet
=
true
;
activeSet
=
hsolver
->
getOptimalActiveSet
();
relevantActiveSet
=
true
;
if
(
controlFreeFloating
)
if
(
controlFreeFloating
)
...
@@ -365,12 +325,6 @@ namespace dynamicgraph
...
@@ -365,12 +325,6 @@ namespace dynamicgraph
control
=
solution
.
tail
(
nbDofs
-
6
);
control
=
solution
.
tail
(
nbDofs
-
6
);
}
}
fup
<<
t
<<
"
\t
"
<<
HCODUpdateCounter
::
count
<<
" "
<<
time
<<
" "
<<
hsolver
->
sizeA
();
fup
<<
std
::
endl
;
HCODUpdateCounter
::
count
=
0
;
sotDEBUG
(
1
)
<<
"control = "
<<
mlcontrol
<<
std
::
endl
;
sotDEBUG
(
1
)
<<
"control = "
<<
mlcontrol
<<
std
::
endl
;
return
mlcontrol
;
return
mlcontrol
;
}
}
...
...
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