Robot Not a Dev? Pre-order Now
Not a Dev?

Misty Community Forum

Face Recognition Skill arm movements

While waiting to work out the locomotion issues I thought I’d play with the other skills. The face recognition skill works very well. One part I wanted to change right away was how slow the arm movement was. First I changed the 10’s in all of the arm movement code to 100. (All the pasted code is directly from Github, not the code I edited and used)

 misty.MoveArmDegrees("both", 70, 10); // Raises both arms

That made it faster but not fast enough, so I put in 500, which made it faster again, then 1000 and saw no noticeable change in speed.

Next I wanted the arms to raise higher when she recognized me, that’s when I got confused. One line of code is listed as 70 with the //comment Raises both arms. Another line has -80 with the //comment raises both arms.

 // Tells Misty how to react if the face is unknown.
    if (faceDetected == "unknown person") {
        misty.ChangeLED(255, 0, 0); // Changes LED to red
        misty.DisplayImage("e_Disgust.jpg"); // Raises eyebrows
        misty.MoveArmDegrees("both", 70, 10); // Raises both arms
    // Tells Misty how to react when she sees you. Replace
    // "<Your-Name>" below with the label you have trained Misty to
    // associate with your face.
    else if (faceDetected == "<Your-Name>") {
        misty.ChangeLED(148, 0, 211); // Changes LED to purple
        misty.DisplayImage("e_Joy.jpg"); // Shows happy eyes
        misty.MoveArmDegrees("both", -80, 10); // Raises both arms

Finally at the bottom it goes back to 70 with the //comment Lower both arms?

function _timeoutToNormal() {
    misty.MoveHeadPosition(0.1, 0.1, 0.1, 40); // Faces head forward
    misty.MoveArmDegrees("both", 70, 10); // Lowers arms
    misty.ChangeLED(0, 255, 0); // Changes LED to green
    misty.DisplayImage("e_DefaultContent.jpg"); // Show default eyes

To confuse me more, I figured I’d use the command center to manually move the arms where I’d like and check the actuator position to see what numbers I should use. When I put them in the same position that the skill put the arms at -80 the actuator position only read about -30 in the command center. What am I not understanding here? Thanks

1 Like

I will try it out again (later today), I need some sleep tonight.
But I thought the -80 was down.

misty.MoveArmDegrees(string arm, double degrees, double velocity, [int prePauseMs], [int postPauseMs])

At 0 degrees, Misty's arms point straight forward along her X axis, parallel to the ground.
At +90 degrees, Misty's arms point straight down towards the ground.
At +/- 180 degrees, Misty's arms would face straight back, pointing toward her backpack. Currently, Misty's arms are not configured to move to this position.
At +270/-90 degrees, Misty's arms point straight up towards her head, and are perpendicular to the ground. Currently, the upward limit of Misty's arm movement is -29 degrees.

So a little testing should clarify.

1 Like