ALEX VELLONE


Software Engineer
Log book image description

How to remotely control a humanoid robot

One of the goals that our robotics team has is to remotely control a humanoid robot. This will allow us to simply monitor and program our robots to better automate our operations.

To do this I've started working on library in Python. The library should have been:

  • - Very simple to use and without ROS
  • - Independent from the robot hardware
  • - Reusable on other robots
  • - Integrable in different way
  • - Allow remote control and monitoring of the motors of a robot.

Core

The core of this project is SimplePYBotSDK, a simple Python3 library to manage the states of servomotors and sensors in a robot.
I've built this library to handle the status of robot’s motors.

SimplePYBotSDK layers diagram Every robot's design is defined in a JSON file, in which all robot specifications are set. In these files we can find: robot basic information, servomotors list (with angle limits, offset, orientation), sensors, motors type, and standard poses for the robot.
The core of SimplePYBotSDK allows you to move servomotor (changing the state) or group of servomotors simply with a method invocation. The core handles the movements with the right speed (defined in the file configuration).

The library was built to be completely independent from the robot hardware and extremely simple to use. Direct control of the motors can be managed externally to the library and can be different for each robot.

Socket layer

Atom moving in realtime with SimplePYBotSDK To enable a low latency real time communication an external layer has been added to the library, to allow socket management. This can be used in robot cooperation or to debug our robots in real time.

Sockets can also be used to integrate the robot with externals program in a simple way. We used this to tests our programs in a simulated environment, using Webots.

REST API layer

The last layer of the library is the REST API layer. Is like the socket layer but works with HTTP request that in some scenarios works best. A development dashboard was built using that.

With the dashboard, that you can see in the image below, we can: monitor the status of all motors and sensors, move the robot's servomotors and change the velocity of the movements. SimplePYBotSDK

Example

Here is a demonstration of the SimplePYBotSDK in action, utilized to command our robot, named Uranus. To implement this example, I incorporated Mediapipe, employing its human pose estimator to provide real-time output of 33 body landmarks for each frame in a video. From these 33 landmarks, I extract the angles of the moving joints. Subsequently, my custom library calculates the servo motor angles required for the new pose and transmits them to the robot through a socket connection.

You can find the source code of this example here.

Resources

  • - SimplePYBotSDK library GitHub
  • - SimplePYBotDashboard - control panel GitHub