Discussion

Left ArrowBack to discussions page
wileydaviswileydavis Posts: 9 Apprentice
edited February 17 in Programming
we just got our ur5 and robotiq  gripper loading parts on one of our Cnc mills and it's working great but I'd like to program a few routines that require an incremental move from the robots current position. We're using the force feature to insert parts so I don't always know ahead of time exactly where the tcp is. Can anyone provide a simple example of how to move say 1" from the current position in the z with respect to a particular reference feature? I feel like this is probably obvious but I'm missing something. 

Best Answers

  • matthewd92matthewd92 Posts: 521Founding Pro, Tactile Sensor Beta Testers Handy
    edited February 17 Accepted Answer
    @wileydavis

    You can do this a couple of ways, create a variable and then use this as a waypoint or just use script to do the move. 

    newWaypoint = pose_trans(Tool,p[0,0,.0254,0,0,0]) 
    Movel
      newWaypoint
    
    The pose trans function is transposing the current tool position by using the Tool pose, you can't type that you'd have to select it from the pose drop down menu. If you want to type it it would be something like this 

    newWaypoint = pose_trans(get_actual_tcp_pose(),p[0,0,.0254,0,0,0]) 
    If you want to do it all programmatically then it would simply become something like this

    movel(pose_trans(get_actual_tcp_pose(),p[0,0,.0254,0,0,0]),a=1.2,v=.25)
    Where a and v are the acceleration and velocity in m/s/s and m/s respectively. 


    The the other way which I use occasionally is to use a relative waypoint. I don't like the control that this gives you or rather lack in my opinion but it's relatively easy to set up and builds this command behind the scenes for you

Comments

  • wileydaviswileydavis Posts: 9 Apprentice
    @matthewd92 Exactly what I was looking for, thanks. Three questions: 

    1: I assume from what you provided that script coordinates are expressed in meters regardless of the units the polyscope gui is set to use, is that correct?

    2: When using the relative waypoint, is there a way to use the current position as the start point? In my attempts to use it it seemed like you have to specify a known start point ahead of time.

    3: What is the difference between pose_add and pose_trans?

    Thanks again. 
  • matthewd92matthewd92 Posts: 521Founding Pro, Tactile Sensor Beta Testers Handy
    Glad we were able to help, that's what the community is all about. Don't be shy now helping others as well. 
Sign In or Register to comment.
Left ArrowBack to discussions page