22 int main(
int argc,
char **argv)
28 auto ur5 = std::make_shared<UR5Robot>();
34 RBX_INFO(
"RViz Initialized! Press enter to continue (after your RViz is setup)...");
39 pose.translate(Eigen::Vector3d{-0.268, -0.826, 1.313});
44 auto scene = std::make_shared<Scene>(ur5);
45 scene->updateCollisionObject(
"cylinder", cylinder, pose);
51 auto planner = std::make_shared<OMPL::UR5OMPLPipelinePlanner>(ur5);
52 planner->initialize();
65 RBX_INFO(
"Scene and Goal displayed! Press enter to plan...");
70 if (res.
error_code_.val != moveit_msgs::MoveItErrorCodes::SUCCESS)
76 RBX_INFO(
"Press enter to remove goal and scene.");
static GeometryPtr makeCylinder(double radius, double length)
Create a cylinder.
RVIZ visualization helper. See Live Visualization with RViz for more information.
void removeMarker(const std::string &name)
Removes a marker that was added through addMarker().
void updateMarkers()
Displays the managed list of markers. Keeps track of whether markers have already been displayed and ...
void removeScene()
Removes the scene being visualized.
void updateScene(const SceneConstPtr &scene)
Updates the scene being visualized.
void addGoalMarker(const std::string &name, const MotionRequestBuilder &request)
Adds the current goal of the motion request builder as a set of markers in the marker array.
void updateTrajectory(const planning_interface::MotionPlanResponse &response)
Updates the trajectory being visualized.
A helper class to build motion planning requests for a robowflex::Planner.
void addCylinderSideGrasp(const std::string &ee_name, const std::string &base_name, const RobotPose &pose, const GeometryConstPtr &cylinder, double distance, double depth, unsigned int n)
Adds a set of regions to grasp a cylinder from the side. This function assumes the X-axis of the end-...
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.
RAII-pattern for starting up ROS.
#define RBX_INFO(fmt,...)
Output a info logging message.
Main namespace. Contains all library classes and functions.
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.
Functions for loading and animating scenes in Blender.
moveit_msgs::MoveItErrorCodes error_code_
int main(int argc, char **argv)