Skip to content

Commit f24216c

Browse files
tobifalkcassava
authored andcommitted
models: Add utility function for coordinate transformation
1 parent 8d31704 commit f24216c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

models/include/cloe/utility/geometry.hpp

+8
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ inline Eigen::Isometry3d pose_from_rotation_translation(const Eigen::Quaterniond
5151
return pose;
5252
}
5353

54+
/**
55+
* Change a point's frame of reference.
56+
* Both the point and the child frame need to have the same parent frame.
57+
*/
58+
inline void transform_to_child_frame(const Eigen::Isometry3d& child_frame, Eigen::Vector3d* point) {
59+
*point = child_frame.inverse() * (*point);
60+
}
61+
5462
} // namespace utility
5563
} // namespace cloe
5664

0 commit comments

Comments
 (0)