Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-fcl
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
Guilhem Saurel
hpp-fcl
Commits
bea72583
Commit
bea72583
authored
5 years ago
by
Joseph Mirabel
Browse files
Options
Downloads
Patches
Plain Diff
Fix Transform3f::inverse.
parent
46b8f40e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/hpp/fcl/math/transform.h
+8
-2
8 additions, 2 deletions
include/hpp/fcl/math/transform.h
src/math/transform.cpp
+0
-6
0 additions, 6 deletions
src/math/transform.cpp
src/narrowphase/details.h
+0
-6
0 additions, 6 deletions
src/narrowphase/details.h
with
8 additions
and
14 deletions
include/hpp/fcl/math/transform.h
+
8
−
2
View file @
bea72583
...
@@ -204,7 +204,7 @@ public:
...
@@ -204,7 +204,7 @@ public:
}
}
/// @brief inverse transform
/// @brief inverse transform
inline
Transform3f
&
inverse
()
inline
Transform3f
&
inverse
InPlace
()
{
{
matrix_set
=
false
;
matrix_set
=
false
;
q
=
q
.
conjugate
();
q
=
q
.
conjugate
();
...
@@ -212,6 +212,12 @@ public:
...
@@ -212,6 +212,12 @@ public:
return
*
this
;
return
*
this
;
}
}
/// @brief inverse transform
inline
Transform3f
inverse
()
{
return
Transform3f
(
R
.
transpose
(),
-
R
.
transpose
()
*
T
);
}
/// @brief inverse the transform and multiply with another
/// @brief inverse the transform and multiply with another
inline
Transform3f
inverseTimes
(
const
Transform3f
&
other
)
const
inline
Transform3f
inverseTimes
(
const
Transform3f
&
other
)
const
{
{
...
@@ -272,4 +278,4 @@ inline Quaternion3f fromAxisAngle(const Eigen::MatrixBase<Derived>& axis, FCL_RE
...
@@ -272,4 +278,4 @@ inline Quaternion3f fromAxisAngle(const Eigen::MatrixBase<Derived>& axis, FCL_RE
}
}
}
// namespace hpp
}
// namespace hpp
#endif
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/math/transform.cpp
+
0
−
6
View file @
bea72583
...
@@ -55,12 +55,6 @@ const Matrix3f& Transform3f::getRotationInternal() const
...
@@ -55,12 +55,6 @@ const Matrix3f& Transform3f::getRotationInternal() const
return
R
;
return
R
;
}
}
Transform3f
inverse
(
const
Transform3f
&
tf
)
{
Transform3f
res
(
tf
);
return
res
.
inverse
();
}
void
relativeTransform
(
const
Transform3f
&
tf1
,
const
Transform3f
&
tf2
,
void
relativeTransform
(
const
Transform3f
&
tf1
,
const
Transform3f
&
tf2
,
Transform3f
&
tf
)
Transform3f
&
tf
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/narrowphase/details.h
+
0
−
6
View file @
bea72583
...
@@ -73,9 +73,6 @@ namespace fcl {
...
@@ -73,9 +73,6 @@ namespace fcl {
const
Capsule
&
s2
,
const
Transform3f
&
tf2
,
const
Capsule
&
s2
,
const
Transform3f
&
tf2
,
Vec3f
*
contact_points
,
FCL_REAL
*
penetration_depth
,
Vec3f
*
normal_
)
Vec3f
*
contact_points
,
FCL_REAL
*
penetration_depth
,
Vec3f
*
normal_
)
{
{
Transform3f
tf2_inv
(
tf2
);
tf2_inv
.
inverse
();
Vec3f
pos1
(
tf2
.
transform
(
Vec3f
(
0.
,
0.
,
0.5
*
s2
.
lz
)));
// from distance function
Vec3f
pos1
(
tf2
.
transform
(
Vec3f
(
0.
,
0.
,
0.5
*
s2
.
lz
)));
// from distance function
Vec3f
pos2
(
tf2
.
transform
(
Vec3f
(
0.
,
0.
,
-
0.5
*
s2
.
lz
)));
Vec3f
pos2
(
tf2
.
transform
(
Vec3f
(
0.
,
0.
,
-
0.5
*
s2
.
lz
)));
Vec3f
s_c
=
tf1
.
getTranslation
();
Vec3f
s_c
=
tf1
.
getTranslation
();
...
@@ -111,9 +108,6 @@ namespace fcl {
...
@@ -111,9 +108,6 @@ namespace fcl {
const
Capsule
&
s2
,
const
Transform3f
&
tf2
,
const
Capsule
&
s2
,
const
Transform3f
&
tf2
,
FCL_REAL
&
dist
,
Vec3f
&
p1
,
Vec3f
&
p2
,
Vec3f
&
normal
)
FCL_REAL
&
dist
,
Vec3f
&
p1
,
Vec3f
&
p2
,
Vec3f
&
normal
)
{
{
Transform3f
tf2_inv
(
tf2
);
tf2_inv
.
inverse
();
Vec3f
pos1
(
tf2
.
transform
(
Vec3f
(
0.
,
0.
,
0.5
*
s2
.
lz
)));
Vec3f
pos1
(
tf2
.
transform
(
Vec3f
(
0.
,
0.
,
0.5
*
s2
.
lz
)));
Vec3f
pos2
(
tf2
.
transform
(
Vec3f
(
0.
,
0.
,
-
0.5
*
s2
.
lz
)));
Vec3f
pos2
(
tf2
.
transform
(
Vec3f
(
0.
,
0.
,
-
0.5
*
s2
.
lz
)));
Vec3f
s_c
=
tf1
.
getTranslation
();
Vec3f
s_c
=
tf1
.
getTranslation
();
...
...
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