Use the leader arm to control the follower arm
curl --request POST \
--url https://api.example.com/move/leader/start \
--header 'Content-Type: application/json' \
--data '
{
"robot_pairs": [
{
"follower_id": 123,
"leader_id": 123
}
],
"enable_gravity_compensation": false,
"gravity_compensation_values": {
"elbow": 50,
"shoulder": 100,
"wrist": 10
},
"invert_controls": false
}
'import requests
url = "https://api.example.com/move/leader/start"
payload = {
"robot_pairs": [
{
"follower_id": 123,
"leader_id": 123
}
],
"enable_gravity_compensation": False,
"gravity_compensation_values": {
"elbow": 50,
"shoulder": 100,
"wrist": 10
},
"invert_controls": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
robot_pairs: [{follower_id: 123, leader_id: 123}],
enable_gravity_compensation: false,
gravity_compensation_values: {elbow: 50, shoulder: 100, wrist: 10},
invert_controls: false
})
};
fetch('https://api.example.com/move/leader/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/move/leader/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'robot_pairs' => [
[
'follower_id' => 123,
'leader_id' => 123
]
],
'enable_gravity_compensation' => false,
'gravity_compensation_values' => [
'elbow' => 50,
'shoulder' => 100,
'wrist' => 10
],
'invert_controls' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/move/leader/start"
payload := strings.NewReader("{\n \"robot_pairs\": [\n {\n \"follower_id\": 123,\n \"leader_id\": 123\n }\n ],\n \"enable_gravity_compensation\": false,\n \"gravity_compensation_values\": {\n \"elbow\": 50,\n \"shoulder\": 100,\n \"wrist\": 10\n },\n \"invert_controls\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/move/leader/start")
.header("Content-Type", "application/json")
.body("{\n \"robot_pairs\": [\n {\n \"follower_id\": 123,\n \"leader_id\": 123\n }\n ],\n \"enable_gravity_compensation\": false,\n \"gravity_compensation_values\": {\n \"elbow\": 50,\n \"shoulder\": 100,\n \"wrist\": 10\n },\n \"invert_controls\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/move/leader/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"robot_pairs\": [\n {\n \"follower_id\": 123,\n \"leader_id\": 123\n }\n ],\n \"enable_gravity_compensation\": false,\n \"gravity_compensation_values\": {\n \"elbow\": 50,\n \"shoulder\": 100,\n \"wrist\": 10\n },\n \"invert_controls\": false\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status": "ok"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Control
Use the leader arm to control the follower arm
Use the leader arm to control the follower arm.
POST
/
move
/
leader
/
start
Use the leader arm to control the follower arm
curl --request POST \
--url https://api.example.com/move/leader/start \
--header 'Content-Type: application/json' \
--data '
{
"robot_pairs": [
{
"follower_id": 123,
"leader_id": 123
}
],
"enable_gravity_compensation": false,
"gravity_compensation_values": {
"elbow": 50,
"shoulder": 100,
"wrist": 10
},
"invert_controls": false
}
'import requests
url = "https://api.example.com/move/leader/start"
payload = {
"robot_pairs": [
{
"follower_id": 123,
"leader_id": 123
}
],
"enable_gravity_compensation": False,
"gravity_compensation_values": {
"elbow": 50,
"shoulder": 100,
"wrist": 10
},
"invert_controls": False
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
robot_pairs: [{follower_id: 123, leader_id: 123}],
enable_gravity_compensation: false,
gravity_compensation_values: {elbow: 50, shoulder: 100, wrist: 10},
invert_controls: false
})
};
fetch('https://api.example.com/move/leader/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/move/leader/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'robot_pairs' => [
[
'follower_id' => 123,
'leader_id' => 123
]
],
'enable_gravity_compensation' => false,
'gravity_compensation_values' => [
'elbow' => 50,
'shoulder' => 100,
'wrist' => 10
],
'invert_controls' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/move/leader/start"
payload := strings.NewReader("{\n \"robot_pairs\": [\n {\n \"follower_id\": 123,\n \"leader_id\": 123\n }\n ],\n \"enable_gravity_compensation\": false,\n \"gravity_compensation_values\": {\n \"elbow\": 50,\n \"shoulder\": 100,\n \"wrist\": 10\n },\n \"invert_controls\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/move/leader/start")
.header("Content-Type", "application/json")
.body("{\n \"robot_pairs\": [\n {\n \"follower_id\": 123,\n \"leader_id\": 123\n }\n ],\n \"enable_gravity_compensation\": false,\n \"gravity_compensation_values\": {\n \"elbow\": 50,\n \"shoulder\": 100,\n \"wrist\": 10\n },\n \"invert_controls\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/move/leader/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"robot_pairs\": [\n {\n \"follower_id\": 123,\n \"leader_id\": 123\n }\n ],\n \"enable_gravity_compensation\": false,\n \"gravity_compensation_values\": {\n \"elbow\": 50,\n \"shoulder\": 100,\n \"wrist\": 10\n },\n \"invert_controls\": false\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status": "ok"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Body
application/json
Request to set up leader-follower control. The leader robot will be controlled by the user, and the follower robot will mirror the leader's movements.
You need two robots connected to the same computer to use this feature.
List of robot pairs to control. Each pair contains the robot id of the leader and the corresponding follower.
Show child attributes
Show child attributes
Enable gravity compensation for the leader robots
Gravity compensation pourcentage values for shoulder, elbow, and wrist joints (0-100%)
Show child attributes
Show child attributes
Mirror controls for the follower robots
Was this page helpful?
⌘I