hku-mars / MARSIM

MARSIM: A light-weight point-realistic simulator for LiDAR-based UAVs
GNU General Public License v2.0
311 stars 33 forks source link

use mid-360 to scan the ground #14

Closed surepay123456 closed 9 months ago

surepay123456 commented 1 year ago

I integrated it with fast-planner, and when i used the mid 360, the point cloud cannot scan the ground . I haved change the vertical_fov. But it didn't work.

` How do i param it? thanks. ![image](https://github.com/hku-mars/MARSIM/assets/47910015/34d7cf05-c20b-4cc3-9316-b5ef18c79b4d)
jackykongfz commented 1 year ago

It is caused by the -7 degree downward FoV angle of MID360 LiDAR, it is how the real MID360 LiDAR behaves. But you can add a rotation for the LiDAR sensing to simulate a tilt mounted LiDAR, just by changing the rot_body2lidar matrix in pointcloud_render_node.cpp (CPU version) ` Eigen::Matrix3d rot_body2lidar = Matrix3d::Identity();

// rotate lidar // Eigen::Vector3d eulerAngle_body2lidar(0,0.5236,0); // Eigen::AngleAxisd rollAngle(AngleAxisd(eulerAngle_body2lidar(0),Vector3d::UnitX())); // Eigen::AngleAxisd pitchAngle(AngleAxisd(eulerAngle_body2lidar(1),Vector3d::UnitY())); // Eigen::AngleAxisd yawAngle(AngleAxisd(eulerAngle_body2lidar(2),Vector3d::UnitZ())); // rot_body2lidar=yawAnglepitchAnglerollAngle; // rotate lidar end`