Vietnam
Asked — Edited
Resolved Resolved by ptp!

Error Plugin In Visual Studio

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 !

User-inserted image

User-inserted image

User-inserted image

  M-TP


Related Hardware EZ-B v4
Related Control Synbot Plugin

ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

Vietnam
#2   — Edited

Sorry, but I am not familiar with .net, the error is quite obvious but I only fix each statement if it is fixed and will need a long command and it switches to another error:"Severity Code Description Project File Line Suppression StateError CS1061 'Form1.SpeechErrorEventArgs' does not contain a definition for 'SpeechErrorCode' and no accessible extension method 'SpeechErrorCode' accepting a first argument of type 'Form1.SpeechErrorEventArgs' could be found (are you missing a using directive or an assembly reference?) EZFormApplication C:\Users\HP\source\repos\ClassLibrary7\EZFormApplication\Form2.cs 1041 Active" I think there will be something to do, sorry you can help me. Best regards! M-TP

Vietnam
#3  

This is my code: 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

Vietnam
#4  

yes i found the answer thank you