31 auto baxter = std::make_shared<Robot>(
"baxter");
32 baxter->initializeFromYAML(
"package://robowflex_resources/baxter.yml");
37 rviz.visualizeCurrentState();
38 RBX_INFO(
"Default robot state is visualized. Press enter to continue...");
49 rviz.addTransformMarker(
"pose_right",
"map", goal_pose_right);
50 rviz.addTransformMarker(
"pose_left",
"map", goal_pose_left);
52 RBX_INFO(
"Target IK poses are visualized. Press enter to continue...");
57 if (not baxter->setFromIK(query))
64 rviz.visualizeCurrentState();
66 RBX_INFO(
"Robot IK solution visualized, Press enter to continue...");
70 if (not baxter->setFromIK(query))
77 rviz.visualizeCurrentState();
79 RBX_INFO(
"Robot left arm IK(ee:default) is visualized. Press enter to continue ...");
84 query.validate =
true;
85 query.valid_distance = 0.05;
87 if (not baxter->setFromIK(query))
89 RBX_ERROR(
"Single Approximate IK query failed!");
94 rviz.visualizeCurrentState();
95 RBX_INFO(
"Robot left arm IK(ee:left_gripper_base) is visualized. Press enter to exit...");
static const std::string LEFT_EE
static const std::string LEFT_ARM
static const std::string BOTH_ARMS
static const std::string RIGHT_EE
RVIZ visualization helper. See Live Visualization with RViz for more information.
RAII-pattern for starting up ROS.
#define RBX_ERROR(fmt,...)
Output a error logging message.
#define RBX_INFO(fmt,...)
Output a info logging message.
RobotPose createPoseXYZ(double x, double y, double z)
Creates a robot pose from a linear component and zero orientation.
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.
bool return_approximate_solution
Robot IK Query options. IK queries in Robowflex consist of: a) A position specified by some geometric...
kinematics::KinematicsQueryOptions options
Other query options.