src/nodes/src/movement.cpp
// Move the robot to a specific position via cartesian planenr
Move the robot to a specific position via cartesian planenr
Move the robot to a specific position via cartesian planenr
void Mover::move_to_pose(double x, double y, double z) {
        geometry_msgs::Pose target_pose = movement_group.getCurrentPose().pose;
        std::vector<geometry_msgs::Pose> waypoints;
        target_pose.position.x = x;
        target_pose.position.y = y;
        target_pose.position.z = z;
        waypoints.push_back(target_pose);
        moveit_msgs::RobotTrajectory trajectory;
        movement_group.computeCartesianPath(waypoints, 0.01, 0, trajectory);
        movement_group.execute(trajectory);
    }
void Mover :: move_to_pose ( double x , double y , double z ) { geometry_msgs :: Pose target_pose = movement_group . getCurrentPose ( ) . pose ; std :: vector < geometry_msgs :: Pose > waypoints ; target_pose . position . x = x ; target_pose . position . y = y ; target_pose . position . z = z ; waypoints . push_back ( target_pose ) ; moveit_msgs :: RobotTrajectory trajectory ; movement_group . computeCartesianPath ( waypoints , 0.01 , 0 , trajectory ) ; movement_group . execute ( trajectory ) ; }
Move the robot to a specific position via cartesian planenr
Move the robot to a specific position via cartesian planenr
// Specify pose // Execute movement