# Livox HAP and GNSS data

**URL:** https://discourse.paraview.org/t/livox-hap-and-gnss-data/15745
**Category:** LidarView, Lidar, and SLAM
**Created:** [November 19, 2024, 11:08am UTC](https://discourse.paraview.org/t/livox-hap-and-gnss-data/15745 "2024-11-19T11:08:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Alvaro](https://discourse.paraview.org/user_avatar/discourse.paraview.org/alvaro/32/15496_2.png) [@Alvaro](https://discourse.paraview.org/u/Alvaro)
#### Post date: [November 19, 2024, 11:08am UTC](https://discourse.paraview.org/t/livox-hap-and-gnss-data/15745/1 "2024-11-19T11:08:12Z")

</div>

Hi,

I’m still trying out Lidarview with Livox HAP. In this case I’m trying to add GNSS data to reduce SLAM drift and torsion throughout a recording instead of using the IMU.  
I’m using the instructions from this link:  
[https://gitlab.kitware.com/keu-computervision/slam/-/blob/master/paraview\_wrapping/Plugin/doc/How\_to\_SLAM\_with\_LidarView.md?ref\_type=heads#external-sensors](https://gitlab.kitware.com/keu-computervision/slam/-/blob/master/paraview_wrapping/Plugin/doc/How_to_SLAM_with_LidarView.md?ref_type=heads#external-sensors)

When converting coordinates with PROJ to xyz I’ve tried several types of projections, axis rotations, and even an offset to start with the position at zero. Regardless of the method used, when loading it into lidarview, the adjustment of the trajectory and the point cloud seems quite random.

 ![Captura de pantalla 2024-11-18 111835](https://discourse.paraview.org/uploads/default/original/2X/7/76bed1d45e068fb8c02c2d95b997f27fb0fe595e.jpeg)

If I repeat the process with the same data, the rotation of the trajectory is different, but almost never close to the point cloud

 ![Captura de pantalla 2024-11-19 105412](https://discourse.paraview.org/uploads/default/original/2X/7/7e9aaca7844de0c57efb353509acd7e1bef317dd.jpeg)

Also, in most cases the point cloud does not readjust to the new trajectory and many times the software closes suddenly

Is there something I am doing wrong?  
According to the documentation, when the pcap carries the gnss data Lidarview does a conversion with PROJ. What type of projection does it use for the conversion? Does it do any other type of transformation?

Thank you very much

---

<div class="post-metadata">

### Author: ![Gatien\_Ferret](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gatien_ferret/32/9789_2.png) [@Gatien\_Ferret](https://discourse.paraview.org/u/Gatien_Ferret)
#### Post date: [November 19, 2024, 1:42pm UTC](https://discourse.paraview.org/t/livox-hap-and-gnss-data/15745/2 "2024-11-19T13:42:16Z")

</div>

Hi,

There are 3 important details to consider here :

- LidarView does not transmit the GNSS data from the pose reader to the SLAM (similarly as it doesn’t do it for the IMU). SLAM filter only takes input csv files. This link from pcap interpreter to SLAM is something that may be developped
- The LiDAR only SLAM does not know its orientation relatively to a georeferenced coordinate system. It assumes the first frame sensor coordinate system as the reference. There is an interface to input an initial pose (if you know the pose of the LiDAR in a coordinate system of interest, in that case the one of the GNSS sensor transformed with the LiDAR-GNSS transform)
- In order to be able to use the LiDAR-GNSS constraint (SLAM needs to be built with g2o), you need to input a calibration matrix (which can be computed). There is a calibration function available in LidarView SLAM interface for GNSS / LiDAR and LiDAR / INS. It requires movement in the 6 degrees of freedom. If known, the lever arm may be used to increase the accuracy. Relevant code may be found [here](https://gitlab.kitware.com/keu-computervision/slam/-/blob/master/paraview_wrapping/Plugin/vtkLidarSlam/vtkSlam.cxx?ref_type=heads#L964).

Note: To activate Pose graphe optimizaiton, an external sensor file shall be provied, ‘Use Pose Graph’ option shall be enabled and the optimization may be triggers with ‘Optimize Graph’
