MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / getRigidBodyTransform

Function getRigidBodyTransform

grid_map_pcl/src/helpers.cpp:104–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104Eigen::Affine3f getRigidBodyTransform(const Eigen::Vector3d& translation, const Eigen::Vector3d& intrinsicRpy) {
105 Eigen::Affine3f rigidBodyTransform;
106 rigidBodyTransform.setIdentity();
107 rigidBodyTransform.translation() << translation.x(), translation.y(), translation.z();
108 Eigen::Matrix3f rotation(Eigen::Matrix3f::Identity());
109 rotation *= getRotationMatrix(intrinsicRpy.x(), XYZ::X);
110 rotation *= getRotationMatrix(intrinsicRpy.y(), XYZ::Y);
111 rotation *= getRotationMatrix(intrinsicRpy.z(), XYZ::Z);
112 rigidBodyTransform.rotate(rotation);
113
114 return rigidBodyTransform;
115}
116
117Eigen::Matrix3f getRotationMatrix(double angle, XYZ axis) {
118 Eigen::Matrix3f rotationMatrix = Eigen::Matrix3f::Identity();

Callers 1

Calls 1

getRotationMatrixFunction · 0.85

Tested by

no test coverage detected