Class Calibration
Defined in File calibration.hpp
Class Documentation
-
class Calibration
Class that handles the calibration correction for Universal Robots.
Universal robots provide a factory calibration of their DH parameters to exactly estimate their TCP pose using forward kinematics. However, those DH parameters construct a kinematic chain that can be very long, as upper arm and lower arm segments can be drawn out of their physical position by multiple meters (even above 100m can occur).
This class helps creating a kinematic chain, that is as close as possible to the physical model, by dragging the upper and lower arm segments back to their zero position.
Public Functions
-
virtual ~Calibration()
-
void correctChain()
Corrects a UR kinematic chain in such a way that shoulder and elbow offsets are 0.
-
inline std::vector<Eigen::Matrix4d> getChain()
Get the transformation matrix representation of the chain as constructed by the DH parameters.
This will contain twice as many transformation matrices as joints, as for each set of DH parameters two matrices are generated. If you’d like to receive one matrix per joint instead, use the getSimplified() function instead.
- Returns:
A vector of 4x4 transformation matrices, two for each joint going from the base to the tcp.
-
std::vector<Eigen::Matrix4d> getSimplified() const
Get the transformation matrix representation of the chain, where each joint is represented by one matrix.
- Returns:
Vector of 4x4 transformation matrices, one for each joint going from the base to the tcp.
-
YAML::Node toYaml() const
Generates a yaml representation of all transformation matrices as returned by getSimplified()
- Returns:
A YAML tree representing all transformation matrices.
-
Eigen::Matrix4d calcForwardKinematics(const Eigen::Matrix<double, 6, 1> &joint_values, const size_t link_nr = 6)
Calculates the forwart kinematics given a joint configuration with respect to the base link.
- Parameters:
joint_values – Joint values for which the forward kinematics should be calculated.
link_nr – If given, the cartesian position for this joint (starting at 1) is returned. By default the 6th joint is used.
- Returns:
Transformation matrix giving the full pose of the requested link in base coordinates.
-
virtual ~Calibration()