BHuman

This section will trace the flow of BHuman Robot Control code.

Basic Concepts: Modules and Representations

Architecture

The BHuman robot is controlled by six threads UpperLowerCognitionMotionAudio, and Debug

OfficialThreadsDescription.png

  • UpperLower: Image processing threads, they use the images received by it eyes to build robot’s perception of the world. It use a couple of neural network to extract different information form image.
  • Cognition: The high level control thread. Generally, it receive processed information from UpperLower thread and send high level control signal to Motion thread
  • Motion: The low level joint control. Including step planning, calibration, and etc. This thread directly send signals to LoLA.
  • Audio: Hear the whistle; Use the speaker to say something …
  • Debug: Communicate with computer, receive debug signals …

Information flow:

ThreadsRelation.svg

Cognition Thread

Cognition thread module graph

Cognition thread module graph

Module View Interpretation

Since all the information about the current module configuration can be requested from the robot control program, it is possible to generate a visual representation automatically. The graphs, such as the one that is shown above, are generated by the program dot from the Graphviz package4. Modules are displayed as yellow rectangles and representations are shown as blue ellipses. Representations that are received from another thread are displayed in orange and have a dashed border. If they are missing completely due to a wrong module configuration or because they are alias representations, both label and border are displayed in red. There is a module view per thread.

The module graph can be zoomed in or out by using the mouse wheel, touch gestures, or the page up/down buttons. It can also be dragged around with the left mouse button or by touch gestures.

Control Flow in Cognition

BHumanRobot Control Flow

This diagram is construct by tracing the function call stack, it’s also highly recommended to trace the execution of the code by yourself