11 auto f_base = std::make_shared<Frame>(
"base", Eigen::Vector3d{0, 0, 0},
15 auto f_l1 = std::make_shared<Frame>(
"link_1", Eigen::Vector3d{1, 0, 0},
17 auto f_l2 = std::make_shared<Frame>(
"link_2", Eigen::Vector3d{0, 0, 0},
19 auto f_l3 = std::make_shared<Frame>(
"link_3", Eigen::Vector3d{1, 0, 0},
21 auto f_e1 = std::make_shared<Frame>(
"ee_1", Eigen::Vector3d{0, 0, 0},
Joint::FIXED);
22 auto f_e2 = std::make_shared<Frame>(
"ee_2", Eigen::Vector3d{0, 0, 0},
Joint::FIXED);
24 auto robot = std::make_shared<Robot>();
25 robot->attachFrame(f_base);
26 robot->attachFrame(f_l1, f_base);
27 robot->attachFrame(f_l2, f_l1);
29 robot->attachFrame(f_l3, f_l1);
30 robot->attachFrame(f_l3, f_l2);
32 robot->attachFrame(f_e1, f_l1);
33 robot->attachFrame(f_e1, f_l3);
34 robot->attachFrame(f_e1, f_l2);
36 robot->attachFrame(f_e2, f_l3);
37 robot->attachFrame(f_e2, f_l2);
38 robot->attachFrame(f_e2, f_l3);
Revolute joint, rotates. Uses Euclidean metric.
A representation of a state of a Robot.
Prismatic joint, extends along X-axis.
std::string printFrames(const RobotPtr &robot) const
Print out the current value of all frames on the robot.
Fixed joint, just a rigid transformation.
void fk(const RobotPtr &robot)
Compute the forward kinematics for all frames in the robot.
void setJoint(const RobotPtr &robot, const std::string &name, double value)
Sets the value of a frame with one joint parameter.
Floating joint, free movement in SE(2). Uses Euclidean metric.
void setFloatJoint(const RobotPtr &robot, const std::string &name, const Eigen::Isometry2d &value)
Sets the value of a frame with a floating joint.