Author Topic: Move Stäubli TX60 with joystick  (Read 289 times)

0 Members and 1 Guest are viewing this topic.

Offline thyplock

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
Move Stäubli TX60 with joystick
« on: July 27, 2018, 08:46:33 AM »
Hello,

I'm working with a Staubli TX60, a CS8C controller and the Staubli Robotics Studio 2013.4.5 software. I am developing my final degree project. The project consist of moving TX60 with a joystick (Logitech 3D Extreme Pro) to simulate a surgeon robot (it's only an approximation). I've manage to move the robot with the joystick, however the movement isn't continuous. The communication channel is a socket in a local network. I read joystick inputs, process data and send by socket to CS8 controller. The controller process data and send movement commands to TX60. The data processing consist in read joystick range in axis and scale this number for increase/decrease movement in robot joint (work in joint mode). The data is converted to string by delimiters and sent to CS8, which after will process string and execute movej command. Furthermore I have a force/torque Schunk FTCL 50-80 sensor for read pressure data and not kill someone during the operation!   :fish:

I would like to know if some of you have tried this and have a better way to do it or have some suggestions.

I'm waiting for the university to give permission to use the Stäubli velocity/direction add-on controller.

Thank you very much for all suggestions

Best regards
Thyplock

Offline TygerDawg

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 46
  • Posts: 393
Re: Move Stäubli TX60 with joystick
« Reply #1 on: July 27, 2018, 02:49:37 PM »
Many years ago my colleague attached a 6-DOF force-torque sensor with analog output to the tool flange.  He used the V+ command ALTER to effect realtime motion by reading & scaling the signals and changing the TCP location components.  He grabbed the EOAT and dragged the robot around with his hand.  The current position was updated continuously. 

I think VAL3 also has an alter command that may offer some benefits.
TygerDawg
Blue Technik
Virtuoso Robotics Engineering
www.bluetechnik.com

Offline thyplock

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
Re: Move Stäubli TX60 with joystick
« Reply #2 on: August 02, 2018, 12:12:56 PM »
Hi TygerDawg,

I found in VAL3 manual the respective commands for alter motion in real time. Currently, after doing many tests, the problem is that the commands return errors and I'm unable to see what I'm doing wrong.

My current start process is:
begin
  //Init (open user page, clear screen and enable TX60 power)
  userPage()
  cls()
  if (!isPowered())
    enablePower()
  endIf
  mNomSpeed.vel = 20
  putln("#######################")
  putln("# THE STAUBLI SURGEON #")
  putln("#######################")
 
  // TEST MOVEMENT AREA //
  // Register nominal movement for after modify motion trajectory
  alterMovej(startPos, tool1, mNomSpeed)

  // Enable alter mode with this command (alterBegin)
  naux = alterBegin(tool1, mNomSpeed)
  put("alterBegin: ")
  putln(naux)

  //Execute alter of motion trajectory
  naux = alter({0, 200, 0, 0, 0, 0})
  put("alter: ")
  putln(naux)

  //End alter mode and finish execution
  delay(5)
  naux = alterEnd()
  put("alterEnd: ")
  putln(naux)
end



When try start alter mode with alterBegin command, this return a -2 error code, as a result, I can not alter the trajectory in real time. It's impossible start alter mode. However, i read val3 manual and not found anything that makes me think that the code is wrong.

Any ideas?

 :help:

Thank you very much for all suggestions

Best regards
Thyplock

Offline TygerDawg

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 46
  • Posts: 393
Re: Move Stäubli TX60 with joystick
« Reply #3 on: August 04, 2018, 03:28:57 PM »
Sorry I don't know, I'm no expert on VAL3 alter command.
I do not have a recent VAL3 manual that identifies error code -2.
VAL3 Ref Manual states that the alter function is an option.
Perhaps your controller does not have that alter option installed.
Best path forward is to contact Staubli Applications Engineering Support for answers.

Other than that, some suggestions for your code:
  • after enable power, you should put in a wait until powered command, issue an error if not enabled in sufficient time.
  • if I was using enable, I would probably start a 2nd task with the purpose of reading & processing your TCP control input signals, then setting appropriate trsf variables.  Set in a do-while loop.  Then enable this process loop when the altering process starts, bypass the loop when not altered.
TygerDawg
Blue Technik
Virtuoso Robotics Engineering
www.bluetechnik.com