Robotics StackExchange | Archived questions

Asynchronous nested realtime controller

Hi,

I would like to have a nested realtime controller where the inner loop runs at the standard 1 kHz and the outer loop at a slower frequency (e.g. 100 Hz). The reason being that updating the outer loop involves solving an optimization problem repeatedly which cannot be done within 1 ms. However, both loops utilize state feedback and thus should have access to the current joint state.

Currently I have the outer loop implemented in a separate package and use messages to communicate with the inner controller (which is implemented in the pr2controller framework) but the introduced delay is unacceptable. I'm aware that the pr2controller manager allows chaining via providing pointers to controllers but this does not solve my problem with the different update rates. I guess the two loops should run in separate threads but I'm not sure how to do this in the pr2controllermanager framework. Maybe somebody already tried something like this and could share his experience?

Thanks, -Robert-

Asked by Robert Krug on 2012-11-19 08:59:56 UTC

Comments

Answers