Hi, Does anyone know why in my example I'm not able to save the actions of the gripper on URSim?They stay in yellow and I cannot run the program.ThanksErik
My historical experience, unless something has changed, is that if the Gripper is not physically connected, it is impossible to work with it in the simulator. Therefore, I was forced to create a set of scripting functions, which I bypassed this offline programming, bellow is an example If I working in URSim, set:isGripperSim = TrueIt may not be the best solution, but so far I can do it :-( def GripperReset(id="1"): if (isGripperSim): return True end rq_reset(id) rq_activate_and_wait(id) end def GripperActivate(id="1"): if (isGripperSim): return True end rq_activate_and_wait(id) end def GripperKeep(id="1", no=1): if (isGripperSim): return no==1 end return rq_is_object_detected(id) end def GripperClose(id="1", pspeed=100, pforce=100): if (isGripperSim): return True end rq_set_force_norm(pspeed, id) rq_set_speed_norm(pforce, id) rq_close_and_wait(id) end def GripperOpen(id="1", pspeed=100, pforce=100): if (isGripperSim): return True end rq_set_force_norm(pspeed, id) rq_set_speed_norm(pforce, id) rq_open_and_wait(id) end def GripperMove(id="1", pmm=0, pspeed=100, pforce=100): if (isGripperSim): return True end rq_set_force_norm(pforce, id) rq_set_speed_norm(pspeed, id) rq_move_and_wait_norm(pmm, id) end
Hi, here is very simple implemenatation:It is also possible to add a function for controlled opening in millimeters: def GripperMove(id="1", pmm=0, pspeed=100, pforce=100): if (isGripperSim): return True end rq_set_force_norm(pforce, id) rq_set_speed_norm(pspeed, id) rq_move_and_wait_norm(pmm, id) end
thanks @vmracko, great job!If I understood correctly, in this case you are using an external Script to simulate the functions of the gripper?Is not possible to use the built in functions from the URCaps then (even for other products)?
Yes, external script is loaded in BeforStart section a each function, which started with "rq_" are used from URCaps from Robotiq driver installation.Similar steps you can use in case of other product supported by URCaps.
Hi @vmracko,I tried to run a simple example but it's giving these errors.Also with this can we use the built in functions from the gripper URCap rather than from the script, such as Gripper Move, Gripper Check, etc?thanks
Sorry, in first post function GripperMove is included in external script, check it and remove one declaration: "def GripperMove(..):".Functions from the URCaps menu, as shown in the figure, you cannot use, if you want to run the program in URSim, you only have to use the functions from the script.Unfortunately, this is a tax for running the program offline :-(.
Thanks @vlastik but in this example, are you still able to Run? in other words, does the Gripper Move command becomes white instead of yellow?
Yes, in this case you have to make command "Gripper Move" on real robot with connected gripper - not on URSim.
Hi,
Does anyone know why in my example I'm not able to save the actions of the gripper on URSim?
They stay in yellow and I cannot run the program.
Thanks
Erik