|
| 1 | +--- |
| 2 | +title: "Base remote control service" |
| 3 | +linkTitle: "Base remote control" |
| 4 | +weight: 70 |
| 5 | +layout: "docs" |
| 6 | +type: "docs" |
| 7 | +description: "The base remote control service allows you to remotely control a base with an input controller like a gamepad." |
| 8 | +date: "2026-04-18" |
| 9 | +aliases: |
| 10 | + - /services/base-rc/ |
| 11 | + - /mobility/base-rc/ |
| 12 | +--- |
| 13 | + |
| 14 | +The base remote control service implements an [input controller](/reference/components/input-controller/) as a remote control for a [base](/reference/components/base/). |
| 15 | +This uses the [`input` API](/reference/apis/components/input-controller/) to make it easy to add remote drive controls for your rover or other mobile robot with a controller like a gamepad. |
| 16 | + |
| 17 | +Add the base remote control service after configuring your machine with a base and input controller to control the linear and angular velocity of the base with the controller's button or joystick controls. |
| 18 | + |
| 19 | +Control mode is determined by the configuration attribute `"control_mode"`, for which there are five options: |
| 20 | + |
| 21 | +1. `"arrowControl"`: Arrow buttons control speed and angle |
| 22 | +2. `"triggerSpeedControl"`: Trigger button controls speed and joystick controls angle |
| 23 | +3. `"buttonControl"`: Four buttons (usually X, Y, A, B) control speed and angle |
| 24 | +4. `"joystickControl"`: One joystick controls speed and angle |
| 25 | +5. `"droneControl"`: Two joysticks control speed and angle |
| 26 | + |
| 27 | +You can monitor the input from these controls in the **CONTROL** tab. |
| 28 | + |
| 29 | +## Used with |
| 30 | + |
| 31 | +{{< cards >}} |
| 32 | +{{< relatedcard link="/reference/components/base/" required="yes" >}} |
| 33 | +{{< relatedcard link="/reference/components/input-controller/" required="yes" >}} |
| 34 | +{{< relatedcard link="/reference/components/movement-sensor/" >}} |
| 35 | +{{< /cards >}} |
| 36 | + |
| 37 | +{{% snippet "required-legend.md" %}} |
| 38 | + |
| 39 | +## Configuration |
| 40 | + |
| 41 | +You must configure a [base](/reference/components/base/) with a [movement sensor](/reference/components/movement-sensor/) as part of your machine to be able to use a base remote control service. |
| 42 | + |
| 43 | +First, make sure your base is physically assembled and powered on. |
| 44 | +Then, configure the service: |
| 45 | + |
| 46 | +{{< tabs >}} |
| 47 | +{{% tab name="Builder" %}} |
| 48 | + |
| 49 | +Navigate to the **CONFIGURE** tab of your machine's page. |
| 50 | +Click the **+** icon next to your machine part in the left-hand menu and select **Configuration block**. |
| 51 | +Select the `base remote control` type. |
| 52 | +Enter a name or use the suggested name for your service and click **Create**. |
| 53 | + |
| 54 | +In your base remote control service's configuration panel, copy and paste the following JSON object into the attributes field: |
| 55 | + |
| 56 | +```json {class="line-numbers linkable-line-numbers"} |
| 57 | +{ |
| 58 | + "base": "<your-base-name>", |
| 59 | + "input_controller": "<your-controller-name>" |
| 60 | +} |
| 61 | +``` |
| 62 | + |
| 63 | +Edit the attributes as applicable to your machine, according to the table below. |
| 64 | + |
| 65 | +For example: |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | +{{% /tab %}} |
| 70 | +{{% tab name="JSON Template" %}} |
| 71 | + |
| 72 | +```json {class="line-numbers linkable-line-numbers"} |
| 73 | +{ |
| 74 | + "name": "<your-base-remote-control-service>", |
| 75 | + "api": "rdk:service:base_remote_control", |
| 76 | + "model": "rdk:builtin:builtin", |
| 77 | + "attributes": { |
| 78 | + "base": "<your-base-name>", |
| 79 | + "input_controller": "<your-controller-name>" |
| 80 | + } |
| 81 | +} |
| 82 | +``` |
| 83 | + |
| 84 | +{{% /tab %}} |
| 85 | +{{% tab name="JSON Example" %}} |
| 86 | + |
| 87 | +```json {class="line-numbers linkable-line-numbers"} |
| 88 | +{ |
| 89 | + "name": "gamepad_service", |
| 90 | + "api": "rdk:service:base_remote_control", |
| 91 | + "model": "rdk:builtin:builtin", |
| 92 | + "attributes": { |
| 93 | + "base": "my-base", |
| 94 | + "input_controller": "my-input-controller", |
| 95 | + "control_mode": "arrowControl" |
| 96 | + } |
| 97 | +} |
| 98 | +``` |
| 99 | + |
| 100 | +{{% /tab %}} |
| 101 | +{{< /tabs >}} |
| 102 | + |
| 103 | +Edit and fill in the attributes as applicable. |
| 104 | +The following attributes are available for base remote control services: |
| 105 | + |
| 106 | +<!-- prettier-ignore --> |
| 107 | +| Name | Type | Required? | Description | |
| 108 | +| ---- | ---- | --------- | ----------- | |
| 109 | +| `base` | string | **Required** | The `name` of the [base](/reference/components/base/) you have configured for the base you are operating with this service. | |
| 110 | +| `input_controller` | string | **Required** | The `name` of the [input controller](/reference/components/input-controller/) you have configured for the base you are operating with this service. | |
| 111 | +| `control_mode` | string | Optional | The mode of remote control you want to use. <br> Options: <ul><li>`"arrowControl"`</li><li>`"triggerSpeedControl"`</li><li>`"buttonControl"`</li><li>`"joystickControl"`</li> <li>`"droneControl"`</li></ul> <br> Default: `"arrowControl"` | |
| 112 | +| `max_angular_degs_per_sec` | float | Optional | The max angular velocity for the [base](/reference/components/base/) in degrees per second. | |
| 113 | +| `max_linear_mm_per_sec` | float | Optional | The max linear velocity for the [base](/reference/components/base/) in meters per second. | |
| 114 | + |
| 115 | +## API |
| 116 | + |
| 117 | +The base remote control service supports the following methods: |
| 118 | + |
| 119 | +{{< readfile "/static/include/services/apis/generated/base_remote_control-table.md" >}} |
| 120 | + |
| 121 | +{{% alert title="Tip" color="tip" %}} |
| 122 | + |
| 123 | +The following code examples assume that you have a machine configured with a [base](/reference/components/base/) named `"my_base"`, [input controller](/reference/components/input-controller/) named `"my_controller"`, and base remote control service named `"my_base_rc_service"`. |
| 124 | +Make sure to add the required code to connect to your machine and import any required packages at the top of your code file. |
| 125 | +Go to your machine's **CONNECT** tab and select **API keys** to get your credentials, then use the code sample to connect to your machine. |
| 126 | + |
| 127 | +{{% /alert %}} |
| 128 | + |
| 129 | +{{< readfile "/static/include/services/apis/generated/base_remote_control.md" >}} |
0 commit comments