aldebaran / libqi

NAOqi core framework
http://doc.aldebaran.com/libqi/
BSD 3-Clause "New" or "Revised" License
66 stars 53 forks source link

Real-time control of joints using setAngles or changeAngles #29

Closed AndrewJSchoen closed 4 years ago

AndrewJSchoen commented 4 years ago

Hi, this is more of a question than an issue, but it seemed like this was the best place to ask since Support said they weren't really the best to answer it.

I have some NAO v4's that I am trying to control in real-time (fast, small changes) with either setAngles or changeAngles from libqi (I was specifically using the python bindings). However, when I do this, I get undesired stuttering with setAngles or oscillation with changeAngles. I am guessing that the issue with setAngles is an imposed slow-start/slow-stop, and the issue with changeAngles (I am reading in the joints and calculating the delta) is the error in the joint position estimation.

Is there a way of overriding the slow-start/slow-stop, or any way of getting the desired behavior? Thanks for any and all help you may be able to provide!

sbarthelemy commented 4 years ago

Hello Andrew,

Hi, this is more of a question than an issue, but it seemed like this was the best place to ask since Support said they weren't really the best to answer it.

Indeed this is not an issue, and not about libqi ;-) I think such questions are now expected to be asked and answered on stackoverflow.

I have some NAO v4

since you have a NAO V4, I'll assume you're using NAOqi 2.1.

I get undesired stuttering with setAngles. (...) I am guessing that the issue with setAngles is an imposed slow-start/slow-stop

I don't think there is an imposed slow-start. But the final speed will be zero, if no other setAngle overrides it.

Did you try following this example? http://doc.aldebaran.com/2-1/naoqi/motion/control-joint.html#case-3-reactive-control

Is there a way of overriding the slow-start/slow-stop, or any way of getting the desired behavior?

It is possible to avoid ALMotion (remove it from the autoload or call ALMotion.exit), an send commands to the DCM instead: http://doc.aldebaran.com/2-1/naoqi/sensors/dcm_advanced.html