Constrain gravity to be positive. (#1756)
This makes sure gravity never flips the sign and becomes negative. Signed-off-by: Wolfgang Hess <whess@lyft.com>master
							parent
							
								
									1b31c017c4
								
							
						
					
					
						commit
						ca8a866996
					
				|  | @ -441,6 +441,9 @@ void OptimizationProblem3D::Solve( | ||||||
|             C_nodes.at(second_node_id).rotation(), |             C_nodes.at(second_node_id).rotation(), | ||||||
|             trajectory_data.imu_calibration.data()); |             trajectory_data.imu_calibration.data()); | ||||||
|       } |       } | ||||||
|  | 
 | ||||||
|  |       // Force gravity constant to be positive.
 | ||||||
|  |       problem.SetParameterLowerBound(&trajectory_data.gravity_constant, 0, 0.0); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue