26 auto fetch = std::make_shared<FetchRobot>();
28 fetch->setGroupState(
GROUP, {0.501, 1.281, -2.272, 2.243, -2.774, 0.976, -2.007});
33 RBX_INFO(
"RViz Initialized! Press enter to continue (after your RViz is setup)...");
39 auto cartesian_planner = std::make_shared<SimpleCartesianPlanner>(
fetch,
"cartesian");
41 EigenSTL::vector_Vector3d directions = {
43 {0.0, -0.1, 0.0}, {0.0, 0.2, 0.0}, {0.0, -0.1, 0.0},
47 for (
const auto &direction : directions)
49 RBX_INFO(
"Moving end-effector in direction [%1%, %2%, %3%]",
50 direction[0], direction[1], direction[2]);
53 scene->getCurrentState() = *
fetch->getScratchState();
54 rviz.updateScene(
scene);
62 auto response = cartesian_planner->plan(*
fetch->getScratchState(), query);
63 if (response.error_code_.val != moveit_msgs::MoveItErrorCodes::SUCCESS)
71 rviz.updateTrajectory(trajectory);
76 RBX_INFO(
"Press enter to continue to next direction.");
81 scene->getCurrentState() = *
fetch->getScratchState();
82 rviz.updateScene(
scene);
RVIZ visualization helper. See Live Visualization with RViz for more information.
RAII-pattern for starting up ROS.
The Trajectory class is a wrapper around MoveIt!'s robot_trajectory::RobotTrajectory,...
static const std::string GROUP
#define RBX_ERROR(fmt,...)
Output a error logging message.
#define RBX_INFO(fmt,...)
Output a info logging message.
Functions for loading and animating scenes in Blender.
Robot IK Query options. IK queries in Robowflex consist of: a) A position specified by some geometric...
robot_trajectory::RobotTrajectory trajectory(rmodel,"right_arm")