Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inaccuracy in goal poses #458

Closed
ignacioDeusto opened this issue Aug 24, 2021 · 2 comments
Closed

Inaccuracy in goal poses #458

ignacioDeusto opened this issue Aug 24, 2021 · 2 comments
Labels
question Further information is requested

Comments

@ignacioDeusto
Copy link

Versions

  • ROS Driver version: e9366f6
  • Affected Robot Software Version(s): 5.9, 5.11
  • Affected Robot Hardware Version(s): UR3e
  • Robot Serial Number:
  • UR+ product(s) installed: None
  • URCaps Software version(s): 1.0.5

Impact

Some trajectories executed end with a relatively big error from the actual goal.

Issue details

When planning and executing trajectories through MoveIt, for some of the trajectories generated, the reached goal differs up to 2 cm from the actual one.
This situation only happens with the real robots, not in simulation using the same scripts.

Acceptable Goal

correct_1
correct_2

Inaccurate Goal

incorrect_1
incorrect_2

Steps to Reproduce

Generate the calibration files.
Launch the robot driver.
Plan and execute multiple trajectories from the same start state and to the same pose goal.

In order to reproduce this situation I used a simple python script to plan to the same goal multiple times. Many trajectories are generated due to the nature of the OMPL planner. In my case, I get up to 4 different trajectories. For some of this trajectories the (Always happens with the same trajectories) reached goal is far from the actual goal.

Used script:

#!/usr/bin/env python
import sys
import rospy
import moveit_commander
from moveit_commander import move_group
import geometry_msgs.msg

class RobotRoutine():

    def __init__(self):
        rospy.init_node('MoveIt_test', anonymous=True)

        moveit_commander.roscpp_initialize(sys.argv)

        self.robot_1_move_group = move_group.MoveGroupCommander("robot_1")
        self.robot_1_move_group.set_max_velocity_scaling_factor(0.8)
        self.robot_1_move_group.set_max_acceleration_scaling_factor(0.8)
        self.robot_1_move_group.set_num_planning_attempts(10)
        self.robot_1_move_group.set_planner_id("RRTConnect")
        self.robot_1_move_group.set_goal_position_tolerance(1e-5)

    def routine(self):
      #Set the fixed pose. Note that my reference frame is 0.5 m vertically down the robot
      fixed_pose = geometry_msgs.msg.Pose()
      fixed_pose.position.x  = -0.0637530011465664
      fixed_pose.position.y = 0.4035826016641272
      fixed_pose.position.z = 0.5790353225684292
      fixed_pose.orientation.x = -0.5145203068401717
      fixed_pose.orientation.y = 0.4913816508952454
      fixed_pose.orientation.z = -0.49632396842937626
      fixed_pose.orientation.w = 0.49746903961460204

      #Set the robot to the initial position
      self.robot_1_move_group.set_named_target("start")
      self.robot_1_move_group.go()

      #Set the fixed pose target
      self.robot_1_move_group.set_pose_target(fixed_pose)
      
      #Plan the trajectory
      (flag, plan, planning_time, error) = self.robot_1_move_group.plan()

      #Write the planned trajectory to a file
      with open("planned_trajectory_data", "a+") as f:
        f.write(repr(plan)+"\n")
      
      #Execute trajectory
      self.robot_1_move_group.execute(plan)

      #Write the final pose to a file
      with open("final_pose_data", "a+") as f:
        f.write(repr(self.robot_1_move_group.get_current_pose())+"\n")

      
routine = RobotRoutine()
routine.routine()

Final pose results

For the acceptable goal showed in the photos:

header: 
  seq: 0
  stamp: 
    secs: 1627386551
    nsecs: 673825025
  frame_id: "world"
pose: 
  position: 
    x: -0.06376377020977028
    y: 0.40358504888392643
    z: 0.5790422756691036
  orientation: 
    x: -0.5149060193063058
    y: 0.49120068832536984
    z: -0.496199740289882
    w: 0.49737258952124713

For the inaccurate goal:

header: 
  seq: 0
  stamp: 
    secs: 1627386672
    nsecs: 273778676
  frame_id: "world"
pose: 
  position: 
    x: -0.06371904859800516
    y: 0.4035750947518981
    z: 0.5790239278779947
  orientation: 
    x: -0.5143870803934727
    y: 0.4911609458485078
    z: -0.49658891654270054
    w: 0.49756035288638606

Trajectory results

For the acceptable goal:

