UR6 trajectory planning

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

UR6 trajectory planning

gardiaza
This post was updated on .
Dear Rosen,
first of all, thanks for all your help, and for openrave!
I'm in the process of making our universal robots work, and for the application we have, we will be continously geting new positions where the robot has to move, so I cannot precompute much.
I made a small python script, plus an environment (from your examples), I'm copying them here:

test.py:
from openravepy import *                                                                                                            
import numpy, time                                                                                                                  
env = Environment() # create the environment                                                                                        
env.SetViewer('qtcoin') # start the viewer                                                                                          
env.Load('ur5.env.xml') # load a scene                                                                                              
robot = env.GetRobots()[0] # get the first robot                                                                                    
                                                                                                                                   
robot.SetActiveManipulator('arm') # set the manipulator to arm                                                                      
ikmodel = databases.inversekinematics.InverseKinematicsModel(robot,iktype=IkParameterization.Type.Transform6D)                      
if not ikmodel.load():
    ikmodel.autogenerate()

manipprob = interfaces.BaseManipulation(robot) # create the interface for basic manipulation programs
Tgoal = numpy.array([[0,-1,0,-0.81],[-1,0,0,0.24],[0,0,-1,0.02],[0,0,0,1]])
res = manipprob.MoveToHandPosition(matrices=[Tgoal],seedik=1000) # call motion planner with goal joint angles
robot.WaitForController(0) # wait
time.sleep(2)
Tgoal = numpy.array([[1,0,0,-0.81],[0,0,-1,-0.24],[0,-1,0,0.22],[0,0,0,1]])
res = manipprob.MoveToHandPosition(matrices=[Tgoal],seedik=1000) # call motion planner with goal joint angles
robot.WaitForController(0) # wait
time.sleep(2)
Tgoal = numpy.array([[0,-1,0,-0.81],[-1,0,0,0],[0,0,-1,0.22],[0,0,0,1]])
res = manipprob.MoveToHandPosition(matrices=[Tgoal],seedik=1000) # call motion planner with goal joint angles
robot.WaitForController(0) # wait

time.sleep(10)


ur5.env.xml:
<Environment>

  <camtrans>0.430986 -1.233453 1.412977</camtrans>
  <camrotationaxis>-0.946522 -0.231893 0.224324 122.297980</camrotationaxis>
  <Robot file="robots/universalrobots-ur6-85-5-a.zae" name="universal">
    <translation>0 0 0</translation>
    <RotationAxis>0 0 1 -45</RotationAxis>
    <jointvalues>0 1.5707 0 0 0 0</jointvalues>
    </Robot>

  <KinBody name="floorwalls">
    <Body type="static">
      <Translation>0 0 0</Translation>
      <Geom type="box">
        <extents>0.8 0.4 0.005</extents>
        <translation>-0.4 0 0</translation> 
        <diffuseColor>.0 .6 .0</diffuseColor>
        <ambientColor>0.0 0.6 0.0</ambientColor>
        <transparency>0.2</transparency>
      </Geom>
      <Geom type="box">
        <extents>0.005 0.8 0.8</extents>
        <translation>0.4 0 0.8</translation> 
        <diffuseColor>.0 .6 .0</diffuseColor>
        <ambientColor>0.0 0.6 0.0</ambientColor>
        <transparency>0.2</transparency>
      </Geom>
    </Body>
  </KinBody>
 
  <KinBody name="BluePhantom">
    <Body type="static">
      <Translation>0 0 0</Translation>
      <Geom type="box">
        <extents>0.055 0.095 0.05</extents>
        <translation>-0.7 0 0.10</translation> 
        <diffuseColor>0 0 .6</diffuseColor>
        <ambientColor>0 0 .6</ambientColor>
        <transparency>0</transparency>
      </Geom>
    </Body>
  </KinBody>
 
</Environment>


There are several things I've noticed:
- The UR6 model of the robot model is rotated 45 degrees, how can I correct that? (and submit a patch?)
- The ikmodel.autogenerate() is very slow in this robot (8-10 hours) vs the other robots that are quite fast (< 5 minutes). I know I just need to do it once, but I just want to inform you.
- The trajectories are sometimes very complex for movements that look quite easy (compare the second trajectory with the third one). Is there any way to make the planning more efficient there?
- I've been playing with the "ikseed" parameter, and with some values (usually bigger) I get trajectories that are much better behaved (shorter movements). What is the purpose of ikseed? I didn't manage to find it.

