This repository facilitates controlling a Dobot Robot using a PlayStation 5 controller and recording sequences for later playback.
To connect the controller to your computer, you have two options:
-
USB Connection:
- Simply connect the controller via USB.
-
Bluetooth Connection:
- Pair the controller with the computer by following these steps:
- Press the PS button and the Share button simultaneously, located at the top right of the touchpad. This action will make the light on the controller flash blue.
- On your computer, search for Bluetooth devices and connect to the controller. Once connected, the light on the controller should stay solid blue. (This unfortunately does not allow to indicate the joints via the touchpad LEDs)
- Pair the controller with the computer by following these steps:
The setup requires an exisiting python installation with pip and firefox.
-
Clone the repository
-
Run setup.bat, which
2.1 Creates a virtual environment.
2.2 Installs required dependencies
2.3 Creates RobotRecording batch script on your desktop
-
Double-click the RobotRecording batch script to start the application
Refer to the following image for the controller keymap:
Specific Joint coding for M1 Pro in terms of joint number and color
The tool provides a web interface
The recorded trajectories can be saved and loaded from json files, with the following format.
[
{
"Type": "ABSOLUTE",
"Value": [
279.239335,
32.770248,
98.500513,
-121.842974
],
"Motion Type": "JOINT",
"Valid": true
},
{
"Type": "RELATIVE",
"Value": [
-4.9609375,
0.0,
0.0,
0.0
],
"Motion Type": "JOINT",
"Valid": true
},
{
"Type": "RELATIVE",
"Value": [
0.0,
5.0,
0.0,
0.0
],
"Motion Type": "LINEAR",
"Valid": true
},
]