joint_trajectory: 
  header: 
    seq: 0
    stamp: 
      secs: 0
      nsecs:         0
    frame_id: "world"
  joint_names: 
    - robot_1_shoulder_pan_joint
    - robot_1_shoulder_lift_joint
    - robot_1_elbow_joint
    - robot_1_wrist_1_joint
    - robot_1_wrist_2_joint
    - robot_1_wrist_3_joint
  points: 
    - 
      positions: [0.8004121780395508, -1.521259145145752, 1.5520942846881312, -1.5709358654417933, -1.5648120085345667, 1.7518210411071777]
      velocities: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
      accelerations: [2.7964568541828894, 0.0, 0.0, 0.0, 0.0, 0.0]
      effort: []
      time_from_start: 
        secs: 0
        nsecs:         0
    - 
      positions: [0.8884758317665611, -1.4864545989723563, 1.5556632150358276, -1.6097291855118825, -1.5646600409597442, 1.7307989553909173]
      velocities: [0.5962247344844762, 0.23564013554800675, 0.02416302820622416, -0.26264566571652675, 0.0010288788065694727, -0.14232758855703548]
      accelerations: [2.759460835520863, 1.0905950184770106, 0.11183187504006101, -1.2155826255526387, 0.004761880222364085, -0.6587237726339051]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 250962763
    - 
      positions: [0.9765394854935714, -1.4516500527989609, 1.559232145383524, -1.6485225055819719, -1.5645080733849217, 1.7097768696746571]
      velocities: [0.9620371399747347, 0.3802166346920739, 0.03898820227366796, -0.4237913499029218, 0.0016601451888918332, -0.22965237487723966]
      accelerations: [2.591271881032012, 1.024123324598535, 0.10501572969043317, -1.141492945331461, 0.004471643939358685, -0.6185746024808011]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 355607824
    - 
      positions: [1.0646031392205817, -1.4168455066255654, 1.5628010757312205, -1.687315825652061, -1.5643561058100992, 1.6887547839583967]
      velocities: [1.1759386942999308, 0.46475487730406617, 0.04765692899964627, -0.5180180950950969, 0.002029265695319251, -0.2807138130479172]
      accelerations: [2.4789351462415423, 0.9797255633484759, 0.10046309117287103, -1.092006980078885, 0.00427778937590273, -0.5917581763173728]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 436957819
    - 
      positions: [1.152666792947592, -1.3820409604521697, 1.566370006078917, -1.7261091457221505, -1.5642041382352767, 1.6677326982421363]
      velocities: [1.3498419410189744, 0.5334849756361102, 0.054704655825774266, -0.5946250041396891, 0.0023293628811541, -0.32222706856416283]
      accelerations: [2.4588118301914963, 0.9717724197644045, 0.09964755933535417, -1.0831423667296716, 0.004243063454330808, -0.5869544456407454]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 506334824
    - 
      positions: [1.2407304466746023, -1.347236414278774, 1.5699389364266136, -1.7649024657922396, -1.564052170660454, 1.6467106125258761]
      velocities: [1.4973352154498754, 0.591777316039209, 0.06068207330642235, -0.6595979363430282, 0.002583885539132561, -0.3574358763575574]
      accelerations: [2.273845010747178, 0.8986697725831331, 0.09215146228164717, -1.0016617930154987, 0.003923874347426957, -0.5428001530529716]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 567903394
    - 
      positions: [1.3287941004016124, -1.3124318681053786, 1.57350786677431, -1.8036957858623288, -1.5639002030856315, 1.6256885268096157]
      velocities: [1.6291437155423174, 0.6438707147725187, 0.06602383845191989, -0.71766149736555, 0.002811341671738345, -0.3889004984781058]
      accelerations: [2.394046355731599, 0.9461757876592688, 0.0970228275929656, -1.0546122334240418, 0.004131300522925866, -0.5714939770146378]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 624197989
    - 
      positions: [1.4168577541286227, -1.2776273219319831, 1.5770767971220065, -1.842489105932418, -1.563748235510809, 1.6046664410933553]
      velocities: [1.7109757866875799, 0.6762124128295733, 0.0693402232459294, -0.7537097146900025, 0.002952555678520272, -0.408435014037584]
      accelerations: [0.6614563848855656, 0.26142100986190514, 0.0268066525267463, -0.2913811563033847, 0.001141446197241813, -0.15789934021743943]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 676185103
    - 
      positions: [1.504921407855633, -1.2428227757585875, 1.580645727469703, -1.8812824260025074, -1.5635962679359865, 1.583644355377095]
      velocities: [1.7280000000000004, 0.68294072801094, 0.07003015863885212, -0.7612091282166958, 0.0029819336148294933, -0.4124989434381835]
      accelerations: [0.0, 0.0, 0.0, 0.0, 0.0, 8.49614419899889e-14]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 727147865
    - 
      positions: [1.5929850615826433, -1.2080182295851918, 1.5842146578173995, -1.9200757460725968, -1.563444300361164, 1.5626222696608347]
      velocities: [1.6942870176331537, 0.6696166720381171, 0.06866388230590124, -0.746358069236918, 0.0029237566036166146, -0.4044511601011034]
      accelerations: [-1.296717783550369, -0.5124892286590041, -0.052551708386489114, 0.5712230402543987, -0.002237688858631972, 0.3095455530392875]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 778110628
    - 
      positions: [1.6810487153096536, -1.1732136834117963, 1.587783588165096, -1.958869066142686, -1.5632923327863415, 1.5416001839445743]
      velocities: [1.5970431482622462, 0.6311839180203103, 0.06472290800109783, -0.703520730678904, 0.0027559471343381477, -0.3812376222704693]
      accelerations: [-2.300631491638782, -0.9092563343661031, -0.09323703028298479, 1.013461627371625, -0.0039700985996833195, 0.5491944789013795]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 831142683
    - 
      positions: [1.7691123690366637, -1.1384091372384009, 1.5913525185127924, -1.9976623862127751, -1.563140365211519, 1.520578098228314]
      velocities: [1.4608904531184796, 0.5773736050908358, 0.059205086913122, -0.6435434885638927, 0.0025209944153590934, -0.3487359770777215]
      accelerations: [-2.4034963665859372, -0.9499106240554299, -0.0974058054628602, 1.0587751006255302, -0.004147607991055125, 0.5737498332027461]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 888568800
    - 
      positions: [1.857176022763674, -1.1036045910650052, 1.594921448860489, -2.0364557062828643, -1.5629883976366963, 1.4995560125120537]
      velocities: [1.3040441905321178, 0.5153847736345145, 0.052848623573518924, -0.5744504290688655, 0.002250331716998763, -0.3112944738374997]
      accelerations: [-2.483981539932586, -0.9817200007218149, -0.1006676049175627, 1.0942299898832648, -0.0042864977156424205, 0.592962824503507]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 952002958
    - 
      positions: [1.9452396764906843, -1.0688000448916095, 1.5984903792081855, -2.075249026352954, -1.5628364300618738, 1.4785339267957933]
      velocities: [1.1222438272334885, 0.44353357429202533, 0.04548085257675563, -0.49436472533273607, 0.0019366068243416904, -0.267896060771898]
      accelerations: [-2.468126812470515, -0.9754538901226794, -0.10002506494103844, 1.0872457518803056, -0.004259137909587845, 0.5891780685275135]
      effort: []
      time_from_start: 
        secs: 1
        nsecs:  24196948
    - 
      positions: [2.0333033302176946, -1.033995498718214, 1.602059309555882, -2.1140423464230427, -1.5626844624870513, 1.457511841079533]
      velocities: [0.8890637805173701, 0.3513760795802593, 0.03603083193847744, -0.39164552389853124, 0.0015342182713264678, -0.2122325637225535]
      accelerations: [-2.6743389753138342, -1.0569531289055747, -0.1083821659116279, 1.178085208306951, -0.004614989171259828, 0.6384039361762439]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 110140552
    - 
      positions: [2.121366983944705, -0.9991909525448185, 1.6056282399035784, -2.1528356664931323, -1.5625324949122288, 1.4364897553632727]
      velocities: [0.552181455712448, 0.2182333364342584, 0.022378098924175357, -0.24324396094924733, 0.0009528752571032589, -0.13181381196038333]
      accelerations: [-2.188747177231895, -0.8650373788487473, -0.08870272687609339, 0.9641749598770086, -0.0037770247581892097, 0.5224860521188947]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 227019611
    - 
      positions: [2.209430637671715, -0.9643864063714229, 1.6091971702512748, -2.1916289865632215, -1.5623805273374063, 1.4154676696470123]
      velocities: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
      accelerations: [-2.7964568541828894, -1.1052165971335872, -0.11333120204000753, 1.2318799097616597, -0.0048257226249469294, 0.6675552648847882]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 477982373
