Skip to content

Commit 25dd087

Browse files
authored
Merge pull request jsk-ros-pkg#1910 from iory/leadteleop
[unitree] Add lead teleop documentation
2 parents 7317e91 + 62eb25b commit 25dd087

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

jsk_unitree_robot/README.md

+41
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,20 @@ source devel/setup.bash
7474

7575
Then, reboot the robot and go to [app_chooser](http://192.168.123.161:8000/rwt_app_chooser) and start your application
7676

77+
## Lead teleop
78+
79+
[lead_teleop.launch](./jsk_unitree_startup/launch/lead_teleop.launch) is designed to interface with a mechanical button and an LED,
80+
publishing joystick messages (`joy_msg`) to ROS using the rosserial library.
81+
The node captures button presses and publishes the count of presses as part of the `/joy` messages to ROS.
82+
83+
### Hardware Setup
84+
85+
- Joystick: Interprets analog signals from two axes.
86+
- LEDs: One Adafruit NeoPixel strip for status indication.
87+
- Button: A single mechanical button used to trigger different commands based on the number of presses.
88+
89+
For detailed instructions on setting up the Arduino IDE, see [Setup Arduino IDE for LeadJoyDevelopment](#setup-arduino-ide-for-leadjoydevelopment).
90+
7791
### Setup Arduino IDE for LeadJoyDevelopment
7892
- Add Seeduino XIAO to board manager
7993
- Open arduino IDE. `~/arduino-$ARDUINO_VERSION/arduino`
@@ -87,6 +101,33 @@ source devel/setup.bash
87101
- Seeed XIAO RP2040: 1.12.0
88102
- Adafruit NeoPixel: 1.10.5
89103

104+
### ROS Parameters
105+
106+
- `~deadzone`: Adjusts the sensitivity of the joystick's zero point.
107+
- `~press_interval`: Time window to register multiple button presses as a single action.
108+
- `~debounce_period`: Debounce time to stabilize the button input.
109+
110+
### Visual Feedback
111+
112+
The Mechanical keyboard LED button changes colors based on the button pressed to provide immediate visual feedback. Each button press is associated with a different color.
113+
114+
### Button Press Actions and LED Feedback
115+
116+
| Button Presses | LED Color | Action | Description |
117+
|----------------|-------------------|-------------------------------|---------------------------------------|
118+
| 0 presses | Red | no action | Unitree is just standing. |
119+
| 1 press | Blue | Sit | Unitree sits and will not walk. |
120+
| 2 presses | Green | Stand | Unitree stands up and is able to walk.|
121+
| 3 presses | Yellow | no action | no action |
122+
| 4 presses | White | Disable movement | Unitree stops moving. |
123+
| 5 presses | Purple | Enable movement | Unitree is able to move again. |
124+
125+
The robot's motion and action mappings, such as stopping, moving, sitting, and standing, are defined in [rosserial_node.launch](./jsk_unitree_startup/launch/rosserial_node.launch) and [lead_joystick_teleop.yaml](./jsk_unitree_startup/config/lead_joystick_teleop.yaml). These files control the robot's responses to joystick inputs and can be customized as needed.
126+
127+
You can see it in the next video.
128+
129+
[lead_teleop](https://drive.google.com/file/d/1I7L-Ib8dmE77NPU4tOTtzfbOxjwT2nNe/view?usp=sharing)
130+
90131
## Topics
91132

92133
See [List of Topics](Go1_Topics.md) for list of topics used in Go1 robot.

0 commit comments

Comments
 (0)