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

Function getRotationMatrix

grid_map_pcl/src/helpers.cpp:117–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117Eigen::Matrix3f getRotationMatrix(double angle, XYZ axis) {
118 Eigen::Matrix3f rotationMatrix = Eigen::Matrix3f::Identity();
119 switch (axis) {
120 case XYZ::X: {
121 rotationMatrix = Eigen::AngleAxisf(angle, Eigen::Vector3f::UnitX());
122 break;
123 }
124 case XYZ::Y: {
125 rotationMatrix = Eigen::AngleAxisf(angle, Eigen::Vector3f::UnitY());
126 break;
127 }
128 case XYZ::Z: {
129 rotationMatrix = Eigen::AngleAxisf(angle, Eigen::Vector3f::UnitZ());
130 break;
131 }
132 default:
133 ROS_ERROR("Unknown axis while trying to rotate the pointcloud");
134 }
135 return rotationMatrix;
136}
137
138Eigen::Vector3d calculateMeanOfPointPositions(Pointcloud::ConstPtr inputCloud) {
139 Eigen::Vector3d mean = Eigen::Vector3d::Zero();

Callers 1

getRigidBodyTransformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected