Class OptimizationOffsets

Class Documentation

class OptimizationOffsets

Combined parser and configuration for calibration offsets. Holds the configuration of what is to be calibrated, and and parses the actual adjustments from the free parameters.

Public Functions

OptimizationOffsets()
inline virtual ~OptimizationOffsets()
bool add(const std::string name)

Tell the parser we wish to calibrate an active joint or other single parameter.

Parameters:

name – The name of the joint, e.g. “shoulder_pan_joint”

bool addFrame(const std::string name, bool calibrate_x, bool calibrate_y, bool calibrate_z, bool calibrate_roll, bool calibrate_pitch, bool calibrate_yaw)

Tell the parser we wish to calibrate a fixed joint.

Parameters:

name – The name of the fixed joint, e.g. “head_camera_rgb_joint”

bool set(const std::string name, double value)

Set the values for a single parameter.

Parameters:

name – The name of the joint, e.g. “shoulder_pan_joint”

bool setFrame(const std::string name, double x, double y, double z, double roll, double pitch, double yaw)

Set the values for a frame.

Parameters:

name – The name of the fixed joint, e.g. “head_camera_rgb_joint”

bool initialize(double *free_params)

Initialize the free_params.

bool update(const double *const free_params)

Update the offsets based on free_params from ceres-solver.

double get(const std::string name) const

Get the offset.

bool getFrame(const std::string name, KDL::Frame &offset) const

Get the offset for a frame calibration.

Parameters:
  • name – The name of the fixed joint, e.g. “head_camera_rgb_joint”

  • offset – The KDL::Frame to fill in the offset.

Returns:

True if there is an offset to apply, false if otherwise.

size_t size()
Returns:

The number of free parameters being parsed

bool reset()

Clear free parameters, but retain values for multi-step calirations.

bool loadOffsetYAML(const std::string &filename)

Load all the current offsets from a YAML.

std::string getOffsetYAML()

Get all the current offsets as a YAML.

std::string updateURDF(const std::string &urdf)

Update the urdf with the new offsets.