Configure a fake input controller for testing

Configuring a fake input controller allows you to test an input controller communicating with your robot, without any physical hardware.

This controller can have Controls defined in attributes, as seen in the “JSON Template” tab below. However, these Controls only ever return a single PositionChangeAbs event on the X axis, with the Event.value stuck at 0.7.

Configuration

Refer to the following example configuration for an input controller of model fake:

Navigate to the Config tab of your robot’s page in the Viam app. Click on the Components subtab and click Create component. Select the input_controller type, then select the fake model. Enter a name for your input controller and click Create.

An example configuration for a fake input controller component in the Viam App config builder.

Edit and fill in the attributes as applicable.

{
  "components": [
    {
      "name": "<your-fake-input-controller>",
      "type": "input_controller",
      "model": "fake",
      "attributes": {
        controls: [
          "AbsoluteX",
          "AbsoluteY",
          "AbsoluteZ"
        ]
      }
    }
}

Troubleshooting

You can find additional assistance in the Troubleshooting section.

You can also ask questions in the Community Discord and we will be happy to help.



Have questions, or want to meet other people working on robots? Join our Community Discord.