Robowflex  v0.1
Making MoveIt Easy
ur5_ik.cpp File Reference

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 14 of file ur5_ik.cpp.

15 {
16  // Startup ROS
17  ROS ros(argc, argv);
18 
19  // Create the default UR5 robot.
20  auto ur5 = std::make_shared<UR5Robot>();
21  ur5->initialize();
22  ur5->setGroupState("manipulator", {0.0677, -0.8235, 0.9860, -0.1624, 0.0678, 0.0});
23 
24  // Use IK to shift robot arm over by desired amount.
25  RobotPose goal_pose = ur5->getLinkTF("ee_link");
26  goal_pose.translate(Eigen::Vector3d{0.0, -0.3, 0.0});
27 
28  if (not ur5->setFromIK(Robot::IKQuery("manipulator", goal_pose)))
29  {
30  RBX_ERROR("IK Failed");
31  return 1;
32  }
33 
34  return 0;
35 }
RAII-pattern for starting up ROS.
Definition: util.h:52
#define RBX_ERROR(fmt,...)
Output a error logging message.
Definition: log.h:102
std::decay< decltype(std::declval< moveit::core::Transforms >().getTransform("")) >::type RobotPose
A pose (point in SE(3)) used in various functions. Defined from what MoveIt! uses.
Definition: adapter.h:24
Robot IK Query options. IK queries in Robowflex consist of: a) A position specified by some geometric...