multi_dof_joint_trajectory: 
  header: 
    seq: 0
    stamp: 
      secs: 0
      nsecs:         0
    frame_id: ''
  joint_names: []
  points: []

For the inaccurate goal:

joint_trajectory: 
  header: 
    seq: 0
    stamp: 
      secs: 0
      nsecs:         0
    frame_id: "world"
  joint_names: 
    - robot_1_shoulder_pan_joint
    - robot_1_shoulder_lift_joint
    - robot_1_elbow_joint
    - robot_1_wrist_1_joint
    - robot_1_wrist_2_joint
    - robot_1_wrist_3_joint
  points: 
    - 
      positions: [0.8003759384155273, -1.5213549894145508, 1.5521534124957483, -1.5708643398680628, -1.5649073759662073, 1.751833438873291]
      velocities: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
      accelerations: [-1.009109823243458, 0.0, 0.0, 0.0, 0.0, 0.0]
      effort: []
      time_from_start: 
        secs: 0
        nsecs:         0
    - 
      positions: [0.7758465493907016, -1.5350497119157573, 1.4862665009363047, -1.5577078753767732, -1.4991918129777313, 1.7564021612925524]
      velocities: [-0.1902992206988795, -0.10624378034974336, -0.5111512525374546, 0.10206796986712385, 0.5098219287825909, 0.03544418962473933]
      accelerations: [-1.0148931747363548, -0.5666133951528926, -2.726043309862374, 0.5443431959253873, 2.718953834661838, 0.18902897238411703]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 220490126
    - 
      positions: [0.751317160365876, -1.5487444344169636, 1.4203795893768612, -1.5445514108854839, -1.4334762499892553, 1.7609708837118137]
      velocities: [-0.31057977186463714, -0.17339623852308295, -0.8342295823302903, 0.16658106470219902, 0.832060046023188, 0.057847048911448484]
      accelerations: [-1.025687634984168, -0.5726399267348382, -2.755037658109623, 0.5501328604298751, 2.747872778856626, 0.19103949504691628]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 311559271
    - 
      positions: [0.7267877713410503, -1.56243915691817, 1.3544926778174176, -1.5313949463941943, -1.367760687000779, 1.765539606131075]
      velocities: [-0.38447260964941965, -0.2146505032446841, -1.032708674617298, 0.20621386988508345, 1.0300229643383778, 0.071609962625626]
      accelerations: [-1.0165002938603325, -0.5675106474411119, -2.7303600955548855, 0.5452051825678471, 2.723259393920309, 0.18932830642638573]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 381282575
    - 
      positions: [0.7022583823162247, -1.5761338794193764, 1.288605766257974, -1.518238481902905, -1.3020451240123032, 1.7701083285503363]
      velocities: [-0.4423229363963269, -0.24694825720020436, -1.1880969461392985, 0.23724219141746594, 1.1850071258840538, 0.08238487774897861]
      accelerations: [-0.9054598144914348, -0.5055169080201652, -2.432100964995358, 0.48564804796364414, 2.4257759299477595, 0.16864645711403783]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 440087049
    - 
      positions: [0.677728993291399, -1.589828601920583, 1.2227188546985304, -1.5050820174116153, -1.236329561023827, 1.7746770509695977]
      velocities: [-0.48941058600008047, -0.2732372240352421, -1.3145762400933623, 0.2624978954777284, 1.31115749189533, 0.09115518997311316]
      accelerations: [-0.8721264713455348, -0.48690695063556105, -2.3425662835726175, 0.46776953720927406, 2.3364740965874957, 0.16243795383704066]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 492555081
    - 
      positions: [0.6531996042665733, -1.6035233244217892, 1.1568319431390868, -1.491925552920326, -1.170613998035351, 1.779245773388859]
      velocities: [-0.5297518048285039, -0.2957596683022603, -1.422934353475576, 0.28413511654810797, 1.4192338041209638, 0.0986689454398806]
      accelerations: [-0.7955941076936283, -0.4441790424307756, -2.136997320144093, 0.4267210086952941, 2.13143974537998, 0.14818341511791663]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 540528693
    - 
      positions: [0.6286702152417476, -1.6172180469229955, 1.0909450315796432, -1.4787690884290363, -1.104898435046875, 1.7838144958081203]
      velocities: [-0.5650560451957343, -0.3154699747618246, -1.5177629429848762, 0.30307072820616177, 1.5138157779836248, 0.10524453826437018]
      accelerations: [-0.7761920442806445, -0.43334689842103674, -2.0848826084868155, 0.4163146117770109, 2.0794605656691423, 0.14456968295319522]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 585274546
    - 
      positions: [0.604140826216922, -1.630912769424202, 1.0250581200201996, -1.465612623937747, -1.0391828720583989, 1.7883832182273816]
      velocities: [-0.5998183781941799, -0.3348777351192683, -1.6111359478139229, 0.3217156850481597, 1.6069459526273486, 0.1117191981083271]
      accelerations: [-0.8746326236847969, -0.48830613187075217, -2.349297908129777, 0.4691137249602758, 2.3431882145684466, 0.16290473735016878]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 627427164
    - 
      positions: [0.5796114371920964, -1.6446074919254086, 0.959171208460756, -1.4524561594464573, -0.9734673090699227, 1.792951940646643]
      velocities: [-0.6334731547846337, -0.35366714833212154, -1.701534012214295, 0.3397665982904928, 1.6971089236110388, 0.11798756998536336]
      accelerations: [-0.8132403900006011, -0.45403093638226666, -2.184395934130408, 0.43618568334874297, 2.178715092323118, 0.15147012419608064]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 667136836
    - 
      positions: [0.5550820481672707, -1.6583022144266149, 0.8932842969013124, -1.439299694955168, -0.9077517460814466, 1.7975206630659044]
      velocities: [-0.6624087054618868, -0.3698218245266012, -1.7792560486851734, 0.35528633034072377, 1.7746288325338662, 0.12337696223475711]
      accelerations: [-0.7115960565411436, -0.3972830516659343, -1.9113752240597568, 0.38166822013193963, 1.9064044126271875, 0.13253835444833725]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 704919228
    - 
      positions: [0.530552659142445, -1.6719969369278211, 0.8273973853418688, -1.4261432304638784, -0.8420361830929707, 1.8020893854851656]
      velocities: [-0.6893051551625482, -0.38483807358790073, -1.8515009790785468, 0.3697123800507417, 1.8466858793963599, 0.12838656164310694]
      accelerations: [-0.7705565615240746, -0.43020061652902347, -2.0697454783444766, 0.4132919914946542, 2.064362801852664, 0.14352004586764314]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 741227363
    - 
      positions: [0.5060232701176193, -1.6856916594290277, 0.7615104737824252, -1.412986765972589, -0.7763206201044945, 1.806658107904427]
      velocities: [-0.7136720925169571, -0.39844209955590504, -1.9169515390097236, 0.38278171274958406, 1.9119662255529404, 0.13292502661943217]
      accelerations: [-0.6196414791851024, -0.3459449438014984, -1.6643815831008288, 0.3323479076459649, 1.660053114835146, 0.11541135064505141]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 776118767
    - 
      positions: [0.4814938810927937, -1.6993863819302342, 0.6956235622229817, -1.3998303014812994, -0.7106050571160185, 1.8112268303236883]
      velocities: [-0.7352970705923121, -0.4105152936145445, -1.975037087593257, 0.3943803814276084, 1.9699007141534164, 0.13695278785102744]
      accelerations: [-0.6577619163032475, -0.36722752884353693, -1.7667745887507307, 0.3527940009757957, 1.762179832465273, 0.12251147431817236]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 809984020
    - 
      positions: [0.45696449206796796, -1.7130811044314405, 0.6297366506635379, -1.38667383699001, -0.6448894941275424, 1.8157955527429497]
      velocities: [-0.7575773071283306, -0.4229543175263554, -2.03488268638442, 0.4063305013652465, 2.029590675692979, 0.14110259427570132]
      accelerations: [-0.6982275284538987, -0.38981942172315887, -1.8754668275286877, 0.3744979410475038, 1.8705894011449897, 0.13004839866819537]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 842853302
    - 
      positions: [0.4324351030431423, -1.7267758269326468, 0.5638497391040944, -1.3735173724987204, -0.5791739311390663, 1.8203642751622109]
      velocities: [-0.7805326571116266, -0.4357702563017258, -2.096541666664555, 0.4186427218871154, 2.091089302757152, 0.14537814398484972]
      accelerations: [-0.7411825911580474, -0.41380117125490645, -1.9908458292054507, 0.3975371107799764, 1.9856683428156292, 0.13804899574010293]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 874755902
    - 
      positions: [0.40790571401831666, -1.7404705494338533, 0.4979628275446508, -1.360360908007431, -0.5134583681505904, 1.8249329975814723]
      velocities: [-0.8001430547541194, -0.44671871301137006, -2.14921597232332, 0.42916085994519726, 2.143626621163251, 0.14903067945033943]
      accelerations: [-0.5193483245446867, -0.28995142027006865, -1.394990192914533, 0.27855515616685605, 1.3913623164457671, 0.09673124476730705]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 905720252
    - 
      positions: [0.38337632499349095, -1.7541652719350598, 0.4320759159852072, -1.3472044435161414, -0.4477428051621142, 1.8295017200007337]
      velocities: [-0.8162259301546763, -0.4556977591428949, -2.1924152133670187, 0.4377869932300956, 2.1867135162486337, 0.15202619610728751]
      accelerations: [-0.5404359491077996, -0.3017246106379792, -1.4516323886575326, 0.28986561251291515, 1.4478572058557322, 0.10065892119690292]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 936074482
    - 
      positions: [0.35884693596866535, -1.767859994436266, 0.36618900442576363, -1.334047979024852, -0.38202724217363815, 1.834070442419995]
      velocities: [-0.8326320713507843, -0.46485728410166327, -2.2364827591556957, 0.44658651179402065, 2.2306664579252278, 0.15508192264904408]
      accelerations: [-0.5623798157899189, -0.31397583974582227, -1.5105744846829032, 0.30163531874255706, 1.5066460143211315, 0.10474607704028224]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 965830613
    - 
      positions: [0.3343175469438397, -1.7815547169374724, 0.30030209286632004, -1.3208915145335625, -0.3163116791851621, 1.8386391648392564]
      velocities: [-0.849367975984937, -0.47420091551211063, -2.281436062614725, 0.4555629006810804, 2.2755028537295283, 0.15819906929428978]
      accelerations: [-0.585214691454055, -0.3267245178828909, -1.5719098661647062, 0.31388292224060055, 1.56782188415335, 0.10899918779935473]
      effort: []
      time_from_start: 
        secs: 0
        nsecs: 995000431
    - 
      positions: [0.309788157919014, -1.7952494394386789, 0.23441518130687644, -1.307735050042273, -0.25059611619668587, 1.8432078872585176]
      velocities: [-0.8664402723022342, -0.4837323539139079, -2.327292927473281, 0.46471971498477016, 2.321240461089488, 0.16137887058710507]
      accelerations: [-0.6089767546378654, -0.33999084347397834, -1.6357357100895813, 0.3266278275546407, 1.6314817396149077, 0.11342499191130494]
      effort: []
      time_from_start: 
        secs: 1
        nsecs:  23595489
    - 
      positions: [0.28525876889418833, -1.8089441619398854, 0.16852826974743285, -1.2945785855509835, -0.18488055320821006, 1.847776609677779]
      velocities: [-0.8838557217755092, -0.49345537422757346, -2.374071515315494, 0.474060581255968, 2.367897394357383, 0.16462258588590578]
      accelerations: [-0.6337036528730916, -0.3537958350820124, -1.7021531392194005, 0.3398902271306639, 1.6977264404858898, 0.11803050141654588]
      effort: []
      time_from_start: 
        secs: 1
        nsecs:  51627111
    - 
      positions: [0.2607293798693626, -1.8226388844410917, 0.10264135818798925, -1.2814221210596939, -0.11916499021973403, 1.8523453320970402]
      velocities: [-0.9016212217831979, -0.5033738272495436, -2.4217903527733355, 0.4835891989392089, 2.4154921319839744, 0.1679314998622126]
      accelerations: [-0.6594345623313158, -0.3681613647079413, -1.7712673823058007, 0.3536911333116772, 1.7666609418526704, 0.1228230130769682]
      effort: []
      time_from_start: 
        secs: 1
        nsecs:  79106399
    - 
      positions: [0.2361999908445369, -1.836333606942298, 0.036754446628545656, -1.2682656565684045, -0.053449427231257784, 1.8569140545163016]
      velocities: [-0.9243882846485907, -0.5160846455986534, -2.4829435863888323, 0.49580043069293367, 2.476486327651841, 0.1721719801460342]
      accelerations: [-1.0395656449076955, -0.5803879996521677, -2.792314543055225, 0.557576402728674, 2.785052719798665, 0.1936243443885879]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 106044236
    - 
      positions: [0.2116706018197113, -1.8500283294435045, -0.02913246493089794, -1.2551091920771151, 0.012266135757218244, 1.861482776935563]
      velocities: [-0.9381842141256158, -0.5237868931207161, -2.52, 0.5031999487202772, 2.513446370627819, 0.17474154159056665]
      accelerations: [-4.670940178284657e-14, 6.369463879479078e-14, 0.0, 2.632711736851352e-13, 1.6985237011944207e-14, -3.4713578143160973e-13]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 132189836
    - 
      positions: [0.1871412127948856, -1.863723051944711, -0.09501937649034176, -1.2419527275858255, 0.0779816987456945, 1.8660514993548243]
      velocities: [-0.9243882846485922, -0.5160846455986542, -2.482943586388832, 0.4958004306929429, 2.476486327651841, 0.1721719801460302]
      accelerations: [1.0395656449076724, 0.5803879996519805, 2.7923145430552467, -0.5575764027285036, -2.7850527197987036, -0.19362434438820447]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 158335436
    - 
      positions: [0.16261182377006, -1.8774177744459173, -0.1609062880497849, -1.228796263094536, 0.1436972617341703, 1.8706202217740857]
      velocities: [-0.9016212217831974, -0.5033738272495445, -2.4217903527733355, 0.48358919893920976, 2.4154921319839744, 0.16793149986221287]
      accelerations: [0.6594345623314964, 0.36816136470812555, 1.7712673823057872, -0.353691133312453, -1.7666609418526407, -0.12282301307702961]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 185273274
    - 
      positions: [0.1380824347452343, -1.8911124969471236, -0.22679319960922872, -1.2156397986032466, 0.20941282472264655, 1.875188944193347]
      velocities: [-0.8838557217755072, -0.4934553742275718, -2.374071515315494, 0.4740605812559624, 2.3678973943573833, 0.16462258588590525]
      accelerations: [0.6337036528730136, 0.3537958350820113, 1.702153139219395, -0.3398902271303708, -1.6977264404859003, -0.1180305014165445]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 212752562
    - 
      positions: [0.11355304572040859, -1.90480721944833, -0.29268011116867254, -1.202483334111957, 0.2751283877111226, 1.8797576666126083]
      velocities: [-0.8664402723022347, -0.4837323539139087, -2.327292927473281, 0.46471971498477094, 2.321240461089488, 0.16137887058710534]
      accelerations: [0.6089767546377646, 0.3399908434738065, 1.6357357100895686, -0.3266278275544766, -1.6314817396149108, -0.11342499191124829]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 240784184
    - 
      positions: [0.08902365669558299, -1.9185019419495366, -0.3585670227281157, -1.1893268696206676, 0.3408439506995984, 1.8843263890318696]
      velocities: [-0.8493679759849375, -0.4742009155121114, -2.281436062614725, 0.4555629006810812, 2.2755028537295283, 0.15819906929429006]
      accelerations: [0.5852146914541559, 0.3267245178830568, 1.5719098661647242, -0.3138829222407606, -1.5678218841533527, -0.10899918779941066]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 269379241
    - 
      positions: [0.06449426767075728, -1.932196664450743, -0.4244539342875595, -1.176170405129378, 0.40655951368807464, 1.888895111451131]
      velocities: [-0.8326320713507842, -0.4648572841016617, -2.2364827591556953, 0.4465865117940191, 2.2306664579252238, 0.15508192264904724]
      accelerations: [0.5623798157898605, 0.3139758397458231, 1.5105744846829134, -0.30163531874255795, -1.506646014321383, -0.10474607704002943]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 298549059
    - 
      positions: [0.03996487864593157, -1.9458913869519492, -0.4903408458470033, -1.1630139406380886, 0.47227507667655066, 1.8934638338703924]
      velocities: [-0.8162259301546761, -0.4556977591428948, -2.1924152133670187, 0.43778699323009196, 2.186713516248626, 0.15202619610728757]
      accelerations: [0.5404359491078549, 0.3017246106378757, 1.4516323886575178, -0.2898656125130592, -1.4478572058557173, -0.10065892119736004]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 328305191
    - 
      positions: [0.015435489621105969, -1.9595861094531557, -0.5562277574064467, -1.1498574761467992, 0.5379906396650265, 1.8980325562896536]
      velocities: [-0.8001430547541184, -0.44671871301137, -2.1492159723233195, 0.42916085994519715, 2.1436266211632486, 0.14903067945033216]
      accelerations: [0.5193483245446938, 0.28995142027016996, 1.3949901929145472, -0.27855515616647936, -1.3913623164454338, -0.09673124476733509]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 358659421
    - 
      positions: [-0.00909389940371974, -1.9732808319543622, -0.6221146689658905, -1.1367010116555096, 0.6037062026535027, 1.9026012787089148]
      velocities: [-0.7805326571116276, -0.4357702563017254, -2.096541666664555, 0.4186427218871186, 2.091089302757159, 0.1453781439848495]
      accelerations: [0.741182591157909, 0.4138011712548266, 1.9908458292054207, -0.3975371107801315, -1.9856683428153872, -0.13804899573962776]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 389623770
    - 
      positions: [-0.03362328842854545, -1.9869755544555685, -0.6880015805253339, -1.12354454716422, 0.669421765641979, 1.9071700011281763]
      velocities: [-0.7575773071283314, -0.42295431752635726, -2.0348826863844205, 0.40633050136524823, 2.0295906756929862, 0.14110259427570543]
      accelerations: [0.6982275284540524, 0.38981942172310224, 1.8754668275287094, -0.3744979410474454, -1.870589401145224, -0.13004839866839046]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 421526371
    - 
      positions: [-0.05815267745337094, -2.000670276956775, -0.7538884920847773, -1.1103880826729307, 0.7351373286304548, 1.9117387235474377]
      velocities: [-0.7352970705923111, -0.4105152936145448, -1.975037087593257, 0.3943803814276088, 1.9699007141534164, 0.1369527878510276]
      accelerations: [0.6577619163032115, 0.36722752884368365, 1.766774588750739, -0.3527940009759374, -1.7621798324654743, -0.12251147431822071]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 454395652
    - 
      positions: [-0.08268206647819665, -2.0143649994579813, -0.8197754036442211, -1.097231618181641, 0.800852891618931, 1.9163074459666989]
      velocities: [-0.7136720925169572, -0.3984420995559033, -1.9169515390097231, 0.38278171274958556, 1.9119662255529368, 0.13292502661943162]
      accelerations: [0.6196414791850674, 0.34594494380147595, 1.6643815831008284, -0.33234790764576005, -1.6600531148351454, -0.11541135064504526]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 488260905
    - 
      positions: [-0.10721145550302247, -2.028059721959188, -0.8856623152036649, -1.0840751536903515, 0.8665684546074073, 1.9208761683859603]
      velocities: [-0.6893051551625466, -0.3848380735878977, -1.8515009790785466, 0.3697123800507418, 1.8466858793963596, 0.1283865616431069]
      accelerations: [0.7705565615241994, 0.43020061652911856, 2.069745478344464, -0.41329199149493173, -2.064362801852477, -0.14352004586761818]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 523152310
    - 
      positions: [-0.13174084452784796, -2.041754444460394, -0.9515492267631083, -1.070918689199062, 0.9322840175958831, 1.9254448908052215]
      velocities: [-0.6624087054618859, -0.36982182452660234, -1.7792560486851734, 0.3552863303407219, 1.7746288325338722, 0.12337696223475753]
      accelerations: [0.7115960565409871, 0.39728305166561645, 1.9113752240597692, -0.3816682201317776, -1.906404412627044, -0.13253835444833806]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 559460445
    - 
      positions: [-0.15627023355267367, -2.0554491669616004, -1.0174361383225516, -1.0577622247077727, 0.9979995805843593, 1.930013613224483]
      velocities: [-0.6334731547846351, -0.3536671483321244, -1.7015340122142946, 0.33976659829049277, 1.6971089236110415, 0.11798756998536056]
      accelerations: [0.8132403900006437, 0.4540309363824814, 2.184395934130413, -0.4361856833488044, -2.178715092323421, -0.15147012419624606]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 597242836
    - 
      positions: [-0.18079962257749937, -2.069143889462807, -1.0833230498819955, -1.044605760216483, 1.0637151435728356, 1.9345823356437442]
      velocities: [-0.6027279707975777, -0.33650215647174264, -1.618951228917744, 0.32327626006826976, 1.6147409089471232, 0.11226112440517032]
      accelerations: [0.736215916096882, 0.41102828373398864, 1.9775051430526613, -0.39487320895967676, -1.9723623510728452, -0.13712392746028276]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 636952509
    - 
      positions: [-0.20532901160232497, -2.0828386119640134, -1.1492099614414388, -1.0314492957251937, 1.1294307065613114, 1.9391510580630056]
      velocities: [-0.5707066056476915, -0.3186246745094453, -1.5329405724147245, 0.3061014354882234, 1.5289539357634556, 0.10629698364701652]
      accelerations: [0.7917935043707696, 0.44205717107923015, 2.1267887489173902, -0.42468253547377505, -2.1212577230393137, -0.14747553358069393]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 678687774
    - 
      positions: [-0.22985840062715068, -2.09653333446522, -1.2150968730008826, -1.0182928312339041, 1.1951462695497872, 1.943719780482267]
      velocities: [-0.5299615348555536, -0.29587676027376086, -1.4234976966444464, 0.28424760633131635, 1.419795682233346, 0.098708008715187]
      accelerations: [1.0226368759724282, 0.5709366923804792, 2.7468431984355193, -0.5484965700776403, -2.7396996300757586, -0.190471275794621]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 722990599
    - 
      positions: [-0.2543877896519764, -2.110228056966426, -1.2809837845603265, -1.0051363667426148, 1.2608618325382634, 1.9482885029015282]
      velocities: [-0.483303854202066, -0.2698278444832884, -1.2981733163399085, 0.2592225183382043, 1.294797226349374, 0.09001778037657701]
      accelerations: [0.9020846997120007, 0.5036325863083086, 2.4230352728680855, -0.483837787719977, -2.416733814481541, -0.16801782496390574]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 771443946
    - 
      positions: [-0.2789171786768021, -2.1239227794676325, -1.3468706961197698, -0.9919799022513252, 1.3265773955267393, 1.9528572253207896]
      velocities: [-0.43528622633986436, -0.2430196721283468, -1.1691960639081742, 0.23346801563593128, 1.166155398167592, 0.08107425501148322]
      accelerations: [0.8869455139258544, 0.4951804007271188, 2.382370819547544, -0.4757178072337992, -2.3761751150323, -0.16519807525726996]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 824726988
    - 
      positions: [-0.3034465677016278, -2.137617501968839, -1.4127576076792137, -0.9788234377600357, 1.3922929585152155, 1.9574259477400509]
      velocities: [-0.3802690520008972, -0.21230366307446508, -1.0214177520939947, 0.20395927003003156, 1.018761405514081, 0.07082702881304595]
      accelerations: [0.9226396589978428, 0.5151083904208839, 2.4782467085545625, -0.49486254629396853, -2.4718016647367307, -0.17184628979937322]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 884523802
    - 
      positions: [-0.3279759567264535, -2.151312224470045, -1.478644519238657, -0.9656669732687462, 1.4580085215036918, 1.9619946701593123]
      velocities: [-0.3110176647384122, -0.17364071348271343, -0.8354057799525668, 0.16681593080664958, 0.8332331847711465, 0.057928608667691436]
      accelerations: [0.9808838730122382, 0.5476260510693405, 2.6346929768952436, -0.5261021312965742, -2.6278410716254568, -0.18269456841293852]
      effort: []
      time_from_start: 
        secs: 1
        nsecs: 954542594
    - 
      positions: [-0.352505345751279, -2.1650069469712516, -1.5445314307981004, -0.9525105087774567, 1.5237240844921676, 1.9665633925785735]
      velocities: [-0.19147945514121897, -0.10690270353604382, -0.5143214090482076, 0.10270099470587285, 0.5129838408366674, 0.035664014242109354]
      accelerations: [1.0326681043119186, 0.576537112689028, 2.7737874755134344, -0.5538768712060799, -2.7665738346119677, -0.19233964266500014]
      effort: []
      time_from_start: 
        secs: 2
        nsecs:  44820579
    - 
      positions: [-0.3770347347761048, -2.178701669472458, -1.6104183423575442, -0.9393540442861672, 1.5894396474806436, 1.971132114997835]
      velocities: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
      accelerations: [1.0091098232434597, 0.5633845583587215, 2.710508998431121, -0.5412412654826935, -2.7034599224844134, -0.18795179400038398]
      effort: []
      time_from_start: 
        secs: 2
        nsecs: 265310705