Thanks for your help and suggestions.

Cheers,

Jose
Reply | Threaded
Open this post in threaded view
|

Re: UR6 trajectory planning

Rosen Diankov
Administrator
we've set the defaults so planning completes fast, if you want optimal
trajectories there's a million parameters to tweak ;0).

just focusing on the parameters available through the
BaseManipulation.MoveToHandPosition, you could try:

- set minimumgoalpaths to 8+
- set goalsampleprob to 0.5+
- set goalmaxtries to 100+
- set goalsamples to 100+
- set maxiter to 6000+
- set steplength to 0.01 or less

rosen,

2012/10/30 gardiaza <[hidden email]>:

> Dear Rosen, first of all, thanks for all your help, and for openrave! I'm in
> the process of making our universal robots work, and for the application we
> have, we will be continously geting new positions where the robot has to
> move, so I cannot precompute much. I made a small python script, plus an
> environment (from your examples), I'm copying them here: test.py: from
> openravepy import * import numpy, time env = Environment() # create the
> environment env.SetViewer('qtcoin') # start the viewer
> env.Load('ur5.env.xml') # load a scene robot = env.GetRobots()[0] # get the
> first robot robot.SetActiveManipulator('arm') # set the manipulator to arm
> ikmodel =
> databases.inversekinematics.InverseKinematicsModel(robot,iktype=IkParameterization.Type.Transform6D)
> if not ikmodel.load(): ikmodel.autogenerate() manipprob =
> interfaces.BaseManipulation(robot) # create the interface for basic
> manipulation programs Tgoal =
> numpy.array([[0,-1,0,-0.81],[-1,0,0,0.24],[0,0,-1,0.02],[0,0,0,1]]) res =
> manipprob.MoveToHandPosition(matrices=[Tgoal],seedik=1000) # call motion
> planner with goal joint angles robot.WaitForController(0) # wait
> time.sleep(2) Tgoal =
> numpy.array([[1,0,0,-0.81],[0,0,-1,-0.24],[0,-1,0,0.22],[0,0,0,1]]) res =
> manipprob.MoveToHandPosition(matrices=[Tgoal],seedik=1000) # call motion
> planner with goal joint angles robot.WaitForController(0) # wait
> time.sleep(2) Tgoal =
> numpy.array([[0,-1,0,-0.81],[-1,0,0,0],[0,0,-1,0.22],[0,0,0,1]]) res =
> manipprob.MoveToHandPosition(matrices=[Tgoal],seedik=1000) # call motion
> planner with goal joint angles robot.WaitForController(0) # wait
> time.sleep(10) ur5.env.xml: 0.430986 -1.233453 1.412977 -0.946522 -0.231893
> 0.224324 122.297980 0 0 0 0 0 1 -45 0 1.5707 0 0 0 0 <Body type="static"> 0
> 0 0 0.8 0.4 0.005 -0.4 0 0 .0 .6 .0 0.0 0.6 0.0 0.2 0.005 0.8 0.8 0.4 0 0.8
> .0 .6 .0 0.0 0.6 0.0 0.2 </Body> <Body type="static"> 0 0 0 0.055 0.095 0.05
> -0.7 0 0.10 0 0 .6 0 0 .6 0 </Body> There are several things I've noticed: -
> The UR6 model of the robot model is rotated 45 degrees, how can I correct
> that? (and submit a patch?) - The ikmodel.autogenerate() is very slow in
> this robot (8-10 hours) vs the other robots that are quite fast (< 5
> minutes). I know I just need to do it once, but I just want to inform you. -
> The trajectories are sometimes very complex for movements that look quite
> easy (compare the second trajectory with the third one). Is there any way to
> make the planning more efficient there? - I've been playing with the
> "ikseed" parameter, and with some values (usually bigger) I get trajectories
> that are much better behaved (shorter movements). What is the purpose of
> ikseed? I didn't manage to find it. Thanks for your help and suggestions.
> Cheers, Jose
> ________________________________
> View this message in context: UR6 trajectory planning
> Sent from the OpenRAVE Users List mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> The Windows 8 Center - In partnership with Sourceforge
> Your idea - your app - 30 days.
> Get started!
> http://windows8center.sourceforge.net/
> what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
> _______________________________________________
> Openrave-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openrave-users
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users