Files
tienkung-szu/Deploy_Tienkung/udp_loopback/README_omnisocket.md
2026-03-31 14:25:19 +08:00

2.4 KiB
Raw Blame History

服务器: ssh bj-txy cd OmniSoketGo ./bin/kcpserver -listen 0.0.0.0:10909

ssh gz-txy cd OmniSoketGo ./bin/kcpserver -mode=relay -listen 0.0.0.0:10909 -relay-remote 172.21.32.15:10909

MuJoCo端 终端1 source /opt/ros/humble/setup.zsh export ROS_DOMAIN_ID=10 cd tienkung-szu/xSIM_MUJOCO python scripts/simulator_view_asyn.py -m evt2

终端2 source /opt/ros/humble/setup.zsh export ROS_DOMAIN_ID=10 cd tienkung-szu/Deploy_Tienkung python3 rl_control_node_sim.py

控制端: 键盘控制: cd tienkung-szu/Deploy_Tienkung python3 udp_loopback/omnisoket_keyboard_sender.py

xbox: 终端1 source /opt/ros/humble/setup.bash ros2 run joy joy_node --ros-args -r joy:=/xbox_data

终端2 cd tienkung-szu/Deploy_Tienkung python3 udp_loopback/omnisoket_xbox_sender.py

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:

cd Deploy_Tienkung
python3 udp_loopback/omnisocket_keyboard_sender.py

Xbox sender:

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.