PRBonn / kiss-icp

A LiDAR odometry pipeline that just works
https://www.ipb.uni-bonn.de/wp-content/papercite-data/pdf/vizzo2023ral.pdf
MIT License
1.54k stars 312 forks source link

The conversion matrix from the Ego_motion ontology to the world coordinate system was used for optimization #393

Closed kanhw closed 1 week ago

kanhw commented 1 month ago

Thank you very much for your great work! I'm a beginner in kiss-icp,I used this directly on the car and found that the error in the Z-axis direction was huge, so I have an immature idea: using the ontology to world coordinate system conversion matrix(from GPS or RTK) as the initial value, then using it as the initial_guess of the first frame for calculation, Only the first frame uses it and then using initial_guess = self.last_pose @ self.last_delta to calculate, Whether such an option is feasible? My partial code is as follows: `

class KissICP:

def __init__(self, config: KISSConfig, initial_pose=None):

    self.last_pose = initial_pose if initial_pose is not None else np.eye(4) 
    self.last_delta = np.eye(4)
    self.is_first_frame = True
    self.config = config
    self.compensator = get_motion_compensator(config)
    self.adaptive_threshold = get_threshold_estimator(self.config)
    self.registration = get_registration(self.config)
    self.local_map = get_voxel_hash_map(self.config)
    self.preprocess = get_preprocessor(self.config)

...

    if self.is_first_frame:

        initial_guess = self.last_pose
        self.is_first_frame = False
    else:
        initial_guess = self.last_pose @ self.last_delta

` initial_pose is the first frame of the ego_motion.Looking forward to your reply.

benemer commented 2 weeks ago

Of course, you can use a different initial pose, but this effectively just changes the reference frame for the odometry, and it should not affect the following estimation.