multi_dof_joint_trajectory: 
  header: 
    seq: 0
    stamp: 
      secs: 0
      nsecs:         0
    frame_id: ''
  joint_names: []
  points: []

Expected Behavior

Getting more accurate goals when planning to the same pose goals.

Actual Behavior

As you can appreciate in the photos the difference between both goals its considerable, but in the final pose recorded with the script there's no such difference.

@fmauch
Copy link
Collaborator

fmauch commented Aug 31, 2021

Thanks for the in-depth report.

From a driver's perspective two things would be important:

  1. Does the robot reach the actual last joint configuration of the trajectory? In that case, the /joint_statestopic should show the same position values as of the last point of your trajectory. I assume it does, but it would be nice if you could confirm this.
  2. Is the actual calibration taken into account correctly? You can easily compare the post generated by the forward kinematics to the internal pose (reported by the controller) by running rosrun tf2_tools echo.py tool0 tool0_controller -p 6. If your calibration is loaded correctly, it should be effectively an Identity transformation. For my model for example I get
- Translation: [0.000007, -0.000018, -0.000001]
- Rotation: in Quaternion [-0.000018, 0.000001, -0.000026, -1.000000]
            in RPY (radian) [0.000036, -0.000001, 0.000051]
            in RPY (degree) [0.002078, -0.000066, 0.002944]

Also, your driver launchfile should obviously not print:

[ERROR] [1630413046.546312518]: The calibration parameters of the connected robot don't match the ones from the given
kinematics config file. Please be aware that this can lead to critical inaccuracies of tcp positions. Use the ur_calibration
tool to extract the correct calibration from the robot and pass that into the description. See 
https://github.com/UniversalRobots/Universal_Robots_ROS_Driver#extract-calibration-information] for details.

If all this is the case, then please check the forward kinematics of your robot using rosrun tf2_tools echo.py world tool0. This should be equivalent to your "final pose".

Note: I would not expect any of these to fail. My wildest guess is that the running driver (description) does not use the correct calibration files, as otherwise this error should not exist.

@stefanscherzinger stefanscherzinger added the question Further information is requested label Sep 1, 2021
@ignacioDeusto
Copy link
Author

Apparently, there was a problem with the calibrations files, as the calibration error that you mentioned was present at launch time. On the other hand, I followed the calibrations steps and passed the calibrations files to the launchfile. So I'm going to explore again the calibration procedures.
Huge thanks for your response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants