Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[HELP] Tool changer with Mechanism
#1
Hi guys!

What I'm basically looking for is a solution on making a tool changer in RoboDK.
I've already saw this post: https://robodk.com/forum/Thread-Automati...-in-RoboDK

And I'm pretty much doing the same thing as Jeremy suggested in his post (hiding one object, then showing the other object and etc.), but in my case, I have a mechanism on the robot's flange (fork tool) and I can't simply Show/Hide a Mechanism. Meaning that RoboDK allows me to Show/Hide only Objects and Tools, but not Mechanisms.

The thing is, the fork tool is consisted of two parts: One stationary part (that connects to the robot) and one moving part (the fork itself). And in order to move the fork forward/backward, I have to make it like a Mechanism (1 linear axis), right? That's the case. If I make it like an mechanism,
If there's a way to make a tool in RoboDK, that has an attached Mechanism on it, that would be great. But i don't think there is one (Please, correct me if I'm wrong)

I've attached my project. 
Adler


Attached Files
.rdk   RV-35F (sus novi pozicii).rdk (Size: 12.11 MB / Downloads: 28)
#2
Hi AdlerAdemov,

I made two python scripts, one that hide the mechanism and another one that show it, you can call these scripts with the Program Call Instruction. 

Olivier


Attached Files
.rdk   RV-35F (sus novi pozicii).rdk (Size: 12.14 MB / Downloads: 34)
#3
(03-12-2021, 03:20 PM)Olivier Wrote: Hi AdlerAdemov,

I made two python scripts, one that hide the mechanism and another one that show it, you can call these scripts with the Program Call Instruction. 

Olivier

Thank you, Olivier. I've gave it a try and it worked like a charm .

Although it worked, when I hide it, then show it, the reference frame and the target positions for opening/closing the fork tool are visible.
Can we hide them somehow after hide/show sequence?

Picture of the reference frame with the mechanism and the target positions (closed/open):
[Image: robo-DK-Tool-changer-with-Mechanism-issu...w-hide.png]

Since I've progressed a bit more in the project, I've attached it again. You can find your Python code in folder Tool Changer --> Python to Show/Hide Fork Tool.

Thank you, once more :)


Attached Files
.rdk   RV-35F (after Oliviers python snippet).rdk (Size: 14.57 MB / Downloads: 25)
#4
Hi AdlerAdemov,

The way the python script work at the moment is it hide/show everything inside the reference frame. 

Option A : You can put the targets inside a separate reference frame.

Option B : You can modify the python script to hide/show only the mechanism :

from robolink import *    # RoboDK API
from robodk import *      # Robot toolbox
from math import *
RDK = Robolink()

MechanismToHide = RDK.Item("My Mechanism"itemtype=ITEM_TYPE_ROBOT)
MechanismToHide.setVisible(1)
  #With 1 to set it visible or 0 to set it invisible.


Olivier
#5
Hi Adler,

Or you can just hide them manually from the get-go.
Right-click on it in the station tree and "Visible".

You don't really need to see those at any point anyway.

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


#6
(03-15-2021, 06:44 PM)Olivier Wrote: Hi AdlerAdemov,

The way the python script work at the moment is it hide/show everything inside the reference frame. 

Option A : You can put the targets inside a separate reference frame.

Option B : You can modify the python script to hide/show only the mechanism :

from robolink import *    # RoboDK API
from robodk import *      # Robot toolbox
from math import *
RDK = Robolink()

MechanismToHide = RDK.Item("My Mechanism"itemtype=ITEM_TYPE_ROBOT)
MechanismToHide.setVisible(1)
  #With 1 to set it visible or 0 to set it invisible.


Olivier

(03-15-2021, 07:55 PM)Jeremy Wrote: Hi Adler,

Or you can just hide them manually from the get-go.
Right-click on it in the station tree and "Visible".

You don't really need to see those at any point anyway.

Jeremy

Hey guys. Yeah, I've went through some of the Python API documentation earlier and I've realized that I can simply show/hide only the Mechanism itself. So I've tried both options (manually unchecking the "Visible" checkbox and automatically hide the reference frame from the Python itself). Python now does exactly what i want it to do.
Pretty easy. Worked.

I should've read some of the documentation earlier, buuuut... you know what's up when project deadline is literally in the next morning.

Thanks once more.
#7
I have completed the project we wanted to do and I'm uploading it here. Sharing is caring :)


Attached Files
.rdk   RV-35F (vacuum and fork demo).rdk (Size: 14.59 MB / Downloads: 22)
#8
Nice demo. Very cool.

Small thing to improve your experience.

"Tools"->"Options"->"Display"->"Simplify Objects"->Select the robot.

That will simplify the 3D model of the robot a bit and increase the frame rate quite a bit (it tripled it on my end, from 20 FPS, to 60 FPS).
You can see the frame rate by going to "Tools"->"Options"->"Display"->"Display text on screen"->"Render time".

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


#9
That actually helped, when I've presented the demo on a slower PC. Thanks Jeremy!

It comes to my attention, that I can't see the FPS counter anywhere. I've checked the instruction and I know where should i expect it to pop out, but it doesn't appear at all.
#10
If you are using the "opaque tree", it won't appear I think.

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:
1 Guest(s)