added support for use of eoprot_robot_xxx apis, cleaned code, removed some complilation warnings