Robotics StackExchange | Archived questions

About approach posture planning at the time of picking by moveit

Hi all I have a question about route generation in moveit. After moving the 6-axis arm gripper to the pick position with PoseStamped as shown in the code below, when approaching the object, when descending from z = 0.55 to z = 0.15, it is best to descend straight down in the same posture. What would be a simple way to generate paths in Moveit? Thank you

        bool PickNPlacer::DoPick(geometry_msgs::PointStamped::ConstPtr const& msg){
          // Move Pick Pose
          geometry_msgs::PoseStamped pose;
          pose.header.frame_id = "base_link";
          tf2::Quaternion orientation;
          orientation.setRPY(tau /2 , tau , tau );
          pose.pose.position.x = msg->point.x;
          pose.pose.position.y = msg->point.y;
          pose.pose.position.z = 0.25;
          pose.pose.orientation = tf2::toMsg(orientation);
          arm_.setPoseTarget(pose);
          if (!arm_.move()) {
          ROS_INFO("Could not move to Picke Position");
          return false;
        }

          // Move Down
          ROS_INFO("Moving to down");
          ros::Duration(0.5).sleep();
          pose.pose.position.z = 0.15;
          arm_.setPoseTarget(pose);
          if (!arm_.move()) {
          ROS_ERROR("Could not Moving to down");
          return false;
        }

Asked by yo4hi6o on 2022-12-26 18:14:09 UTC

Comments

Answers