Moveit! compute path does not compute all points

asked 2022-11-20 00:10:44 -0500

Hi everyone, This is my first time using ROS and Moveit! On Ubuntu 20.04 and runing ROS Neotic, Moveit1 along with gazebo As I used the Xarm6 Package and trying to simulate a motion plan with the Moveit! tutorial python code, it does not simulate all the points instead, i got Computed Cartesian path with 2 points (followed 12.500000% of requested trajectory). I am trying to have the end effector move to multiply points to complete a cycle.

!/usr/bin/env python

Software License Agreement (BSD License)

#

Copyright (c) 2013, SRI International

All rights reserved.

#

Redistribution and use in source and binary forms, with or without

modification, are permitted provided that the following conditions

are met:

#

* Redistributions of source code must retain the above copyright

notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above

copyright notice, this list of conditions and the following

disclaimer in the documentation and/or other materials provided

with the distribution.

* Neither the name of SRI International nor the names of its

contributors may be used to endorse or promote products derived

from this software without specific prior written permission.

#

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

POSSIBILITY OF SUCH DAMAGE.

#

Author: Acorn Pooley, Mike Lautman

BEGIN_SUB_TUTORIAL imports

#

To use the Python MoveIt interfaces, we will import the moveit_commander_ namespace.

This namespace provides us with a MoveGroupCommander_ class, a PlanningSceneInterface_ class,

and a RobotCommander_ class. More on these below. We also import rospy_ and some messages that we will use:

#

Python 2/3 compatibility imports

from __future__ import print_function from six.moves import input

import sys import copy import rospy import moveit_commander import moveit_msgs.msg import geometry_msgs.msg

try: from math import pi, tau, dist, fabs, cos except: # For Python 2 compatibility from math import pi, fabs, cos, sqrt

tau = 2.0 * pi

def dist(p, q):
    return sqrt(sum((p_i - q_i) ** 2.0 for p_i, q_i in zip(p, q)))

from std_msgs.msg import String from moveit_commander.conversions import pose_to_list

END_SUB_TUTORIAL

def all_close(goal, actual, tolerance): """ Convenience method for testing if the values in two lists are within a tolerance of each other. For Pose and PoseStamped inputs, the angle between the two quaternions is compared (the angle between the identical orientations q and -q is calculated correctly). @param: goal A list of floats, a ... (more)

edit retag flag offensive close merge delete