Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call Plugin command from robot program
#1
Question
Is there a way to call a (blocking) plugin-command from a robot program?

A little background to my question: In the example Synchronize-3-Robots, a python script is used for the synchronization of the three robot programs. The invocation of the python script however takes considerable time. Since I was already able to improve the performance of my application by moving from the C# API to a C++ plugin (about factor 60) I was thinking whether the synchronization of the simulation could also be performed internally (within the plugin).

Best regards,

Michael
#2
Hi Michael,

I'm not sure if I understand correctly, but you can call a C++ plugin from the Python script, which can be called from a Program.
See//www.sinclairbody.com/doc/en/PythonAPI/robo...ginCommand
Please read the论坛Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
#3
Hi Sam,

what I am looking for is a way to do this, but without the Python script in between (because to me it seems that launching the Python interpreter takes quite some time).

Best regards,

Michael
#4
Hi Michael,

What are you trying to do exactly?

Only Python scripts can be called with a Program Call Instruction from a RoboDK Program.
Calling a RoboDK Plug-In from the Python script should not take longer than a few milliseconds.

Code:
from robolink import *
RDK = Robolink()
resp = RDK.PluginCommand("MyPlugin", plugin_command='DoSomething', value='WithThisValue')
print(resp)

You stated that you need blocking function calls, so the following might not apply: you can also use event-based code with Plug-Ins to update the robot poses on each render for instance.
Seehttps://github.com/RoboDK/Plug-In-Interf...odk.h#L212.
Please read the论坛Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .




Users browsing this thread:
1 Guest(s)