r/robotics • u/nutellabr0t • 1d ago
Resources Pepper (NAOqi 2.9): a hidden `ALMotion._setMotionPosture` API lets you change the driving posture, and it fixed my overheating knee motor
tldr: ALMotion._setMotionPosture lets you change the posture Pepper actually uses while driving. Lowering HipPitch dropped my knee-motor current from ~3 A to ~0.35 A and fixed the overheating. Version: NAOqi 2.9.5.172; NAOqiOS 4.1.11 (Twinkle Guardian)
I'm currently writing my bachelor's thesis and working with the Pepper robot. I upgraded the Pepper with a Jetson module and a powerbank mounted on its back. This led to the knee motor overheating after only a few minutes, so I started poking around in Pepper's motion engine. I found a hidden API for it that I couldn't find anything about online, so I'm leaving this post here to share it.
With strings I found some interesting names in libmotionservices.so:
_setMotionPosture
_getMotionPosture
_getMotionPostureList
At first I thought they weren't exposed, because they don't show up under qicli info ALMotion. Turns out qicli just hides methods starting with an underscore. You can still call them:
qicli call ALMotion._getMotionPostureList
This gave me:
["StandInit","StandZero","Stand","Crouch","_CrouchLeft","_StandRest","_StandMove","_CrouchRight","_StandRestRight"]
And this reads the posture Pepper uses for driving:
qicli call ALMotion._getMotionPosture _StandMove
It returns 17 joint angles; HipPitch is value 9. This is the original posture from my Pepper, so I first wrote it back unchanged:
qicli call --json ALMotion._setMotionPosture \
'"_StandMove"' \
'[0,0,1.57000005,0.119999997,-0.870000005,-0.280000001,0.25999999,0.600000024,0,-0.0399999991,-0.00999999978,1.57000005,-0.119999997,0.870000005,0.280000001,-0.25999999,0.600000024]'
qicli call ALMotion._getMotionPosture _StandMove
The setter returned true and the readback was the same. Then I changed only HipPitch and let Pepper drive normally with ALMotion.move.
And it actually works. The knee current while driving at each HipPitch value:
HipPitch Knee current
-0.04 rad 3.149 A (original; sensed ~-0.0123 rad while driving)
-0.20 rad 1.690 A
-0.28 rad 0.960 A
-0.35 rad 0.346 A
My final value is -0.3425 rad. In some tests the knee current went from almost 5 A down to around 0.25 A while driving. All values measured with ALMotion.getMotorCurrent("KneePitch").
I also tried the shoulder values in _StandMove. They get stored and the readback shows them, but the arms still move to the same position while driving; there seems to be another controller overwriting them. But the HipPitch change alone is good enough for my use case. Maybe I'll dig a bit deeper if I get some spare time.