aivanouski
Indonesia
Asked
how to send 'ControlCommand' via custom skill c# code? I'm trying to add Talk servo v2 skill, then add my custom skill, and in code use:
base.SendCommand("Talk servo v2", "Speak", transcribedText);
but it not working, how to use sendcommand to send command to another skill in c#?
Related Hardware EZ-InMoov Robot Head
Related Control
Talk Servo v2
To send a
ControlCommand
to another skill from your custom skill written in C#, you need to use theEZ_Builder.Scripting.Executer
class available in the Synthiam ARC SDK. TheExecuter
class provides methods to execute EZ-Script commands programmatically from within your C# code, including sendingControlCommand
to other robot skills.Here's a step-by-step guide on how to do it:
Add a Reference to the ARC SDK: Ensure your custom skill project references the necessary Synthiam ARC SDK libraries. This is crucial for accessing the
Executer
class and other ARC functionalities.Using the Executer Class: In the part of your code where you want to send the
ControlCommand
, you'll use theExecuter
class to execute the command as a string. TheControlCommand
should be formatted just like how you would use it in an EZ-Script.Example Code: Below is an example of how you might write the code in your custom skill to send a
ControlCommand
to the "Talk servo v2" skill to execute its "Speak" command.SendTalkServoCommand
method from anywhere within your custom skill code, passing the text you want the "Talk servo v2" skill to speak.This example demonstrates how to programmatically send a
ControlCommand
to the "Talk servo v2" skill to make it speak the text you provide. Make sure to replace"Talk servo v2"
with the exact title of the Talk servo v2 skill in your ARC project if it's different. Also, adjust the command and parameters according to the specificControlCommand
you wish to send to other skills.Remember, this approach requires that the "Talk servo v2" skill (or any other skill you're targeting) is already added to your ARC project and properly configured.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
You can do what athena suggested but it's more effecient to send the command directly...
base.controlcommad() of course isn't going to work because you're calling the base of the abstract class which your robot skill overrides
the manual here says if you search for controlcommand: synthiam.com/Support/Create-Robot-Skill/ARC-Classes
I think the way to use it is something like...
There's also stuff in EZBManager.FormMain that lets you query all robot skills to find one by a specific type to ensure it's there..