Skip to content

Other Scenarios

Due to the use of modules that can be exchanged, enabled and disabled thorugh configuration files, the B-Human Codebase offers the option to write code for other applications than regular soccer, while still using large parts of the code for soccer.

The easiest way to do this are scenarios, which can be selected on deployment and also be used in SimRobot scenes.

Photo Mode

General information and deployment

In this scenario, we are able to make the robot hold a specific pose and also select the color of each LED. To use the PhotoMode, the robot has to be deployed with the scenario selected in the Deploy Dialogue.

How to use it

After the deployment, we can make the robot stand up by pressing its chest button and can start to change the placement of its joints. The following flowchart will illustrate how to navigate between the different modes and settings.

flowchart BT
    A((("*Boot*"))) --> B((Unstiff))
    B -->|Press chest button| B1{standing up}
    B1 --> C((Initial))
    C -->|hold all three head buttons| B
    C -->|Press chest button| D((Penalized))
    D -->|Press chest button| C
    C --> Posing
    Posing -->|hold head front and rear button| LED
    LED -->|hold head front and rear button| Posing
    Posing -->|press chest button| D 
    LED -->|press chest button| D 
    Posing -->|hold all three head buttons| B 
    LED -->|hold all three head buttons| B 

    subgraph Posing
        p1(((Joints stiff))) -->|press head middle button| p2((selected joint unstiff))
        p2 -->|press head middle button| p1
        p1 -->|press head front button| p3{select next joint Group}
        p1 -->|press head front button| p4{select prior joint Group}

    subgraph LED
        l1((all LEDs white)) -->|press head middle button| l2{change selected LED color}
        l1 -->|press head front button| l3{select next LED Group}
        l1 -->|press head front button| l4{select prior LED Group}

To make the posing easier, the joints and LEDs and joints were each divided into groups to avoid having to set each one individually. Our NAOs were friendly enough to show us what groups can be selected.

Naos with markings on joint and led groups

The selected LED group will blink when the user is currently setting the LEDs. Therefore, it is recommended to switch back into the posing mode when taking photographs.


Most of the code for this scenario can be found in Modules/MotionControl/MotionEngine/PhotoModeEngine.* with according representations that save a few bits of necessary information.
Furthermore, in LEDHandler.cpp a method is implemented that overwrites the usual LED settings if the Photo Mode is active. It is not recommended to write a new LED-Handler-Module, as this will lead to problems when the robot is shutting off. At last, there is a Behavior Option (HandlePhotoMode.cpp), that specifies some upper level behavior.

Known issues

  • Sometimes, the PhotoMode will not be active when the robot enters it's initial state
  • After the robot was penalized, it must be made unstiff and then stand up again, as the PhotoMode will not be active after the robot was penalized
  • LED's for the feet are currently not implemented even though they can be selected, since they look rather weird


General Information

Sometimes it might be convenient to be able to show off how good the robots can play soccer without having to build a field, setting up a local WiFi network, etc. For small demos, we developed the AnyPlaceDemo. The robot has three modes:


The robot will look for a ball in its field of view. If he can't find one, he will start to rotate 90 degree, look again and repeat this, until a ball is eventually found. As soon as the robot sees a ball, he walks towards the ball and shoots it with a random kick selected from the allowed kicks in this scenario. This mode works very well as spectators can interact with the robot by passing the ball back. The robot handlers must be cautions to not let the robot fall down any stairs and other dangerous ground conditions.


The robot will make a waving motion with its arms, repeats it a few times before taking a pause and then starting again. This is good to let the leg joints cool down after periods of soccer.


As the name suggests, the robot will stand still and speak a text specified in the code.

How to use it

The robot should be booted up and deployed with the AnyPlaceDemo scenario selected. Once it is unpenalized, it will start to act according to the mode. To switch between the modes, the robot should be penalized and then the left foot bumper can be used to cycle though the available modes.


To make changes to the AnyPlaceDemo, one should look into the HandleAnyPlaceDemo.cpp Option aswell as BehaviorControl/Libraries/LibDemoProvider.* and the according representations.

Last update: January 2, 2024