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
ac1a34e1
Commit
ac1a34e1
authored
6 years ago
by
Joseph Mirabel
Committed by
Olivier Stasse
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update documentation of Device + minor changes
parent
f7dd7664
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
include/sot/core/device.hh
+19
-11
19 additions, 11 deletions
include/sot/core/device.hh
src/tools/device.cpp
+11
-10
11 additions, 10 deletions
src/tools/device.cpp
with
30 additions
and
21 deletions
include/sot/core/device.hh
+
19
−
11
View file @
ac1a34e1
...
...
@@ -75,7 +75,6 @@ namespace dynamicgraph {
protected
:
dg
::
Vector
state_
;
dg
::
Vector
velocity_
;
bool
vel_controlInit_
;
dg
::
Vector
vel_control_
;
ControlInput
controlInputType_
;
bool
withForceSignals
[
4
];
...
...
@@ -110,24 +109,33 @@ namespace dynamicgraph {
dynamicgraph
::
SignalPtr
<
dg
::
Vector
,
int
>
attitudeSIN
;
dynamicgraph
::
SignalPtr
<
dg
::
Vector
,
int
>
zmpSIN
;
/// \name Device current state.
/// \{
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
stateSOUT
;
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
velocitySOUT
;
dynamicgraph
::
Signal
<
MatrixRotation
,
int
>
attitudeSOUT
;
/*! \brief The current state of the robot from the command viewpoint. */
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
motorcontrolSOUT
;
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
previousControlSOUT
;
/*! \brief The ZMP reference send by the previous controller. */
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
ZMPPreviousControllerSOUT
;
/// \}
/// \name Real robot current state
/// This corresponds to the real encoders values and take into
/// account the stabilization step. Therefore, this usually
/// does *not* match the state control input signal.
///
/// \{
/// Motor positions
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
robotState_
;
/// Motor velocities
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
robotVelocity_
;
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
velocitySOUT
;
dynamicgraph
::
Signal
<
MatrixRotation
,
int
>
attitudeSOUT
;
/// The force torque sensors
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>*
forcesSOUT
[
4
];
/// Motor torques
/// \todo why pseudo ?
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
pseudoTorqueSOUT
;
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
previousControlSOUT
;
/*! \brief The current state of the robot from the command viewpoint. */
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
motorcontrolSOUT
;
/*! \brief The ZMP reference send by the previous controller. */
dynamicgraph
::
Signal
<
dg
::
Vector
,
int
>
ZMPPreviousControllerSOUT
;
/// \}
protected
:
/// Compute roll pitch yaw angles of freeflyer joint.
...
...
This diff is collapsed.
Click to expand it.
src/tools/device.cpp
+
11
−
10
View file @
ac1a34e1
...
...
@@ -99,11 +99,16 @@ Device( const std::string& n )
//,attitudeSIN(NULL,"Device::input(matrixRot)::attitudeIN")
,
velocitySOUT
(
"Device("
+
n
+
")::output(vector)::velocity"
)
,
attitudeSOUT
(
"Device("
+
n
+
")::output(matrixRot)::attitude"
)
,
pseudoTorque
SOUT
(
"Device("
+
n
+
")::output(vector)::
p
tor
que
"
)
,
motorcontrol
SOUT
(
"Device("
+
n
+
")::output(vector)::
mo
tor
control
"
)
,
previousControlSOUT
(
"Device("
+
n
+
")::output(vector)::previousControl"
)
,
motorcontrolSOUT
(
"Device("
+
n
+
")::output(vector)::motorcontrol"
)
,
ZMPPreviousControllerSOUT
(
"Device("
+
n
+
")::output(vector)::zmppreviouscontroller"
),
ffPose_
(),
forceZero6
(
6
)
,
ZMPPreviousControllerSOUT
(
"Device("
+
n
+
")::output(vector)::zmppreviouscontroller"
)
,
robotState_
(
"Device("
+
n
+
")::output(vector)::robotState"
)
,
robotVelocity_
(
"Device("
+
n
+
")::output(vector)::robotVelocity"
)
,
pseudoTorqueSOUT
(
"Device("
+
n
+
")::output(vector)::ptorque"
)
,
ffPose_
()
,
forceZero6
(
6
)
{
forceZero6
.
fill
(
0
);
/* --- SIGNALS --- */
...
...
@@ -378,12 +383,8 @@ void Device::integrate( const double & dt )
return
;
}
if
(
!
vel_controlInit_
)
{
vel_control_
=
Vector
(
controlIN
.
size
());
vel_control_
.
setZero
();
vel_controlInit_
=
true
;
}
if
(
vel_control_
.
size
()
==
0
)
vel_control_
=
Vector
::
Zero
(
controlIN
.
size
());
// If control size is state size - 6, integrate joint angles,
// if control and state are of same size, integrate 6 first degrees of
...
...
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