17 #ifndef JOINTCONFIGURATION_H 18 #define JOINTCONFIGURATION_H 25 #include <sensor_msgs/JointState.h> 38 :
std::runtime_error(error_desc)
54 const std::vector<double>&
config,
58 const std::vector<double>& config,
59 const moveit::core::RobotModelConstPtr& robot_model);
63 void setJoint(
const size_t index,
const double value);
64 double getJoint(
const size_t index)
const;
65 const std::vector<double> getJoints()
const;
69 moveit_msgs::Constraints toGoalConstraints()
const override;
70 moveit_msgs::RobotState toMoveitMsgsRobotState()
const override;
72 sensor_msgs::JointState toSensorMsg()
const;
74 robot_state::RobotState toRobotState()
const;
79 moveit_msgs::RobotState toMoveitMsgsRobotStateWithoutModel()
const;
80 moveit_msgs::RobotState toMoveitMsgsRobotStateWithModel()
const;
82 moveit_msgs::Constraints toGoalConstraintsWithoutModel()
const;
83 moveit_msgs::Constraints toGoalConstraintsWithModel()
const;
96 return robot_model_? toGoalConstraintsWithModel() :
97 toGoalConstraintsWithoutModel();
102 return robot_model_? toMoveitMsgsRobotStateWithModel() :
103 toMoveitMsgsRobotStateWithoutModel();
108 joints_.at(index) = value;
113 return joints_.at(index);
123 return joints_.size();
128 create_joint_name_func_ = create_joint_name_func;
133 #endif // JOINTCONFIGURATION_H JointConfigurationException(const std::string error_desc)
moveit_msgs::Constraints toGoalConstraints() const override
std::vector< double > joints_
Joint positions.
std::size_t size(custom_string const &s)
std::function< std::string(const size_t &)> CreateJointNameFunc
double getJoint(const size_t index) const
Class to define a robot configuration in space with the help of joint values.
void setCreateJointNameFunc(CreateJointNameFunc create_joint_name_func)
const std::vector< double > getJoints() const
void setJoint(const size_t index, const double value)
std::ostream & operator<<(std::ostream &, const CartesianConfiguration &)
Class to define robot configuration in space.
moveit_msgs::RobotState toMoveitMsgsRobotState() const override
CreateJointNameFunc create_joint_name_func_