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
502d6cd8
Commit
502d6cd8
authored
5 years ago
by
Pierre Fernbach
Browse files
Options
Downloads
Patches
Plain Diff
add operator == in SE3
parent
cfc6e563
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
include/curves/se3_curve.h
+35
-0
35 additions, 0 deletions
include/curves/se3_curve.h
with
35 additions
and
0 deletions
include/curves/se3_curve.h
+
35
−
0
View file @
502d6cd8
...
@@ -150,6 +150,41 @@ struct SE3Curve : public curve_abc<Time, Numeric, Safe, Eigen::Transform<Numeric
...
@@ -150,6 +150,41 @@ struct SE3Curve : public curve_abc<Time, Numeric, Safe, Eigen::Transform<Numeric
return
res
;
return
res
;
}
}
/**
* @brief isApprox check if other and *this are equals, given a precision treshold.
* This test is done by discretizing, it should be re-implemented in the child class to check exactly
* all the members.
* @param other the other curve to check
* @param order the order up to which the derivatives of the curves are checked for equality
* @param prec the precision treshold, default Eigen::NumTraits<Numeric>::dummy_precision()
* @return true is the two curves are approximately equals
*/
virtual
bool
isApprox
(
const
SE3Curve_t
&
other
,
const
Numeric
prec
=
Eigen
::
NumTraits
<
Numeric
>::
dummy_precision
(),
const
size_t
order
=
5
)
const
{
//std::cout<<"is approx in SE3 called."<<std::endl;
(
void
)
order
;
// silent warning, order is not used in this class.
return
T_min_
==
other
.
min
()
&&
T_max_
==
other
.
max
()
&&
(
translation_curve_
==
other
.
translation_curve_
||
translation_curve_
->
isApprox
(
*
other
.
translation_curve_
,
prec
))
&&
(
rotation_curve_
==
other
.
rotation_curve_
||
rotation_curve_
->
isApprox
(
*
other
.
rotation_curve_
,
prec
));
}
virtual
bool
operator
==
(
const
SE3Curve_t
&
other
)
const
{
return
isApprox
(
other
);
}
virtual
bool
operator
!=
(
const
SE3Curve_t
&
other
)
const
{
return
!
(
*
this
==
other
);
}
virtual
bool
operator
==
(
const
curve_abc_t
&
other
)
const
{
return
curve_abc_t
::
isApprox
(
other
);
}
virtual
bool
operator
!=
(
const
curve_abc_t
&
other
)
const
{
return
!
curve_abc_t
::
isApprox
(
other
);
}
/// \brief Evaluation of the derivative of order N of spline at time t.
/// \brief Evaluation of the derivative of order N of spline at time t.
/// \param t : the time when to evaluate the spline.
/// \param t : the time when to evaluate the spline.
/// \param order : order of derivative.
/// \param order : order of derivative.
...
...
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