1 #include <gtest/gtest.h> 6 #include <moveit/robot_model_loader/robot_model_loader.h> 17 rdf_loader::RDFLoader rdf_loader(
"robot_description");
19 const urdf::ModelInterfaceSharedPtr& urdf_model = rdf_loader.getURDF();
21 robot_model_.reset(
new robot_model::RobotModel(urdf_model, srdf));
42 using Eigen::AngleAxisd;
43 using Eigen::Translation3d;
44 using Eigen::Vector3d;
46 std::vector<std::string> link_names;
47 std::vector<double> joint_angles = { 0, 0, 0, 0, 0, 0 };
48 std::vector<geometry_msgs::Pose> poses;
52 Eigen::Isometry3d pose_actual, pose_desired;
55 pose_desired = Translation3d(0.785, 0, 0.435) * AngleAxisd(
M_PI_2, Vector3d::UnitY());
69 using Eigen::AngleAxisd;
70 using Eigen::Translation3d;
71 using Eigen::Vector3d;
73 const double J1 =
M_PI_2, J4 = 0.3, J6 = 0.2;
75 std::vector<std::string> link_names;
76 std::vector<double> joint_angles = { J1, 0, 0, J4, 0, J6 };
77 std::vector<geometry_msgs::Pose> poses;
81 Eigen::Isometry3d pose_actual, pose_desired;
85 pose_desired = Translation3d(0, 0, 0) * AngleAxisd(
M_PI_2, Vector3d::UnitY());
88 pose_desired = AngleAxisd(-J1, Vector3d::UnitZ()) * pose_desired;
91 pose_desired = pose_desired * AngleAxisd(-J4, Vector3d::UnitZ()) * AngleAxisd(-J6, Vector3d::UnitZ());
95 pose_desired = Translation3d(0, -0.785, 0.435) * pose_desired;
TEST_F(TestKukaSpecific, positionFKAllZero)
virtual bool getPositionFK(const std::vector< std::string > &link_names, const std::vector< double > &joint_angles, std::vector< geometry_msgs::Pose > &poses) const override
const std::vector< std::string > & getLinkNames() const override
Return all the link names in the order they are represented internally.
void poseMsgToEigen(const geometry_msgs::Pose &m, Eigen::Affine3d &e)
robot_model::RobotModelPtr robot_model_
Specific implementation of kinematics using ROS service calls to communicate with external IK solvers...
void comparePoses(const Transform< T > &Ta, const Transform< T > &Tb)
Compare every element of two transforms.
moveit_opw_kinematics_plugin::MoveItOPWKinematicsPlugin plugin_
std::shared_ptr< Model > ModelSharedPtr
virtual bool initialize(const moveit::core::RobotModel &robot_model, const std::string &group_name, const std::string &base_frame, const std::vector< std::string > &tip_frames, double search_discretization) override