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
Stack Of Tasks
jrl-walkgen
Commits
13da923f
Commit
13da923f
authored
13 years ago
by
Andrei
Browse files
Options
Downloads
Patches
Plain Diff
Initialization
- Add initialization - Add acceleration and position dynamics
parent
eb425d08
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
src/PreviewControl/rigid-body.cpp
+19
-7
19 additions, 7 deletions
src/PreviewControl/rigid-body.cpp
src/PreviewControl/rigid-body.hh
+8
-6
8 additions, 6 deletions
src/PreviewControl/rigid-body.hh
with
27 additions
and
13 deletions
src/PreviewControl/rigid-body.cpp
+
19
−
7
View file @
13da923f
...
...
@@ -28,9 +28,14 @@ using namespace PatternGeneratorJRL;
using
namespace
std
;
RigidBody
::
RigidBody
()
:
T_
(
0
),
Ta_
(
0
),
N_
(
0
),
Mass_
(
0
)
T_
(
0
),
Tr_
(
0
),
Ta_
(
0
),
N_
(
0
),
Mass_
(
0
)
{
PositionDynamics_
.
Type
=
POSITION
;
VelocityDynamics_
.
Type
=
VELOCITY
;
AccelerationDynamics_
.
Type
=
ACCELERATION
;
JerkDynamics_
.
Type
=
JERK
;
}
...
...
@@ -73,12 +78,16 @@ RigidBody::increment_state(double Control)
// ACCESSORS:
// ----------
RigidBody
::
linear_dynamics_t
const
&
RigidBody
::
Dynamics
(
const
int
t
ype
)
const
RigidBody
::
Dynamics
(
const
int
T
ype
)
const
{
switch
(
t
ype
)
switch
(
T
ype
)
{
case
POSITION
:
return
PositionDynamics_
;
case
VELOCITY
:
return
VelocityDynamics_
;
case
ACCELERATION
:
return
AccelerationDynamics_
;
case
JERK
:
return
JerkDynamics_
;
}
...
...
@@ -88,12 +97,16 @@ RigidBody::Dynamics( const int type ) const
}
RigidBody
::
linear_dynamics_t
&
RigidBody
::
Dynamics
(
const
int
t
ype
)
RigidBody
::
Dynamics
(
const
int
T
ype
)
{
switch
(
t
ype
)
switch
(
T
ype
)
{
case
POSITION
:
return
PositionDynamics_
;
case
VELOCITY
:
return
VelocityDynamics_
;
case
ACCELERATION
:
return
AccelerationDynamics_
;
case
JERK
:
return
JerkDynamics_
;
}
...
...
@@ -136,14 +149,13 @@ void
RigidBody
::
rigid_body_state_t
::
reset
()
{
// Redimension
X
.
resize
(
3
,
false
);
Y
.
resize
(
3
,
false
);
Z
.
resize
(
3
,
false
);
Yaw
.
resize
(
3
,
false
);
Pitch
.
resize
(
3
,
false
);
Roll
.
resize
(
3
,
false
);
// Set to zero
X
.
clear
();
Y
.
clear
();
Z
.
clear
();
...
...
This diff is collapsed.
Click to expand it.
src/PreviewControl/rigid-body.hh
+
8
−
6
View file @
13da923f
...
...
@@ -96,7 +96,7 @@ namespace PatternGeneratorJRL
/// \brief State matrix
boost_ublas
::
matrix
<
double
>
S
;
unsigned
int
Type
;
int
Type
;
};
typedef
linear_dynamics_s
linear_dynamics_t
;
/// \}
...
...
@@ -136,9 +136,8 @@ namespace PatternGeneratorJRL
/// \name Accessors
/// \{
linear_dynamics_t
const
&
Dynamics
(
int
type
)
const
;
linear_dynamics_t
&
Dynamics
(
int
type
);
linear_dynamics_t
const
&
Dynamics
(
int
Type
)
const
;
linear_dynamics_t
&
Dynamics
(
int
Type
);
inline
double
const
&
SamplingPeriodSim
(
)
const
{
return
T_
;
}
...
...
@@ -149,6 +148,11 @@ namespace PatternGeneratorJRL
{
return
Ta_
;
}
inline
void
SamplingPeriodAct
(
double
Ta
)
{
Ta_
=
Ta
;
}
inline
double
const
&
Mass
(
)
const
{
return
Mass_
;
}
inline
void
Mass
(
double
Mass
)
{
Mass_
=
Mass
;
}
/// \}
...
...
@@ -178,8 +182,6 @@ namespace PatternGeneratorJRL
/// \brief Sampling period actuators
double
Ta_
;
/// \brief Nb previewed samples
unsigned
int
N_
;
...
...
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