3

I am using NAOqi with Python to program my NAO robot. When I copy the code from the Python file here it works fine. I adjusted it to my variables like this:

nav.setStiffnesses("Head", 1.0)

names  = ["HeadYaw", "HeadPitch"]
angles  = [0.2, -0.2]
fractionMaxSpeed  = 0.2
nav.setAngles(names, angles, fractionMaxSpeed)

time.sleep(3.0)
nav.setStiffnesses("Head", 0.0)

but when I change it to use the arm joints it doesn't work:

nav.setStiffnesses("RArm", 1.0)

names  = ["RShoulderPitch"]
angles  = [0]
fractionMaxSpeed  = 1
nav.setAngles(names, angles, fractionMaxSpeed)

sleep(3.0)
nav.setStiffnesses("RArm", 0.0)

After during the code the arm is stiff and when it is done running it becomes limp but it doesn't move at all (I have tried different fractionMaxSpeeds).

I got all the joint angles and joint names from here.

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
  • you should look at the naoqi log, to see if errors are reported. from the robot shell: "qicli logview" or in the choregraphe log windows. – Alexandre Mazel Jan 14 '19 at 11:32

1 Answers1

0

In your code, after 3 seconds, you reset the stiffness to zero:

nav.setStiffnesses("RArm", 0.0)

Remove that line and the arm will remain stiff after running the code.

Victor Paléologue
  • 2,025
  • 1
  • 17
  • 27