20 int main(
int argc,
char **argv)
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();
62 auto response = cartesian_planner->plan(*
fetch->getScratchState(), query);
63 if (response.error_code_.val != moveit_msgs::MoveItErrorCodes::SUCCESS)
76 RBX_INFO(
"Press enter to continue to next direction.");
81 scene->getCurrentState() = *
fetch->getScratchState();
RVIZ visualization helper. See Live Visualization with RViz for more information.
void updateScene(const SceneConstPtr &scene)
Updates the scene being visualized.
void updateTrajectory(const planning_interface::MotionPlanResponse &response)
Updates the trajectory being visualized.
RAII-pattern for starting up ROS.
The Trajectory class is a wrapper around MoveIt!'s robot_trajectory::RobotTrajectory,...
int main(int argc, char **argv)
static const std::string GROUP
#define RBX_ERROR(fmt,...)
Output a error logging message.
#define RBX_INFO(fmt,...)
Output a info logging message.
Main namespace. Contains all library classes and functions.
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...
SceneConstPtr scene
If provided, use this scene for collision checking.
robot_trajectory::RobotTrajectory trajectory(rmodel,"right_arm")