
MTP
Australia
Asked
— Edited

hello, i am not familiar with plugin creation and am having trouble with errors in visual studio, i hope someone can help me?
Sincerely thank you!
M-TP
!
M-TP
Related Hardware EZ-Robot EZ-B v4
Related Control
Synbot Plugin
Visual studio errors codes are clear: Missing constants or namespaces.
Please follow the plugin tutorial instructions:
Make an ARC skill control
https://synthiam.com/Community/Tutorials/Make-an-EZ-Builder-Behavior-Control-16328
Are you familiar with C# and .NET ?
I think there will be something to do, sorry you can help me.
Best regards!
M-TP
private async void OnIntentHandler(object sender, string SpeechIntentEventArgs )
{
WriteDebug("--- Intent received by OnIntentHandler() ---");
WriteDebug(e.Payload);
dynamic intenIdentificationResult = JObject.Parse(e.Payload);
var res = intenIdentificationResult["topScoringIntent"];
var intent = Convert.ToString(res["intent"]);
switch (intent)
{
case "TrackFace":
{
ToggleFaceRecognitionEvent?.Invoke(this, null);
break;
}
case "ComputerVision":
{
var currentBitmap = camera.GetCurrentBitmap;
var cvc = new ComputerVisionCommunicator();
var description = await cvc.RecognizeObjectsInImage(currentBitmap); (1)
ezb.SoundV4.PlayData(ezb.SpeechSynth.SayToStream(description));
break;
}
case "FindScrewdriver":
{
//We are trying to find screwdriver, first in front, then on the right, last on the left
ezb.SoundV4.PlayData(ezb.SpeechSynth.SayToStream("I am on it"));
this.ezb.Servo.SetServoPosition(HeadServoHorizontalPort, mapPortToServoLimits[HeadServoHorizontalPort].CenterPosition); (2)
this.ezb.Servo.SetServoPosition(HeadServoVerticalPort, mapPortToServoLimits[HeadServoVerticalPort].MinPosition + 55); (3)
await Task.Delay(1000);
if (RecognizeObject("screwdriver"))
{
//Forward();
//squatGrabPosition.StartAction_Grab();
//Reverse();
////Grab
ezb.SoundV4.PlayData(ezb.SpeechSynth.SayToStream("Screwdriver is in front of me"));
return;
}
error:
(1)Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'ComputerVisionCommunicator' could not be found (are you missing a using directive or an assembly reference?) EZFormApplication C:\Users\HP\source\repos\ClassLibrary7\EZFormApplication\Form2.cs 796 Active
(2)Severity Code Description Project File Line Suppression State
Error CS0103 The name 'HeadServoHorizontalPort' does not exist in the current context EZFormApplication C:\Users\HP\source\repos\ClassLibrary7\EZFormApplication\Form2.cs 194 Active
(3)Severity Code Description Project File Line Suppression State
Error CS0103 The name 'mapPortToServoLimits' does not exist in the current context EZFormApplication C:\Users\HP\source\repos\ClassLibrary7\EZFormApplication\Form2.cs 806 Active