27 int main(
int argc,
char **argv)
33 auto cob4 = std::make_shared<Cob4Robot>();
37 auto scene = std::make_shared<Scene>(cob4);
44 cob4->setGroupState(
RIGHT_ARM, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0});
45 cob4->setGroupState(
LEFT_ARM, {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0});
48 auto planner = std::make_shared<OMPL::Cob4OMPLPipelinePlanner>(cob4);
49 planner->initialize();
56 cob4->setGroupState(
RIGHT_ARM, {2.69, 1.70, -0.91, 1.50, -2.14, -2.35, 1.06});
59 request_right_arm.
setConfig(
"RRTConnect");
63 if (res.
error_code_.val != moveit_msgs::MoveItErrorCodes::SUCCESS)
67 auto right_arm_trajectory = std::make_shared<Trajectory>(res.
trajectory_);
70 right_arm_trajectory->toYAMLFile(
"cob4_right_arm_path.yml");
77 cob4->setGroupState(
LEFT_ARM, {-1.14, -1.50, 0.34, -1.50, 0.43, -1.56, -1.20});
84 if (res.
error_code_.val != moveit_msgs::MoveItErrorCodes::SUCCESS)
88 auto left_arm_trajectory = std::make_shared<Trajectory>(res.
trajectory_);
91 left_arm_trajectory->toYAMLFile(
"cob4_left_arm_path.yml");
A helper class to build motion planning requests for a robowflex::Planner.
bool setConfig(const std::string &requested_config)
Set the planning configuration to use for the motion planning request. Attempts to match requested_co...
void setStartConfiguration(const std::vector< double > &joints)
Set the start configuration from a vector joints. All joints are assumed to be specified and in the d...
planning_interface::MotionPlanRequest & getRequest()
Get a reference to the currently built motion planning request.
void setGoalConfiguration(const std::vector< double > &joints)
Set the goal configuration from a vector joints. All joints are assumed to be specified and in the de...
RAII-pattern for starting up ROS.
int main(int argc, char **argv)
static const std::string LEFT_ARM
static const std::string RIGHT_ARM
Main namespace. Contains all library classes and functions.
Functions for loading and animating scenes in Blender.
moveit_msgs::MoveItErrorCodes error_code_
robot_trajectory::RobotTrajectoryPtr trajectory_