Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Q
quadruped-reactive-walking
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
Gepetto
quadruped-reactive-walking
Commits
92c9223b
Commit
92c9223b
authored
3 years ago
by
odri
Browse files
Options
Downloads
Patches
Plain Diff
Modify acc, x_err, dx_ref in InvKin
parent
94b50c7f
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/InvKin.cpp
+6
-48
6 additions, 48 deletions
src/InvKin.cpp
with
6 additions
and
48 deletions
src/InvKin.cpp
+
6
−
48
View file @
92c9223b
...
...
@@ -125,79 +125,37 @@ void InvKin::refreshAndCompute(Matrix14 const& contacts, Matrix43 const& pgoals,
// Gather all acceleration references in a single vector
// Feet tracking task
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
if
(
contacts
(
0
,
i
)
==
1.0
)
// Feet in contact
{
acc
.
block
(
0
,
3
*
i
,
1
,
3
).
setZero
();
}
else
// Feet not in contact
{
acc
.
block
(
0
,
3
*
i
,
1
,
3
)
=
afeet
.
row
(
i
);
}
acc
.
block
(
0
,
3
*
i
,
1
,
3
)
=
afeet
.
row
(
i
);
}
// Base orientation task
acc
.
block
(
0
,
12
,
1
,
3
)
=
awbasis
.
transpose
();
// Base / feet position task
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
if
(
contacts
(
0
,
i
)
==
1.0
)
// Feet in contact
{
acc
.
block
(
0
,
15
+
3
*
i
,
1
,
3
)
=
abasis
.
transpose
()
-
afeet
.
row
(
i
);
}
else
// Feet not in contact
{
acc
.
block
(
0
,
15
+
3
*
i
,
1
,
3
).
setZero
();
}
acc
.
block
(
0
,
15
+
3
*
i
,
1
,
3
)
=
abasis
.
transpose
()
-
afeet
.
row
(
i
);
}
// Gather all task errors in a single vector
// Feet tracking task
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
if
(
contacts
(
0
,
i
)
==
1.0
)
// Feet in contact
{
x_err
.
block
(
0
,
3
*
i
,
1
,
3
).
setZero
();
}
else
// Feet not in contact
{
x_err
.
block
(
0
,
3
*
i
,
1
,
3
)
=
pfeet_err
.
row
(
i
);
}
x_err
.
block
(
0
,
3
*
i
,
1
,
3
)
=
pfeet_err
.
row
(
i
);
}
// Base orientation task
x_err
.
block
(
0
,
12
,
1
,
3
)
=
rotb_err_
.
transpose
();
// Base / feet position task
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
if
(
contacts
(
0
,
i
)
==
1.0
)
// Feet in contact
{
x_err
.
block
(
0
,
15
+
3
*
i
,
1
,
3
)
=
posb_err_
.
transpose
()
-
pfeet_err
.
row
(
i
);
}
else
// Feet not in contact
{
x_err
.
block
(
0
,
15
+
3
*
i
,
1
,
3
).
setZero
();
}
x_err
.
block
(
0
,
15
+
3
*
i
,
1
,
3
)
=
posb_err_
.
transpose
()
-
pfeet_err
.
row
(
i
);
}
// Gather all task velocity references in a single vector
// Feet tracking task
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
if
(
contacts
(
0
,
i
)
==
1.0
)
// Feet in contact
{
dx_r
.
block
(
0
,
3
*
i
,
1
,
3
).
setZero
();
}
else
// Feet not in contact
{
dx_r
.
block
(
0
,
3
*
i
,
1
,
3
)
=
vfeet_ref
.
row
(
i
);
}
dx_r
.
block
(
0
,
3
*
i
,
1
,
3
)
=
vfeet_ref
.
row
(
i
);
}
// Base orientation task
dx_r
.
block
(
0
,
12
,
1
,
3
)
=
wb_ref_
.
transpose
();
// Base / feet position task
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
if
(
contacts
(
0
,
i
)
==
1.0
)
// Feet in contact
{
dx_r
.
block
(
0
,
15
+
3
*
i
,
1
,
3
)
=
vb_ref_
.
transpose
()
-
vfeet_ref
.
row
(
i
);
}
else
// Feet not in contact
{
dx_r
.
block
(
0
,
15
+
3
*
i
,
1
,
3
).
setZero
();
}
dx_r
.
block
(
0
,
15
+
3
*
i
,
1
,
3
)
=
vb_ref_
.
transpose
()
-
vfeet_ref
.
row
(
i
);
}
// Jacobian inversion using damped pseudo inverse
...
...
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