Open liamm545 opened 3 months ago
Hello I have the same problem with liosam
Hi, @Zahra-Farajzadeh I think wrong imu-lidar calibration is the reason. When i change extrinsicRot by unit matirx, odometry looks a bit shaky, but the above issue has been resolved.
Hi @liamm545 my extrinsic matrixes are identity matrix this is my config file `lio_sam:
pointCloudTopic: "/velodyne_points" # Point cloud data imuTopic: "/imu/data" # IMU data odomTopic: "odometry/imu" # IMU pre-preintegration odometry, same frequency as IMU gpsTopic: "odometry/gps" # GPS odometry topic from navsat, see module_navsat.launch file
lidarFrame: "base_link" baselinkFrame: "base_link" odometryFrame: "odom" mapFrame: "map"
useImuHeadingInitialization: true # if using GPS data, set to "true" useGpsElevation: false # if GPS elevation is bad, set to "false" gpsCovThreshold: 2.0 # m^2, threshold for using GPS data poseCovThreshold: 1.0 # m^2, threshold for using GPS data
savePCD: true # https://github.com/TixiaoShan/LIO-SAM/issues/3 savePCDDirectory: "/home/slam/Zahra/output/" # use global path, and end with "/"
sensor: velodyne # lidar sensor type, either 'velodyne' or 'ouster' N_SCAN: 80 # number of lidar channel (i.e., 16, 32, 64, 128) Horizon_SCAN: 1800 # lidar horizontal resolution (Velodyne:1800, Ouster:512,1024,2048) downsampleRate: 2 # default: 1. Downsample your data if too many points. i.e., 16 = 64 / 4, 16 = 16 / 1 lidarMinRange: 1.0 # default: 1.0, minimum lidar range to be used lidarMaxRange: 1000.0 # default: 1000.0, maximum lidar range to be used
imuAccNoise: 0.009939570888238808e-03 imuGyrNoise: 0.005636343949698187e-03 imuAccBiasN: 0.64356659353532566e-03 imuGyrBiasN: 0.35640318696367613e-03 imuGravity: 9.80511 imuRPYWeight: 0.01
extrinsicTrans: [0, 0.0, 0.0] extrinsicRot: [1, 0, 0, 0, 1, 0, 0, 0, 1] extrinsicRPY: [1, 0, 0, 0, 1, 0, 0, 0, 1]
edgeThreshold: 1.0 surfThreshold: 0.1 edgeFeatureMinValidNum: 10 surfFeatureMinValidNum: 100
odometrySurfLeafSize: 0.4 # default: 0.4 - outdoor, 0.2 - indoor mappingCornerLeafSize: 0.2 # default: 0.2 - outdoor, 0.1 - indoor mappingSurfLeafSize: 0.4 # default: 0.4 - outdoor, 0.2 - indoor
z_tollerance: 1000 # meters rotation_tollerance: 1000 # radians
numberOfCores: 20 # number of cores for mapping optimization mappingProcessInterval: 0.15 # seconds, regulate mapping frequency
surroundingkeyframeAddingDistThreshold: 1.0 # meters, regulate keyframe adding threshold
surroundingkeyframeAddingAngleThreshold: 0.2 # radians, regulate keyframe adding threshold
surroundingKeyframeDensity: 2.0 # meters, downsample surrounding keyframe poses
surroundingKeyframeSearchRadius: 50.0 # meters, within n meters scan-to-map optimization (when loop closure disabled)
loopClosureEnableFlag: true loopClosureFrequency: 0.5 # Hz, regulate loop closure constraint add frequency surroundingKeyframeSize: 50 # submap size (when loop closure enabled) historyKeyframeSearchRadius: 15.0 # meters, key frame that is within n meters from current pose will be considerd for loop closure historyKeyframeSearchTimeDiff: 30.0 # seconds, key frame that is n seconds older will be considered for loop closure historyKeyframeSearchNum: 25 # number of hostory key frames will be fused into a submap for loop closure historyKeyframeFitnessScore: 0.3 # icp threshold, the smaller the better alignment
globalMapVisualizationSearchRadius: 1000.0 # meters, global map visualization radius globalMapVisualizationPoseDensity: 10.0 # meters, global map visualization keyframe density globalMapVisualizationLeafSize: 1.0 # meters, global map visualization cloud density = 0.2
navsat: frequency: 50 wait_for_datum: false delay: 0.0 magnetic_declination_radians: 0 yaw_offset: 0 zero_altitude: true broadcast_utm_transform: false broadcast_utm_transform_as_parent_frame: false publish_filtered_gps: false
ekf_gps: publish_tf: false map_frame: map odom_frame: odom base_link_frame: base_link world_frame: odom
frequency: 50 two_d_mode: false sensor_timeout: 0.01
imu0: /imu/data
imu0_config: [false, false, false, true, true, true, false, false, false, # linear velocity false, false, true, # angular velocity true, true, true] # linear acc imu0_differential: false imu0_queue_size: 50 imu0_remove_gravitational_acceleration: true
odom0: "odometry/gps" odom0_config: [true, true, true, false, false, false, false, false, false, false, false, false, false, false, false] odom0_differential: false odom0_queue_size: 10
process_noise_covariance: [ 1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.03, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.04, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.015] `
I tried to use gps and I followed the repo. I changed the imu0
value from imu_correct
to imu/data
.
this is navsat launch
file:
`
<arg name="project" default="lio_sam"/>
<env name="ROSCONSOLE_CONFIG_FILE" value="$(find lio_sam)/launch/include/rosconsole/rosconsole_error.conf"/>
<!-- EKF GPS-->
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_gps" respawn="true">
<remap from="odometry/filtered" to="odometry/navsat" />
</node>
<!-- Navsat -->
<node pkg="robot_localization" type="navsat_transform_node" name="navsat" respawn="true">
<!-- <rosparam param="datum">[42.35893211, -71.09345588, 0.0, world, base_link]</rosparam> -->
<remap from="imu/data" to="/imu/data" />
<remap from="gps/fix" to="gps/fix" />
<remap from="odometry/filtered" to="odometry/navsat" />
</node>
`
in following photo the path is odom/gps
and the white path is liosam path and odom/imu
path is exactly on the liosam path
the following photos, the path ofodom/gps
is going far from the liosam and odom/imu
path.
and finally at duration of ~600 the liosam path is going to jittering and not working. we checked the bag file using fastliosam and it is working correctly.
the output point cloud is this:
My data has been recorded in the centre of the city and somewhere the GPS signal would be disconnected. The 'odom/imu' and 'liosam' paths are exactly correlated and the distance between them and 'odom/gps' is too great.
Do you know what is the problem? How can I increase the weight of using gps data where the gps signal is not poor?
Hi, @Zahra-Farajzadeh. I'm sorry for the late reply.
I think you should modify gpsCovThreshold and poseCovThreshold params. Also you can check(debug) gps data in "mapOptimization.cpp" (Especially "addGPSFactor" function)
I'm sorry I couldn't be of any help.
This is my case.
If you look at this picture, you can see the difference between gps odometry and imu odometry. (The small axis is imu odometry, and the relatively large axis at the bottom is gps odometry.)
Although there are differences between IMU odometry and GPS odometry, during the map generation process, optimization is performed, which helps the odometries stay similar.
And although there were differences between IMU odometry and GPS odometry at first, you can see that the map is well-constructed as optimization and loop closure are eventually performed.
I recommend that you run it with SC-LIO-SAM.
Thanks.
Hello. I'm currently using lio-sam and have a question about it.
I am using a Velodyne VLP16 LiDAR and a 9-axis IMU sensor, but I'm encountering a "Large velocity, reset IMU-preintegration!" error, which is causing the map to become distorted.
So i checked the value of the velocity in "imuPreintegration.cpp" file.
As observed, I noticed significant spikes in velocity even when the vehicle was stationary. However, it seems there are no issues with the IMU sensor readings (attached below).
What could be the problem? I would appreciate your assistance. Thank you.