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

Getting linear speed of the robot using the Python API

#1
Hi there,

I'm using the 3D printing feature of RoboDK.
I have used a Python program to command the extruder (via serial port). Though, to extrude with a proper feed rate, I need to get the current linear speed of the robot at any time and pass it to the extruder controller board.
I have seen there is a method to set the speed but any idea how to get the linear speed?

Thanks,
Poe
#2
Hi Poe,

You can store the linear speed in your post processor. The speed is provided through the setSpeed function of your post processor:
https://robodk.com/doc/en/PythonAPI/post...or-methods

We also have an example in our documentation that shows how you can calculate the average linear speed of the robot when you take accelerations into account:
https://robodk.com/doc/en/Robot-Machinin...rint3Dpost

In this example, the variable speed_mms is the average speed between two points assuming the robot needs to accelerate/decelerate. We use this average speed to update the extruder signal.

Albert
#3
Hi Albert,

Is there any way to modify/edit the [kuka] robot driver? I'm using online programming, so I need a way to read "Extruder" callbacks from RoboDK and control the extruder.

Thanks,
Poe

(11-12-2021, 12:15 PM)Albert Wrote: Hi Poe,

You can store the linear speed in your post processor. The speed is provided through the setSpeed function of your post processor:
https://robodk.com/doc/en/PythonAPI/post...or-methods

We also have an example in our documentation that shows how you can calculate the average linear speed of the robot when you take accelerations into account:
https://robodk.com/doc/en/Robot-Machinin...rint3Dpost

In this example, the variable speed_mms is the average speed between two points assuming the robot needs to accelerate/decelerate. We use this average speed to update the extruder signal.

Albert
#4
I don't think using the driver for 3D printing is a good idea.
The driver forces a handshake between the controller and RoboDK at the end of each move (for safety purposes).
The robot will therefore stop for a short amount of time at each point.
For 3D printing, fluid motion is the key if you want a good result. You have a better chance to achieve this using the post-processor.

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#5
(12-15-2021, 10:49 PM)Jeremy Wrote: I don't think using the driver for 3D printing is a good idea.
The driver forces a handshake between the controller and RoboDK at the end of each move (for safety purposes).
The robot will therefore stop for a short amount of time at each point.
For 3D printing, fluid motion is the key if you want a good result. You have a better chance to achieve this using the post-processor.

Jeremy

Thank you for your reply, Jeremy.
That's true. The path and synchronization should be very smooth and continuous for 3D printing.
Would you please guide me on how to control/command the extruder using the KUKA robot controller? I have no idea where to start and what's the correct way. I greatly appreciate your help.

Poe
#6
There are many threads on the forum regarding that same exact question, did you try a quick search?
Search for the word "extruder" and you should find plenty to read.

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


  




Users browsing this thread:
2 Guest(s)