Template Function ouster::sdk::core::interp_pose(const Eigen::Ref<const Eigen::VectorX<T>>, const Eigen::Ref<const Eigen::VectorX<T>>, const Eigen::Ref<const PosesT<Scalar>>)

Function Documentation

template<typename T, typename Scalar>
PosesT<Scalar> ouster::sdk::core::interp_pose(const Eigen::Ref<const Eigen::VectorX<T>> x_interp, const Eigen::Ref<const Eigen::VectorX<T>> x_known, const Eigen::Ref<const PosesT<Scalar>> poses_known)

One-dimensional linear interpolation for monotonically increasing sample transformation matrices.

This function performs linear interpolation on a set of monotonically increasing and non-repeated x-coordinate values and their corresponding 4x4 pose matrices. It evaluates the interpolated poses at the specified x-coordinate values provided in x_interp.

Note

If x_interp contains values outside the range of x_known, the function uses the first two and last two poses to extrapolate accordingly.

Parameters:
  • x_interp[in] – A vector of x-coordinate values at which to compute the interpolated transformation matrices.

  • x_known[in] – A vector of x-coordinate values corresponding to the known transformation matrices. Must be monotonically increasing and not repeated.

  • poses_known[in] – A vector of 4x4 transformation matrices associated with each x-coordinate value in x_known.

Throws:

std::invalid_argument – if the sizes of x_known and poses_known do not match, if their sizes are less than 2, or if x_known is not monotonically increasing.

Returns:

A vector of 4x4 transformation matrices representing the interpolated poses at x-coordinate values given by x_interp.