Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
7 months ago | |
|---|---|---|
| .. | ||
| nodes | 7 months ago | |
| README.md | 7 months ago | |
| gamepad_control_advanced.yml | 7 months ago | |
| gamepad_control_basic.yml | 7 months ago | |
This example demonstrates real-time interactive control by connecting a gamepad to the controller. It builds upon the target pose control example by adding gamepad input processing for teleoperation of the robot arm.
gamepad_control_basic.yml)gamepad_control_advanced.yml)cd gamepad_control
dora build gamepad_control_basic.yml
dora run gamepad_control_basic.yml
cd gamepad_control
dora build gamepad_control_advanced.yml
dora run gamepad_control_advanced.yml
You should see:
gamepad)Built-in Dora node that interfaces with system gamepad drivers using Pygame.
- id: gamepad
build: pip install -e ../../../node-hub/gamepad
path: gamepad
outputs:
- cmd_vel # 6DOF velocity commands
- raw_control # Raw button/stick states
inputs:
tick: dora/timer/millis/10 # 100Hz polling
cmd_vel: 6DOF velocity array [linear_x, linear_y, linear_z, angular_x, angular_y, angular_z]
raw_control: JSON format gamepad state
Basic Controller (gamepad_controller_ik.py):
Gamepad Input → Target Position Update → IK Request → Joint Commands
Advanced Controller (gamepad_controller_differential_ik.py):
Gamepad Input → Target Position → Pose Error → Velocity → Joint Commands
The controller expects standard gamepad layout: (The mapping may change based on controller)
| Control | Function |
|---|---|
| D-pad Up/Down | X-axis movement |
| D-pad Left/Right | Y-axis movement |
| Right Stick Y | Z-axis movement |
| Left Bumper | Decrease speed |
| Right Bumper | Increase speed |
| START button | Reset position |
Real-time Teleoperation:
Speed Control:
Features:
"Gamepad not responding"
# Check if gamepad is connected
ls /dev/input/js*
# Test gamepad input
jstest /dev/input/js0
# Grant permissions
sudo chmod 666 /dev/input/js0
"Robot doesn't move with D-pad"
cmd_vel output: should show non-zero values when D-pad pressed"Movement too fast/slow"
delta = cmd_vel[:3] * 0.03 scaling factor in code if requiredDORA (Dataflow-Oriented Robotic Architecture) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed datafl
Rust Python TOML Markdown C other