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
74449d1e
Commit
74449d1e
authored
14 years ago
by
Nicolas Mansard
Browse files
Options
Downloads
Patches
Plain Diff
Added new-style commands.
parent
09171141
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/sot/core/feature-point6d-relative.hh
+2
-1
2 additions, 1 deletion
include/sot/core/feature-point6d-relative.hh
src/feature/feature-point6d-relative.cpp
+28
-9
28 additions, 9 deletions
src/feature/feature-point6d-relative.cpp
with
30 additions
and
10 deletions
include/sot/core/feature-point6d-relative.hh
+
2
−
1
View file @
74449d1e
...
...
@@ -103,7 +103,8 @@ class SOTFEATUREPOINT6DRELATIVE_EXPORT FeaturePoint6dRelative
virtual
void
commandLine
(
const
std
::
string
&
cmdLine
,
std
::
istringstream
&
cmdArgs
,
std
::
ostream
&
os
);
void
initCommands
(
void
);
void
initSdes
(
const
std
::
string
&
featureDesiredName
);
}
;
...
...
This diff is collapsed.
Click to expand it.
src/feature/feature-point6d-relative.cpp
+
28
−
9
View file @
74449d1e
...
...
@@ -31,6 +31,7 @@
#include
<sot/core/matrix-rotation.hh>
#include
<sot/core/matrix-twist.hh>
#include
<dynamic-graph/pool.h>
#include
<dynamic-graph/all-commands.h>
using
namespace
std
;
using
namespace
dynamicgraph
::
sot
;
...
...
@@ -70,6 +71,7 @@ FeaturePoint6dRelative( const string& pointName )
signalRegistration
(
dotpositionSIN
<<
dotpositionReferenceSIN
<<
errordotSOUT
);
initCommands
();
}
...
...
@@ -284,6 +286,31 @@ display( std::ostream& os ) const
}
void
FeaturePoint6dRelative
::
initCommands
(
void
)
{
using
namespace
command
;
addCommand
(
"initSdes"
,
makeCommandVoid1
(
*
this
,
&
FeaturePoint6dRelative
::
initSdes
,
docCommandVoid1
(
"Initialize the desired feature."
,
"string (desired feature name)"
)));
}
/* Initialise the reference value: set up the sdes signal of the current feature,
* and freezes the position and position-reference of the desired feature.
*/
void
FeaturePoint6dRelative
::
initSdes
(
const
std
::
string
&
nameSdes
)
{
FeaturePoint6dRelative
&
sdes
=
dynamic_cast
<
FeaturePoint6dRelative
&>
(
g_pool
.
getEntity
(
nameSdes
));
const
int
timeCurr
=
positionSIN
.
getTime
()
+
1
;
positionSIN
.
recompute
(
timeCurr
);
positionReferenceSIN
.
recompute
(
timeCurr
);
sdes
.
positionSIN
.
setConstant
(
positionSIN
.
accessCopy
()
);
sdes
.
positionReferenceSIN
.
setConstant
(
positionReferenceSIN
.
accessCopy
()
);
}
void
FeaturePoint6dRelative
::
commandLine
(
const
std
::
string
&
cmdLine
,
std
::
istringstream
&
cmdArgs
,
...
...
@@ -301,15 +328,7 @@ commandLine( const std::string& cmdLine,
if
(
cmdArgs
.
good
())
{
std
::
string
nameSdes
;
cmdArgs
>>
nameSdes
;
FeaturePoint6dRelative
&
sdes
=
dynamic_cast
<
FeaturePoint6dRelative
&>
(
g_pool
.
getEntity
(
nameSdes
));
const
int
timeCurr
=
positionSIN
.
getTime
()
+
1
;
positionSIN
.
recompute
(
timeCurr
);
positionReferenceSIN
.
recompute
(
timeCurr
);
sdes
.
positionSIN
.
setConstant
(
positionSIN
.
accessCopy
()
);
sdes
.
positionReferenceSIN
.
setConstant
(
positionReferenceSIN
.
accessCopy
()
);
initSdes
(
nameSdes
);
}
}
else
...
...
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