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
eb5a846f
Commit
eb5a846f
authored
10 years ago
by
andreadelprete
Browse files
Options
Downloads
Patches
Plain Diff
Make methods of Device virtuals so that they can be overloaded by subclasses
parent
f6c550d6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/sot/core/device.hh
+21
-25
21 additions, 25 deletions
include/sot/core/device.hh
with
21 additions
and
25 deletions
include/sot/core/device.hh
+
21
−
25
View file @
eb5a846f
...
...
@@ -48,17 +48,17 @@ namespace dynamicgraph {
public:
static
const
std
::
string
CLASS_NAME
;
virtual
const
std
::
string
&
getClassName
(
void
)
const
{
return
CLASS_NAME
;
return
CLASS_NAME
;
}
enum
ForceSignalSource
{
FORCE_SIGNAL_RLEG
,
FORCE_SIGNAL_LLEG
,
FORCE_SIGNAL_RARM
,
FORCE_SIGNAL_LARM
FORCE_SIGNAL_RLEG
,
FORCE_SIGNAL_LLEG
,
FORCE_SIGNAL_RARM
,
FORCE_SIGNAL_LARM
};
protected
:
ml
::
Vector
state_
;
ml
::
Vector
velocity_
;
...
...
@@ -69,24 +69,24 @@ namespace dynamicgraph {
PeriodicCall
periodicCallBefore_
;
PeriodicCall
periodicCallAfter_
;
public
:
/* --- CONSTRUCTION --- */
Device
(
const
std
::
string
&
name
);
/* --- DESTRUCTION --- */
virtual
~
Device
();
void
setStateSize
(
const
unsigned
int
&
size
);
void
setState
(
const
ml
::
Vector
&
st
);
virtual
void
setStateSize
(
const
unsigned
int
&
size
);
virtual
void
setState
(
const
ml
::
Vector
&
st
);
void
setVelocitySize
(
const
unsigned
int
&
size
);
void
setVelocity
(
const
ml
::
Vector
&
vel
);
void
setSecondOrderIntegration
();
void
increment
(
const
double
&
dt
=
5e-2
);
virtual
void
setVelocity
(
const
ml
::
Vector
&
vel
);
virtual
void
setSecondOrderIntegration
();
virtual
void
increment
(
const
double
&
dt
=
5e-2
);
public
:
/* --- DISPLAY --- */
virtual
void
display
(
std
::
ostream
&
os
)
const
;
SOT_CORE_EXPORT
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
Device
&
r
)
{
r
.
display
(
os
);
return
os
;
operator
<<
(
std
::
ostream
&
os
,
const
Device
&
r
)
{
r
.
display
(
os
);
return
os
;
}
public
:
/* --- SIGNALS --- */
...
...
@@ -110,11 +110,11 @@ namespace dynamicgraph {
public
:
/* --- COMMANDS --- */
void
commandLine
(
const
std
::
string
&
,
std
::
istringstream
&
,
std
::
ostream
&
){}
std
::
ostream
&
){}
protected
:
/// Compute roll pitch yaw angles of freeflyer joint.
void
integrateRollPitchYaw
(
ml
::
Vector
&
state
,
const
ml
::
Vector
&
control
,
double
dt
);
double
dt
);
/// Store Position of free flyer joint
MatrixHomogeneous
ffPose_
;
/// Compute the new position, from the current control.
...
...
@@ -123,8 +123,8 @@ namespace dynamicgraph {
/// Get freeflyer pose
const
MatrixHomogeneous
&
freeFlyerPose
()
const
;
public
:
void
setRoot
(
const
ml
::
Matrix
&
root
);
void
setRoot
(
const
MatrixHomogeneous
&
worldMwaist
);
virtual
void
setRoot
(
const
ml
::
Matrix
&
root
);
virtual
void
setRoot
(
const
MatrixHomogeneous
&
worldMwaist
);
private
:
// Intermediate variable to avoid dynamic allocation
ml
::
Vector
forceZero6
;
...
...
@@ -134,7 +134,3 @@ namespace dynamicgraph {
#endif
/* #ifndef SOT_DEVICE_HH */
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