Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

InstructionListJoints used with Python programs

#1
Hi,

First of, my setup is as follows:
KUKA KR6 R900-2 piloted by a CR5-micro controller running KSS 8.7, connected to RoboDK 5.6.5 from where I run python programs using the RoboDK embedded interpreter.

I would like to monitor the robot poses, joints, speeds, etc...  via the InstructionListJoints command, following up on this discussion: Get Joint Speeds for a Robot Path using Python API.

I am currently trying to run the ProgramSlider.py macro as a first testing step, but InstructionListJoints keeps returning the following error:
   

The robolink.LAST_STATUS_MESSAGE is indeed empty, since there's no error, be it offline or when the robot is connected and programs can be run on it.

Am I missing an obvious step?
Thanks in advance for the help!
#2
Make sure you select a program to run this script. Also, this program should have a valid robot linked to it.

Can you share the RoboDK project file you are trying to use? We can better take a look.
#3
Sure, it is attached here.


Attached Files
.rdk   KUKA_KR6R900_2_20122023_debug.rdk (Size: 919.92 KB / Downloads: 46)
#4
There are no programs in your project. You should first create a program using the user interface. You can't display this custom slider for programs defined by your Python scripts.

You can find more information about how to create programs using the user interface here:
https://robodk.com/doc/en/Robot-Programs...NewProgram
#5
Yes, I realised a bit earlier, after having a little play around, that InstructionListJoints will only work for non-Python based programs.
Made a simple program where the robot moves linearly via the interface MoveJ commands, reaching 3 consecutive targets.
The ProgramSlider.py worked well there, and I could play around with InstructionListJoints.

I'm guessing that monitoring moves, speeds, aso. through Python can only be done via the Pose and Joints functions then?
#6
Great, thank you for your feedback.

You can move robots from Python by using the MoveJ and MoveL functions.
#7
I might have been unclear.

I am concerned by how to monitor the position of the robot while performing these moves (MoveJ is what I use on the MWE uploaded in a previous post here).

InstructionListJoints would have been useful, but isn't compatible with Python programs to my knowledge?

If that´s the case, the only option I can see would be to record the results provided by the Pose and Joints function, work out the speeds and accelerations from these, and gather everything in a csv or in a packet via socket, with an attached timestamp.

The question really is: Is there an efficient alternative to InstructionListJoints in Python, or a way to use it in conjunction with a Python based program?
#8
The function InstructionListJoints does not work on Python-based programs. A workaround would be to use the Python script to generate a program automatically that you can later use to extract the joints.
#9
Alright then, Python coding it is!

Thanks for your help and the added infromation.nionListJointsInstructionLi
  




Users browsing this thread:
1 Guest(s)