19 #ifndef ROBOT_CALIBRATION_CERES_OUTRAGEOUS_ERROR_H 20 #define ROBOT_CALIBRATION_CERES_OUTRAGEOUS_ERROR_H 23 #include <ceres/ceres.h> 49 double position_scaling,
50 double rotation_scaling) :
67 double * residuals)
const 103 double joint_scaling,
104 double position_scaling,
105 double rotation_scaling)
107 ceres::DynamicNumericDiffCostFunction<OutrageousError, ceres::CENTRAL> * func;
108 func =
new ceres::DynamicNumericDiffCostFunction<OutrageousError, ceres::CENTRAL>(
109 new OutrageousError(offsets, name, joint_scaling, position_scaling, rotation_scaling));
110 func->AddParameterBlock(offsets->
size());
111 func->SetNumResiduals(7);
112 return static_cast<ceres::CostFunction*
>(func);
124 #endif // ROBOT_CALIBRATION_CERES_OUTRAGEOUS_ERROR_H Error block to restrict the offsets generated by ceres-solver from becoming outrageously large...
CalibrationOffsetParser * offsets_
bool getFrame(const std::string name, KDL::Frame &offset) const
Get the offset for a frame calibration.
OutrageousError(CalibrationOffsetParser *offsets, std::string name, double joint_scaling, double position_scaling, double rotation_scaling)
Constructor for an error functor.
Combined parser and configuration for calibration offsets. Holds the configuration of what is to be c...
TFSIMD_FORCE_INLINE const tfScalar & y() const
virtual ~OutrageousError()
TFSIMD_FORCE_INLINE const tfScalar & x() const
Calibration code lives under this namespace.
double get(const std::string name) const
Get the offset.
void axis_magnitude_from_rotation(const KDL::Rotation &r, double &x, double &y, double &z)
Converts from KDL::Rotation to angle-axis-with-integrated-magnitude.
TFSIMD_FORCE_INLINE const tfScalar & z() const
static ceres::CostFunction * Create(CalibrationOffsetParser *offsets, std::string name, double joint_scaling, double position_scaling, double rotation_scaling)
Helper factory function to create a new error block.
bool update(const double *const free_params)
Update the offsets based on free_params from ceres-solver.
bool operator()(double const *const *free_params, double *residuals) const
Operator for ceres-solver to call.