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
57c4a27c
Commit
57c4a27c
authored
3 years ago
by
thomascbrs
Browse files
Options
Downloads
Patches
Plain Diff
Compute jerk for feet trajectories + python bindings (jerk and timing of flying period)
parent
b8de9810
No related branches found
Branches containing commit
No related tags found
1 merge request
!10
Merge devel croco 20/09/2021
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/qrw/FootTrajectoryGenerator.hpp
+4
-0
4 additions, 0 deletions
include/qrw/FootTrajectoryGenerator.hpp
python/gepadd.cpp
+7
-1
7 additions, 1 deletion
python/gepadd.cpp
src/FootTrajectoryGenerator.cpp
+7
-0
7 additions, 0 deletions
src/FootTrajectoryGenerator.cpp
with
18 additions
and
1 deletion
include/qrw/FootTrajectoryGenerator.hpp
+
4
−
0
View file @
57c4a27c
...
@@ -72,6 +72,9 @@ class FootTrajectoryGenerator {
...
@@ -72,6 +72,9 @@ class FootTrajectoryGenerator {
MatrixN
getFootPosition
()
{
return
position_
;
}
// Get the next foot position
MatrixN
getFootPosition
()
{
return
position_
;
}
// Get the next foot position
MatrixN
getFootVelocity
()
{
return
velocity_
;
}
// Get the next foot velocity
MatrixN
getFootVelocity
()
{
return
velocity_
;
}
// Get the next foot velocity
MatrixN
getFootAcceleration
()
{
return
acceleration_
;
}
// Get the next foot acceleration
MatrixN
getFootAcceleration
()
{
return
acceleration_
;
}
// Get the next foot acceleration
MatrixN
getFootJerk
()
{
return
jerk_
;
}
// Get the next foot jerk
Vector4
getT0s
()
{
return
t0s
;
}
// Get the t0s for each foot
Vector4
getTswing
()
{
return
t_swing
;
}
// Get the flying period for each foot
private
:
private
:
Gait
*
gait_
;
// Target lock before the touchdown
Gait
*
gait_
;
// Target lock before the touchdown
...
@@ -93,6 +96,7 @@ class FootTrajectoryGenerator {
...
@@ -93,6 +96,7 @@ class FootTrajectoryGenerator {
Matrix34
position_
;
// Position computed in updateFootPosition
Matrix34
position_
;
// Position computed in updateFootPosition
Matrix34
velocity_
;
// Velocity computed in updateFootPosition
Matrix34
velocity_
;
// Velocity computed in updateFootPosition
Matrix34
acceleration_
;
// Acceleration computed in updateFootPosition
Matrix34
acceleration_
;
// Acceleration computed in updateFootPosition
Matrix34
jerk_
;
// Jerk computed in updateFootPosition
Matrix34
position_base_
;
// Position computed in updateFootPosition in base frame
Matrix34
position_base_
;
// Position computed in updateFootPosition in base frame
Matrix34
velocity_base_
;
// Velocity computed in updateFootPosition in base frame
Matrix34
velocity_base_
;
// Velocity computed in updateFootPosition in base frame
...
...
This diff is collapsed.
Click to expand it.
python/gepadd.cpp
+
7
−
1
View file @
57c4a27c
...
@@ -194,13 +194,18 @@ struct FootTrajectoryGeneratorPythonVisitor : public bp::def_visitor<FootTraject
...
@@ -194,13 +194,18 @@ struct FootTrajectoryGeneratorPythonVisitor : public bp::def_visitor<FootTraject
.
def
(
"getFootPosition"
,
&
FootTrajectoryGenerator
::
getFootPosition
,
"Get position_ matrix.
\n
"
)
.
def
(
"getFootPosition"
,
&
FootTrajectoryGenerator
::
getFootPosition
,
"Get position_ matrix.
\n
"
)
.
def
(
"getFootVelocity"
,
&
FootTrajectoryGenerator
::
getFootVelocity
,
"Get velocity_ matrix.
\n
"
)
.
def
(
"getFootVelocity"
,
&
FootTrajectoryGenerator
::
getFootVelocity
,
"Get velocity_ matrix.
\n
"
)
.
def
(
"getFootAcceleration"
,
&
FootTrajectoryGenerator
::
getFootAcceleration
,
"Get acceleration_ matrix.
\n
"
)
.
def
(
"getFootAcceleration"
,
&
FootTrajectoryGenerator
::
getFootAcceleration
,
"Get acceleration_ matrix.
\n
"
)
.
def
(
"getFootJerk"
,
&
FootTrajectoryGenerator
::
getFootJerk
,
"Get jerk_ matrix.
\n
"
)
.
def
(
"initialize"
,
&
FootTrajectoryGenerator
::
initialize
,
bp
::
args
(
"params"
,
"gaitIn"
),
.
def
(
"initialize"
,
&
FootTrajectoryGenerator
::
initialize
,
bp
::
args
(
"params"
,
"gaitIn"
),
"Initialize FootTrajectoryGenerator from Python.
\n
"
)
"Initialize FootTrajectoryGenerator from Python.
\n
"
)
// Compute target location of footsteps from Python
// Compute target location of footsteps from Python
.
def
(
"update"
,
&
FootTrajectoryGenerator
::
update
,
bp
::
args
(
"k"
,
"targetFootstep"
),
.
def
(
"update"
,
&
FootTrajectoryGenerator
::
update
,
bp
::
args
(
"k"
,
"targetFootstep"
),
"Compute target location of footsteps from Python.
\n
"
);
"Compute target location of footsteps from Python.
\n
"
)
// Get flying period of the feet
.
def
(
"getT0s"
,
&
FootTrajectoryGenerator
::
getT0s
,
"Get the current timings of the flying feet.
\n
"
)
.
def
(
"getTswing"
,
&
FootTrajectoryGenerator
::
getTswing
,
"Get the flying period of the feet.
\n
"
);
}
}
...
@@ -452,6 +457,7 @@ struct ParamsPythonVisitor : public bp::def_visitor<ParamsPythonVisitor<Params>>
...
@@ -452,6 +457,7 @@ struct ParamsPythonVisitor : public bp::def_visitor<ParamsPythonVisitor<Params>>
.
def_readwrite
(
"h_ref"
,
&
Params
::
h_ref
)
.
def_readwrite
(
"h_ref"
,
&
Params
::
h_ref
)
.
def_readwrite
(
"shoulders"
,
&
Params
::
shoulders
)
.
def_readwrite
(
"shoulders"
,
&
Params
::
shoulders
)
.
def_readwrite
(
"lock_time"
,
&
Params
::
lock_time
)
.
def_readwrite
(
"lock_time"
,
&
Params
::
lock_time
)
.
def_readwrite
(
"vert_time"
,
&
Params
::
vert_time
)
.
def_readwrite
(
"footsteps_init"
,
&
Params
::
footsteps_init
)
.
def_readwrite
(
"footsteps_init"
,
&
Params
::
footsteps_init
)
.
def_readwrite
(
"footsteps_under_shoulders"
,
&
Params
::
footsteps_under_shoulders
);
.
def_readwrite
(
"footsteps_under_shoulders"
,
&
Params
::
footsteps_under_shoulders
);
...
...
This diff is collapsed.
Click to expand it.
src/FootTrajectoryGenerator.cpp
+
7
−
0
View file @
57c4a27c
...
@@ -17,6 +17,7 @@ FootTrajectoryGenerator::FootTrajectoryGenerator()
...
@@ -17,6 +17,7 @@ FootTrajectoryGenerator::FootTrajectoryGenerator()
position_
(
Matrix34
::
Zero
()),
position_
(
Matrix34
::
Zero
()),
velocity_
(
Matrix34
::
Zero
()),
velocity_
(
Matrix34
::
Zero
()),
acceleration_
(
Matrix34
::
Zero
()),
acceleration_
(
Matrix34
::
Zero
()),
jerk_
(
Matrix34
::
Zero
()),
position_base_
(
Matrix34
::
Zero
()),
position_base_
(
Matrix34
::
Zero
()),
velocity_base_
(
Matrix34
::
Zero
()),
velocity_base_
(
Matrix34
::
Zero
()),
acceleration_base_
(
Matrix34
::
Zero
())
{}
acceleration_base_
(
Matrix34
::
Zero
())
{}
...
@@ -152,6 +153,8 @@ void FootTrajectoryGenerator::updateFootPosition(int const j, Vector3 const &tar
...
@@ -152,6 +153,8 @@ void FootTrajectoryGenerator::updateFootPosition(int const j, Vector3 const &tar
velocity_
(
1
,
j
)
=
0.0
;
velocity_
(
1
,
j
)
=
0.0
;
acceleration_
(
0
,
j
)
=
0.0
;
acceleration_
(
0
,
j
)
=
0.0
;
acceleration_
(
1
,
j
)
=
0.0
;
acceleration_
(
1
,
j
)
=
0.0
;
jerk_
(
0
,
j
)
=
0.0
;
jerk_
(
1
,
j
)
=
0.0
;
}
else
{
}
else
{
position_
(
0
,
j
)
=
Ax
(
5
,
j
)
+
Ax
(
4
,
j
)
*
ev
+
Ax
(
3
,
j
)
*
std
::
pow
(
ev
,
2
)
+
Ax
(
2
,
j
)
*
std
::
pow
(
ev
,
3
)
+
position_
(
0
,
j
)
=
Ax
(
5
,
j
)
+
Ax
(
4
,
j
)
*
ev
+
Ax
(
3
,
j
)
*
std
::
pow
(
ev
,
2
)
+
Ax
(
2
,
j
)
*
std
::
pow
(
ev
,
3
)
+
Ax
(
1
,
j
)
*
std
::
pow
(
ev
,
4
)
+
Ax
(
0
,
j
)
*
std
::
pow
(
ev
,
5
);
Ax
(
1
,
j
)
*
std
::
pow
(
ev
,
4
)
+
Ax
(
0
,
j
)
*
std
::
pow
(
ev
,
5
);
...
@@ -165,11 +168,15 @@ void FootTrajectoryGenerator::updateFootPosition(int const j, Vector3 const &tar
...
@@ -165,11 +168,15 @@ void FootTrajectoryGenerator::updateFootPosition(int const j, Vector3 const &tar
2
*
Ax
(
3
,
j
)
+
3
*
2
*
Ax
(
2
,
j
)
*
ev
+
4
*
3
*
Ax
(
1
,
j
)
*
std
::
pow
(
ev
,
2
)
+
5
*
4
*
Ax
(
0
,
j
)
*
std
::
pow
(
ev
,
3
);
2
*
Ax
(
3
,
j
)
+
3
*
2
*
Ax
(
2
,
j
)
*
ev
+
4
*
3
*
Ax
(
1
,
j
)
*
std
::
pow
(
ev
,
2
)
+
5
*
4
*
Ax
(
0
,
j
)
*
std
::
pow
(
ev
,
3
);
acceleration_
(
1
,
j
)
=
acceleration_
(
1
,
j
)
=
2
*
Ay
(
3
,
j
)
+
3
*
2
*
Ay
(
2
,
j
)
*
ev
+
4
*
3
*
Ay
(
1
,
j
)
*
std
::
pow
(
ev
,
2
)
+
5
*
4
*
Ay
(
0
,
j
)
*
std
::
pow
(
ev
,
3
);
2
*
Ay
(
3
,
j
)
+
3
*
2
*
Ay
(
2
,
j
)
*
ev
+
4
*
3
*
Ay
(
1
,
j
)
*
std
::
pow
(
ev
,
2
)
+
5
*
4
*
Ay
(
0
,
j
)
*
std
::
pow
(
ev
,
3
);
jerk_
(
0
,
j
)
=
3
*
2
*
Ax
(
2
,
j
)
+
4
*
3
*
2
*
Ax
(
1
,
j
)
*
ev
+
5
*
4
*
3
*
Ax
(
0
,
j
)
*
std
::
pow
(
ev
,
2
);
jerk_
(
1
,
j
)
=
3
*
2
*
Ay
(
2
,
j
)
+
4
*
3
*
2
*
Ay
(
1
,
j
)
*
ev
+
5
*
4
*
3
*
Ay
(
0
,
j
)
*
std
::
pow
(
ev
,
2
);
}
}
velocity_
(
2
,
j
)
=
3
*
Az
(
3
,
j
)
*
std
::
pow
(
evz
,
2
)
+
4
*
Az
(
2
,
j
)
*
std
::
pow
(
evz
,
3
)
+
velocity_
(
2
,
j
)
=
3
*
Az
(
3
,
j
)
*
std
::
pow
(
evz
,
2
)
+
4
*
Az
(
2
,
j
)
*
std
::
pow
(
evz
,
3
)
+
5
*
Az
(
1
,
j
)
*
std
::
pow
(
evz
,
4
)
+
6
*
Az
(
0
,
j
)
*
std
::
pow
(
evz
,
5
);
5
*
Az
(
1
,
j
)
*
std
::
pow
(
evz
,
4
)
+
6
*
Az
(
0
,
j
)
*
std
::
pow
(
evz
,
5
);
acceleration_
(
2
,
j
)
=
2
*
3
*
Az
(
3
,
j
)
*
evz
+
3
*
4
*
Az
(
2
,
j
)
*
std
::
pow
(
evz
,
2
)
+
acceleration_
(
2
,
j
)
=
2
*
3
*
Az
(
3
,
j
)
*
evz
+
3
*
4
*
Az
(
2
,
j
)
*
std
::
pow
(
evz
,
2
)
+
4
*
5
*
Az
(
1
,
j
)
*
std
::
pow
(
evz
,
3
)
+
5
*
6
*
Az
(
0
,
j
)
*
std
::
pow
(
evz
,
4
);
4
*
5
*
Az
(
1
,
j
)
*
std
::
pow
(
evz
,
3
)
+
5
*
6
*
Az
(
0
,
j
)
*
std
::
pow
(
evz
,
4
);
jerk_
(
2
,
j
)
=
2
*
3
*
Az
(
3
,
j
)
+
3
*
4
*
2
*
Az
(
2
,
j
)
*
evz
+
4
*
5
*
3
*
Az
(
1
,
j
)
*
std
::
pow
(
evz
,
2
)
+
5
*
6
*
4
*
Az
(
0
,
j
)
*
std
::
pow
(
evz
,
3
);
position_
(
2
,
j
)
=
Az
(
3
,
j
)
*
std
::
pow
(
evz
,
3
)
+
Az
(
2
,
j
)
*
std
::
pow
(
evz
,
4
)
+
Az
(
1
,
j
)
*
std
::
pow
(
evz
,
5
)
+
position_
(
2
,
j
)
=
Az
(
3
,
j
)
*
std
::
pow
(
evz
,
3
)
+
Az
(
2
,
j
)
*
std
::
pow
(
evz
,
4
)
+
Az
(
1
,
j
)
*
std
::
pow
(
evz
,
5
)
+
Az
(
0
,
j
)
*
std
::
pow
(
evz
,
6
);
Az
(
0
,
j
)
*
std
::
pow
(
evz
,
6
);
}
}
...
...
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