feat: 对接KCP-C
This commit is contained in:
43
Deploy_Tienkung/udp_loopback/README_omnisocket.md
Normal file
43
Deploy_Tienkung/udp_loopback/README_omnisocket.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# OmniSocket Integration
|
||||
|
||||
This repo now supports an OmniSocket-based control path alongside the original UDP loopback.
|
||||
|
||||
## Files
|
||||
|
||||
- `omnisocket_control.py`: binary control packet codec shared by sender/receiver.
|
||||
- `omnisocket_keyboard_sender.py`: keyboard -> OmniSocket sender.
|
||||
- `omnisocket_xbox_sender.py`: ROS2 `/xbox_data` -> OmniSocket sender.
|
||||
- `omnisocket_fsm_controller.py`: OmniSocket receiver that converts packets into `ControlFlag`.
|
||||
- `config/omnisocket_demo.yaml`: OmniSocket transport config template.
|
||||
|
||||
## Main-node integration
|
||||
|
||||
Set `control_tool: omnisocket_loopback` in `config/dex_config.yaml`, then run `rl_control_node.py` or `rl_control_node_sim.py`.
|
||||
|
||||
The main node will instantiate `OmniSocketFSMController`, which receives binary control packets and maps them into the same FSM commands used by the UDP loopback path.
|
||||
|
||||
## Sender usage
|
||||
|
||||
Keyboard sender:
|
||||
|
||||
```bash
|
||||
cd Deploy_Tienkung
|
||||
python3 udp_loopback/omnisocket_keyboard_sender.py
|
||||
```
|
||||
|
||||
Xbox sender:
|
||||
|
||||
```bash
|
||||
cd Deploy_Tienkung
|
||||
source /opt/ros/jazzy/setup.bash
|
||||
ros2 run joy joy_node --ros-args -r joy:=/xbox_data
|
||||
python3 udp_loopback/omnisocket_xbox_sender.py
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Install the `omnisocket` Python package before using this path.
|
||||
- `omnisocket_xbox_sender.py` still reuses `config/dex_config.yaml` for Xbox axis/button overrides so it stays aligned with the existing repo configuration.
|
||||
- The original UDP files remain unchanged, so you can switch back by restoring `control_tool: udp_loopback`.
|
||||
- OmniSocket keyboard/Xbox mappings are aligned with the cleaned walk-only FSM flow: `ZERO`, `STOP`, and `WALKAMP`.
|
||||
- Keyboard sender supports `4/5/6` for clearing `x/y/yaw` speed independently, and `r` still clears all three axes.
|
||||
Reference in New Issue
Block a user