Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
J
jrl-walkgen
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Guilhem Saurel
jrl-walkgen
Commits
36e88479
Commit
36e88479
authored
13 years ago
by
Francois Keith
Browse files
Options
Downloads
Patches
Plain Diff
Add methods to initialize the Polynome of degree 5/6
With initial position, velocity, acceleration.
parent
e103e7cb
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
src/Mathematics/PolynomeFoot.cpp
+16
-0
16 additions, 0 deletions
src/Mathematics/PolynomeFoot.cpp
src/Mathematics/PolynomeFoot.h
+9
-1
9 additions, 1 deletion
src/Mathematics/PolynomeFoot.h
with
25 additions
and
1 deletion
src/Mathematics/PolynomeFoot.cpp
+
16
−
0
View file @
36e88479
...
...
@@ -153,6 +153,8 @@ void Polynome5::SetParameters(double FT, double FP,
m_Coefficients
[
5
]
=
(
-
1.0
/
2.0
*
InitAcc
*
FT
*
FT
-
3.0
*
InitSpeed
*
FT
-
6.0
*
InitPos
+
6.0
*
FP
)
/
tmp
;
}
Polynome5
::~
Polynome5
()
{}
Polynome6
::
Polynome6
(
double
FT
,
double
MP
)
:
Polynome
(
6
)
{
...
...
@@ -175,6 +177,20 @@ void Polynome6::SetParameters(double FT, double MP)
m_Coefficients
[
6
]
=
-
64
*
MP
/
tmp
;
}
void
Polynome6
::
SetParameters
(
double
FT
,
double
PM
,
double
InitPos
,
double
InitSpeed
,
double
InitAcc
)
{
m_Coefficients
[
0
]
=
InitPos
;
m_Coefficients
[
1
]
=
InitSpeed
;
m_Coefficients
[
2
]
=
0.5
*
InitAcc
;
m_Coefficients
[
3
]
=
-
0.5
*
(
5
*
FT
*
FT
*
InitAcc
+
32
*
InitSpeed
*
FT
+
84
*
InitPos
-
128
*
PM
)
/
(
FT
*
FT
*
FT
);
m_Coefficients
[
4
]
=
0.5
*
(
76
*
InitSpeed
*
FT
+
222
*
InitPos
-
384
*
PM
+
9
*
FT
*
FT
*
InitAcc
)
/
(
FT
*
FT
*
FT
*
FT
);
m_Coefficients
[
5
]
=
-
0.5
*
(
204
*
InitPos
+
66
*
InitSpeed
*
FT
-
384
*
PM
+
7
*
FT
*
FT
*
InitAcc
)
/
(
FT
*
FT
*
FT
*
FT
*
FT
);
m_Coefficients
[
6
]
=
(
-
64
*
PM
+
32
*
InitPos
+
10
*
InitSpeed
*
FT
+
FT
*
FT
*
InitAcc
)
/
(
FT
*
FT
*
FT
*
FT
*
FT
*
FT
);
}
Polynome6
::~
Polynome6
()
{
}
...
...
This diff is collapsed.
Click to expand it.
src/Mathematics/PolynomeFoot.h
+
9
−
1
View file @
36e88479
...
...
@@ -56,12 +56,14 @@ namespace PatternGeneratorJRL
/*! Set the parameters
This method assumes implicitly a position
set to zero, and a speed equals to zero.
Final velocity is 0
*/
void
SetParameters
(
double
FT
,
double
FP
);
/*! Set the parameters such that
the initial position, and initial speed
are different from zero.
Final velocity is 0
*/
void
SetParametersWithInitPosInitSpeed
(
double
FT
,
double
FP
,
...
...
@@ -82,11 +84,14 @@ namespace PatternGeneratorJRL
Polynome4
(
double
FT
,
double
MP
);
/// Set the parameters
// Initial velocity and position are 0
// Final velocity and position are 0
void
SetParameters
(
double
FT
,
double
MP
);
/*! Set the parameters such that
the initial position, and initial speed
are different from zero.
Final velocity and position are 0
*/
void
SetParametersWithInitPosInitSpeed
(
double
FT
,
double
MP
,
...
...
@@ -122,7 +127,6 @@ namespace PatternGeneratorJRL
/// \brief Set parameters considering initial position, velocity, acceleration
void
SetParameters
(
double
FT
,
double
FP
,
double
InitPos
,
double
InitSpeed
,
double
InitAcc
);
/// Destructor.
~
Polynome5
();
...
...
@@ -138,7 +142,11 @@ namespace PatternGeneratorJRL
Polynome6
(
double
FT
,
double
MP
);
/// Set the parameters
// Initial acceleration, velocity and position by default 0
// Final acceleration, velocity and position are 0
void
SetParameters
(
double
FT
,
double
MP
);
void
SetParameters
(
double
FT
,
double
PM
,
double
InitPos
,
double
InitSpeed
,
double
InitAcc
);
/// Destructor.
~
Polynome6
();
...
...
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