Skip to content

Commit

Permalink
Fix:numerical type conversion issue in transformLidar; Remove redun…
Browse files Browse the repository at this point in the history
…dant dependency
  • Loading branch information
HViktorTsoi committed Jul 18, 2023
1 parent e0c90f7 commit 8ec4ab0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ find_package(catkin REQUIRED COMPONENTS

find_package(Eigen3 REQUIRED)
find_package(PCL 1.8 REQUIRED)
find_package(GTSAM REQUIRED QUIET)
#find_package(GTSAM REQUIRED QUIET)

message(Eigen: ${EIGEN3_INCLUDE_DIR})

Expand Down
4 changes: 2 additions & 2 deletions src/voxelMapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,8 @@ void transformLidar(const state_ikfom &state_point, const PointCloudXYZI::Ptr &i
for (size_t i = 0; i < input_cloud->size(); i++) {
pcl::PointXYZINormal p_c = input_cloud->points[i];
Eigen::Vector3d p_lidar(p_c.x, p_c.y, p_c.z);
// FIXME 这里需要处理LI外参
auto p_body = state_point.rot * (state_point.offset_R_L_I * p_lidar + state_point.offset_T_L_I) + state_point.pos;
// HACK we need to specify p_body as a V3D type!!!
V3D p_body = state_point.rot * (state_point.offset_R_L_I * p_lidar + state_point.offset_T_L_I) + state_point.pos;
PointType pi;
pi.x = p_body(0);
pi.y = p_body(1);
Expand Down

0 comments on commit 8ec4ab0

Please sign in to comment.