The design and implementation of an advanced robot controller