Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
ndcurves
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
loco-3d
ndcurves
Commits
e9a4e8aa
Commit
e9a4e8aa
authored
5 years ago
by
Pierre Fernbach
Browse files
Options
Downloads
Patches
Plain Diff
[so3] fix initialization and copy of angular_velocity member
parent
6796c8f5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/curves/so3_linear.h
+18
-11
18 additions, 11 deletions
include/curves/so3_linear.h
with
18 additions
and
11 deletions
include/curves/so3_linear.h
+
18
−
11
View file @
e9a4e8aa
...
...
@@ -35,8 +35,10 @@ struct SO3Linear : public curve_abc<Time, Numeric, Safe, Eigen::Matrix<Numeric,
/// \brief constructor with initial and final rotation and time bounds
SO3Linear
(
const
quaternion_t
&
init_rot
,
const
quaternion_t
&
end_rot
,
const
time_t
t_min
,
const
time_t
t_max
)
:
curve_abc_t
(),
dim_
(
3
),
init_rot_
(
init_rot
),
end_rot_
(
end_rot
),
angular_vel_
(),
T_min_
(
t_min
),
T_max_
(
t_max
)
{
angular_vel_
=
log3
(
init_rot_
.
toRotationMatrix
().
transpose
()
*
end_rot_
.
toRotationMatrix
())
/
(
T_max_
-
T_min_
);
:
curve_abc_t
(),
dim_
(
3
),
init_rot_
(
init_rot
),
end_rot_
(
end_rot
),
angular_vel_
(
log3
(
init_rot
.
toRotationMatrix
().
transpose
()
*
end_rot
.
toRotationMatrix
())
/
(
t_max
-
t_min
)),
T_min_
(
t_min
),
T_max_
(
t_max
)
{
safe_check
();
}
...
...
@@ -46,17 +48,20 @@ struct SO3Linear : public curve_abc<Time, Numeric, Safe, Eigen::Matrix<Numeric,
dim_
(
3
),
init_rot_
(
quaternion_t
(
init_rot
)),
end_rot_
(
quaternion_t
(
end_rot
)),
angular_vel_
(),
angular_vel_
(
log3
(
init_rot
.
transpose
()
*
end_rot
)
/
(
t_max
-
t_min
)
),
T_min_
(
t_min
),
T_max_
(
t_max
)
{
angular_vel_
=
log3
(
init_rot
.
transpose
()
*
end_rot
)
/
(
T_max_
-
T_min_
);
T_max_
(
t_max
)
{
safe_check
();
}
/// \brief constructor with initial and final rotation, time bounds are set to [0;1]
SO3Linear
(
const
quaternion_t
&
init_rot
,
const
quaternion_t
&
end_rot
)
:
curve_abc_t
(),
dim_
(
3
),
init_rot_
(
init_rot
),
end_rot_
(
end_rot
),
angular_vel_
(),
T_min_
(
0.
),
T_max_
(
1.
)
{
angular_vel_
=
log3
(
init_rot_
.
toRotationMatrix
().
transpose
()
*
end_rot_
.
toRotationMatrix
());
:
curve_abc_t
(),
dim_
(
3
),
init_rot_
(
init_rot
),
end_rot_
(
end_rot
),
angular_vel_
(
log3
(
init_rot
.
toRotationMatrix
().
transpose
()
*
end_rot
.
toRotationMatrix
())),
T_min_
(
0.
),
T_max_
(
1.
)
{
safe_check
();
}
/// \brief constructor with initial and final rotation expressed as rotation matrix, time bounds are set to [0;1]
...
...
@@ -65,10 +70,11 @@ struct SO3Linear : public curve_abc<Time, Numeric, Safe, Eigen::Matrix<Numeric,
dim_
(
3
),
init_rot_
(
quaternion_t
(
init_rot
)),
end_rot_
(
quaternion_t
(
end_rot
)),
angular_vel_
(),
angular_vel_
(
log3
(
init_rot
.
toRotationMatrix
().
transpose
()
*
end_rot
.
toRotationMatrix
())
),
T_min_
(
0.
),
T_max_
(
1.
)
{
angular_vel_
=
log3
(
init_rot_
.
toRotationMatrix
().
transpose
()
*
end_rot_
.
toRotationMatrix
());
T_max_
(
1.
)
{
safe_check
();
}
/// \brief Destructor
...
...
@@ -80,6 +86,7 @@ struct SO3Linear : public curve_abc<Time, Numeric, Safe, Eigen::Matrix<Numeric,
:
dim_
(
other
.
dim_
),
init_rot_
(
other
.
init_rot_
),
end_rot_
(
other
.
end_rot_
),
angular_vel_
(
other
.
angular_vel_
),
T_min_
(
other
.
T_min_
),
T_max_
(
other
.
T_max_
)
{}
...
...
@@ -136,7 +143,7 @@ struct SO3Linear : public curve_abc<Time, Numeric, Safe, Eigen::Matrix<Numeric,
/*Attributes*/
std
::
size_t
dim_
;
// const
quaternion_t
init_rot_
,
end_rot_
;
point3_t
angular_vel_
;
point3_t
angular_vel_
;
// const
time_t
T_min_
,
T_max_
;
// const
/*Attributes*/
...
...
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