| 156 | /** add factors with variable number of states - first level*/ |
| 157 | template <FactorType CurrentFactorType, typename... FactorParameters> |
| 158 | void addFactor( StateID ID1, |
| 159 | FactorParameters... Params) |
| 160 | { |
| 161 | /** compile time error for IMU pre-integration */ |
| 162 | static_assert(CurrentFactorType != FactorType::IMUPretintegration, "Do not use the default factor interface for IMU pre-integration factor! Use addIMUPreintegrationFactor() instead!"); |
| 163 | |
| 164 | StateList List; |
| 165 | List.add(ID1); |
| 166 | addFactor<CurrentFactorType>(List, Params...); |
| 167 | } |
| 168 | |
| 169 | /** in-between level */ |
| 170 | template <FactorType CurrentFactorType, typename... FactorParameters> |