22 int main(
int argc,
char **argv)
28 auto fetch = std::make_shared<FetchRobot>();
29 fetch->initialize(
false);
33 scene->fromYAMLFile(
"package://robowflex_tesseract/scenes/table/scene.yaml");
36 scene->attachObject(*
fetch->getScratchState(),
"Can1");
39 auto planner = std::make_shared<TrajOptPlanner>(
fetch,
GROUP);
40 planner->initialize(
"torso_lift_link",
"gripper_link");
43 planner->options.num_waypoints = 8;
46 const auto &request = std::make_shared<MotionRequestBuilder>(
fetch);
47 request->fromYAMLFile(
"package://robowflex_tesseract/scenes/table/request.yaml");
50 const auto &rviz = std::make_shared<IO::RVIZHelper>(
fetch);
51 rviz->updateScene(
scene);
52 rviz->visualizeState(request->getStartConfiguration());
55 RBX_INFO(
"Press Enter to try to plan with STATIONARY initialization");
59 planner->setInitType(trajopt::InitInfo::Type::STATIONARY);
62 auto res = planner->plan(
scene, request->getRequest());
63 if (res.error_code_.val == moveit_msgs::MoveItErrorCodes::SUCCESS)
64 rviz->updateTrajectory(res);
66 rviz->visualizeState(request->getGoalConfiguration());
69 RBX_INFO(
"Press Enter to try to plan with JOINT_INTERPOLATED initialization");
73 planner->setInitType(trajopt::InitInfo::Type::JOINT_INTERPOLATED);
76 res = planner->plan(
scene, request->getRequest());
77 if (res.error_code_.val == moveit_msgs::MoveItErrorCodes::SUCCESS)
78 rviz->updateTrajectory(res);
80 rviz->visualizeState(request->getGoalConfiguration());
RAII-pattern for starting up ROS.
int main(int argc, char **argv)
static const std::string GROUP
#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.