cartographer-project / cartographer

Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Apache License 2.0
7.04k stars 2.24k forks source link

Why add frozen nodes as optimization variables? #1838

Open acf986 opened 3 years ago

acf986 commented 3 years ago

In optimization_problem_2d.cc, line 279~287 there is:

for (const auto& node_id_data : node_data_) {  
    const bool frozen =  
        frozen_trajectories.count(node_id_data.id.trajectory_id) != 0;  
    C_nodes.Insert(node_id_data.id, FromPose(node_id_data.data.global_pose_2d));  
    problem.AddParameterBlock(C_nodes.at(node_id_data.id).data(), 3);  
    if (frozen) {  
      problem.SetParameterBlockConstant(C_nodes.at(node_id_data.id).data());  
    }  
  }  

The above code adds the node from 'nodedata' to the optimization problem, and sets it as constant if it is considered frozen (the node belongs to a frozen trajectory).

I understand that a 'frozen submaps' can be used to construct INTERSUMAP constraints, but when will the 'frozen node'_ be used? It seems they are not used in any constraints?