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
2c7aa333
Commit
2c7aa333
authored
14 years ago
by
Francois Bleibel
Browse files
Options
Downloads
Patches
Plain Diff
Added forgotten cpp files.
parent
c7002b1b
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
src/math/op-point-modifier.cpp
+114
-0
114 additions, 0 deletions
src/math/op-point-modifier.cpp
src/sot/sot-h.cpp
+2
-2
2 additions, 2 deletions
src/sot/sot-h.cpp
with
116 additions
and
2 deletions
src/math/op-point-modifier.cpp
0 → 100644
+
114
−
0
View file @
2c7aa333
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* Copyright Projet JRL-Japan, 2007
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* File: sotOpPointModifior.cp
* Project: SOT
* Author: Nicolas Mansard
*
* Version control
* ===============
*
* $Id$
*
* Description
* ============
*
*
* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
#include
<dynamic-graph/all-signals.h>
#include
<sot-core/op-point-modifier.h>
#include
<sot-core/matrix-twist.h>
#include
<dynamic-graph/pool.h>
#include
<sot-core/factory.h>
using
namespace
std
;
using
namespace
sot
;
namespace
sot
{
SOT_FACTORY_ENTITY_PLUGIN
(
sotOpPointModifior
,
"OpPointModifior"
);
}
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
sotOpPointModifior
::
sotOpPointModifior
(
const
std
::
string
&
name
)
:
Entity
(
name
)
,
transformation
()
,
jacobianSIN
(
NULL
,
"OpPointModifior("
+
name
+
")::input(matrix)::jacobianIN"
)
,
positionSIN
(
NULL
,
"OpPointModifior("
+
name
+
")::input(matrixhomo)::positionIN"
)
,
jacobianSOUT
(
boost
::
bind
(
&
sotOpPointModifior
::
computeJacobian
,
this
,
_1
,
_2
),
jacobianSIN
,
"OpPointModifior("
+
name
+
")::output(matrix)::jacobian"
)
,
positionSOUT
(
boost
::
bind
(
&
sotOpPointModifior
::
computePosition
,
this
,
_1
,
_2
),
jacobianSIN
,
"OpPointModifior("
+
name
+
")::output(matrixhomo)::position"
)
{
signalRegistration
(
jacobianSIN
<<
positionSIN
<<
jacobianSOUT
<<
positionSOUT
);
sotDEBUGINOUT
(
15
);
}
ml
::
Matrix
&
sotOpPointModifior
::
computeJacobian
(
ml
::
Matrix
&
res
,
const
int
&
time
)
{
const
ml
::
Matrix
&
jacobian
=
jacobianSIN
(
time
);
sotMatrixTwist
V
(
transformation
);
res
=
V
*
jacobian
;
return
res
;
}
sotMatrixHomogeneous
&
sotOpPointModifior
::
computePosition
(
sotMatrixHomogeneous
&
res
,
const
int
&
time
)
{
sotDEBUGIN
(
15
);
sotDEBUGIN
(
15
)
<<
time
<<
" "
<<
positionSIN
.
getTime
()
<<
positionSOUT
.
getTime
()
<<
endl
;
const
sotMatrixHomogeneous
&
position
=
positionSIN
(
time
);
position
.
multiply
(
transformation
,
res
);
sotDEBUGOUT
(
15
);
return
res
;
}
void
sotOpPointModifior
::
setTransformation
(
const
sotMatrixHomogeneous
&
tr
)
{
transformation
=
tr
;
}
void
sotOpPointModifior
::
commandLine
(
const
std
::
string
&
cmdLine
,
std
::
istringstream
&
cmdArgs
,
std
::
ostream
&
os
)
{
if
(
cmdLine
==
"transfo"
)
{
sotMatrixHomogeneous
tr
;
cmdArgs
>>
tr
;
setTransformation
(
tr
);
}
else
if
(
cmdLine
==
"transfoSignal"
)
{
Signal
<
sotMatrixHomogeneous
,
int
>
&
sig
=
dynamic_cast
<
Signal
<
sotMatrixHomogeneous
,
int
>&
>
(
pool
.
getSignal
(
cmdArgs
));
setTransformation
(
sig
.
accessCopy
());
}
else
if
(
cmdLine
==
"getTransfo"
)
{
os
<<
"Transformation: "
<<
endl
<<
transformation
<<
endl
;
}
else
if
(
cmdLine
==
"help"
)
{
os
<<
"sotOpPointModifior"
<<
endl
<<
" - transfo MatrixHomo"
<<
endl
<<
" - transfoSignal ent.signal<matrixhomo>"
<<
endl
<<
" - getTransfo"
<<
endl
;
}
else
Entity
::
commandLine
(
cmdLine
,
cmdArgs
,
os
);
}
This diff is collapsed.
Click to expand it.
src/sot/sot-h.cpp
+
2
−
2
View file @
2c7aa333
...
...
@@ -31,14 +31,14 @@
using
namespace
std
;
using
namespace
sot
;
#ifdef VP_DEBUG
//
#ifdef VP_DEBUG
class
sotSOTH__INIT
{
public:
sotSOTH__INIT
(
void
)
{
sot
::
DebugTrace
::
openFile
();
}
};
sotSOTH__INIT
sotSOTH_initiator
;
#endif
//
#endif
/* --------------------------------------------------------------------- */
/* --- CLASS ----------------------------------------------------------- */
...
...
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