Teleop Button Status

Teleop Button Status

A teleop button is a special type of button that comes packaged with a boolean-controlled indicator light. For example, in this EStop button below, we've configured the light on the bottom edge of the button will turn blue when the EStop is engaged.


Toggled Off


Toggled On

The status of this light can be tied to a ROS topic or the API. In this overview, we'll look at using the Agent SDK to set the status of this button.

After adding a button with the API, the name you give to the button will be the name you reference in your skit. For the above button, we've titled it ESTOP, so in our API, it will be referred to it as the string "ESTOP".

To toggle the status on and off, we must send a bitset via the API. Here's an example code to toggle the above button:

import time
from formant.sdk.agent.v1 import Client as FormantClient

toggle = True

if __name__ == "__main__":
    fclient = FormantClient(

    # Toggles enabled status of API "testbtn" every second
    while True:
        print("toggling testbtn status")
                "ESTOP": toggle,
        toggle = not toggle