Add buttons to your teleoperation interface

This guide will teach you how to overlay your teleoperation interface with interactive buttons.

Step 1: Navigate to device teleoperation settings

  1. In Formant, in the upper-left corner, open the menu and click Settings.
  2. Click Devices, and then click on the device you want to configure.
  3. Click on the Teleoperation tab to open the teleoperation configuration page.

Step 2: Configure a button

ROS 1

Formant supports the std_msgs/Bool data type.

  1. In the teleoperation configuration page, scroll down to Buttons and click the plus (+) icon.
  2. Click Add ROS Topic.
  3. Configure your button as follows:
PropertyUsage
Topic name - e.g. /camera/frontEnter the topic to which this button should publish true when clicked.
Label for your buttonThis is the text that will appear on the button during teleoperation.
  1. Click Done.
  2. (Optional) If you want to add an additional status topic:
    1. Click on the button you just created.
    2. Add the status topic to Status topic name - e.g. /boolean/topic.

ROS 2/API

  1. In the teleoperation configuration page, scroll down to Buttons and click the plus (+) icon.
  2. Click Add from API.
  3. Enter the name of the function which handles button input. Formant will send a value of true to this function when the button is clicked.
  4. Click Done, and then click Save to confirm your teleoperation settings.

For an example of handling button clicks during teleoperation via the Formant Agent SDK, see GitHub: teleop.py.

Step 3: Verify your work in teleoperation mode

  1. In your device view, in the upper-right corner, click the three dots >> Teleop, or enter Shift + T.
  2. If you have Control safety switch enabled, click the Unlock button to reveal the teleoperation controls.
  3. Verify that your buttons are showing up as expected:
buttons in the teleoperation view

Buttons in the teleoperation view.

👋

If you notice an issue with this page or need help, please reach out to us! Use the 'Did this page help you?' buttons below, or get in contact with our Customer Success team via the Intercom messenger in the bottom-right corner of this page, or at [email protected].