hku-mars/MARSIM

use mid-360 to scan the ground

surepay123456 opened this issue · 1 comments

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.



            <param name="drone_id" value="$(arg drone_id)"/>
            <param name="quadrotor_name" value="quad_$(arg drone_id)"/>
            <param name="uav_num" value="$(arg uav_num_)"/>
            <param name="is_360lidar" value="1"/>
            <param name="sensing_horizon" value="15.0"/>
            <param name="sensing_rate" value="10.0"/>
            <param name="estimation_rate" value="10.0"/>
            <param name="polar_resolution" value="0.2"/>
            <param name="yaw_fov" value="360.0"/>
            <param name="vertical_fov" value="90.0"/>
            <param name="min_raylength" value="1.0"/>
            <param name="livox_linestep" value="1.4"/>
            <param name="curvature_limit" value="100.0"/>
            <param name="hash_cubesize" value="5.0"/>
            <param name="use_avia_pattern" value="0"/>
            <param name="use_vlp32_pattern" value="0"/>
            <param name="use_minicf_pattern" value="1"/>

            <param name="downsample_res" value="$(arg downsample_resolution_)"/>

            <param name="dynobj_enable" value="0"/>
            <param name="dynobject_size" value="0.8"/>
            <param name="dynobject_num" value="10"/>
            <param name="dyn_mode" value="0"/><!-- 0 for a=0, 1 for a=g, 2 for random walk -->
            <param name="dyn_velocity" value="1.0"/>

            <param name="use_uav_extra_model" value="$(arg use_uav_extra_model_)"/>

            <!-- collision parameter -->
            <param name="collisioncheck_enable" value="0"/>
            <param name="collision_range" value="0.3"/>
            <param name="output_pcd" value="0"/>
        </node>
    </group>`

How do i param it? thanks.
image

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`