In fact, if you are using a standard robot, he is usually set up automatically with the robot controller and does not need to be set up separately, you just need to capture the coordinate frame from TOOL1 to TOOL16 to the position you want to be the gripper.
If you are using a non-standard robot that you have created yourself, you can implement them via scripts or plugins, for the plugin part you can visit the following two links
Here I specifically talk to you about the part with scripts, specifically, it is actually the specific process of these two plugins done manually.
Performing a crawl is actually done in vc in a number of ways, when you want him to be connected to the robot signals you can do so:
- add a python script;
from vcScript import *
def OnSignal( signal ):
pass
def OnRun():
# Example listening on robot port 100
while exe.DigitalOutputSignals.input(100) != True:
delay(0.0001)
cont.grab(compsignal.Value)
comp = getComponent()
exe = comp.findBehaviour('Executor')
cont = comp.findBehaviour('GraspContainer')
compsignal = comp.findBehaviour('ComponentSignal')
- Create a ray sensor, a component signal and a component container at the end and connect the signal to the script.
Once this is done, you can use Set OUT[100] == True to grab it, note that while is used here because it’s listening to the robot’s (or actuator’s to be exact) port, and if it’s listening to any other model you can use triggerCondition to achieve this, which places the simulation lag.