Control Libraries 7.4.0
Loading...
Searching...
No Matches
InverseKinematicsNotConvergingException.hpp
1#pragma once
2
3#include <exception>
4
5namespace robot_model::exceptions {
6class InverseKinematicsNotConvergingException : public std::exception {
7public:
8 InverseKinematicsNotConvergingException(unsigned int iterations, double error) :
9 msg_("The inverse kinematics algorithm did not converge.\nThe residual error after " + std::to_string(iterations) +
10 " iterations is " + std::to_string(error) + ".") {}
11
12 virtual char const *what() const noexcept {
13 return msg_.c_str();
14 }
15
16private:
17 std::string msg_;
18};
19}// namespace robot_model::exceptions