Left ArrowBack to discussions page
VT_340VT_340 Posts: 17 Apprentice

I am wondering about that it is not easily possible to change the TCP-Offset via URScript?! 
Is there any trick how to manage that? Basically I want to have the same trajectory with different tool-geometries. In the Dashboard you can set this easily in the configuration tab, so I thought this is possible via URScript as well? If not my whole project will fail, as I always thought this is easily manageable.

Thanks in advance.



  • matthewd92matthewd92 Posts: 508Founding Pro, Tactile Sensor Beta Testers Handy
    @VT_340 you can use this script function, set_tcp(pose),  to change the tcp by passing in a pose representing the offset in x, y z and the rotation of the tcp around x, y and z

    Here is an example of the script code from one of our production programs that has 3 TCP's, this is the script that was generated from the .urp polyscope file but it shows you how its used.

    . set_tcp(p[-0.11324,0.0,0.11216,0.0,-0.757,0.0])
      set_payload(2.0, [0.0, 0.0, 0.1])
      set_gravity([0.0, 0.0, 9.82])

    The set_payload has 2 arguments, the mass in kg, in this case 2, and the CoG in meters from the tool flange

     The set_gravity is telling the system the magnitude of gravity in each of the axes, in this case the robot is mounted normally (base parallel with the ground) so all of the gravity is acting in a single axis, Z.

  • VT_340VT_340 Posts: 17 Apprentice
    Hey it's matthew again who gives me advice. great! Thank you!

    Is it really that easy that the first three arguments are the offset? Or is this somehow different?

  • matthewd92matthewd92 Posts: 508Founding Pro, Tactile Sensor Beta Testers Handy

    It is just that easy, there is the TCP configuration from the installation tab on the robot screen, you can see that these settings match the information in the set_tcp() method. Just remember the X,Y,Z in the pose are in meters, and the rotations are in radians.

  • VT_340VT_340 Posts: 17 Apprentice
    edited July 20
    It works now. Sponge suspension is not working, thats the reason why the line is not comletly gone.


    Thanks for your help.
  • matthewd92matthewd92 Posts: 508Founding Pro, Tactile Sensor Beta Testers Handy
    Great work, that's really cool. 
  • VT_340VT_340 Posts: 17 Apprentice
    Well now I ran into another problem: When the TCP is set to a new value, the robot goes there immediately and a way too fast which leads to a jerk violation stop. Any idea how to do that?

Sign In or Register to comment.
Left ArrowBack to discussions page