@@ -39,4 +39,64 @@ def publish_action(self, action):
3939 right_hand_pos = action[20 :26 ] # right hand 6
4040```
4141
42-
42+
43+
44+
45+ # Deployment Scripts
46+
47+ - ` ros2_inspire_config.py ` : Deployment script for robots using ** Inspire** hands.
48+ - ` ros2_brainco_config.py ` : Deployment script for robots using ** BrainCo** hands.
49+
50+ ## Usage
51+
52+ Both scripts support a YAML configuration file to define runtime parameters.
53+
54+ ### Execution Command
55+
56+ ``` bash
57+ # For Inspire hand robots
58+ python3 ros2_inspire_config.py --config config.yaml
59+
60+ # For BrainCo hand robots
61+ python3 ros2_brainco_config.py --config config.yaml
62+ ```
63+
64+ If the ` --config ` parameter is omitted, scripts default to ` config.yaml ` in the current directory.
65+
66+ ## Configuration File
67+
68+ ### Configuration Guide (YAML)
69+
70+ The configuration file allows switching between model inference and data replay modes, and configuring hardware-specific parameters.
71+
72+ ``` yaml
73+ # Mode: 'model' (for real-time inference) or 'replay' (for trajectory playback)
74+ mode : ' model'
75+
76+ # --- Model Inference Mode ---
77+ # Path to the pretrained model
78+ model_path : ' /path/to/your/pretrained_model'
79+
80+ # --- Data Replay Mode ---
81+ # Path to the HDF5 trajectory file
82+ h5_path : ' /path/to/your/trajectory.hdf5'
83+
84+ # --- General Configuration ---
85+ # Camera name (used for image topics like /{camera_name}/color/image_raw)
86+ camera_name : ' camera'
87+ # Action publishing rate (Hz)
88+ action_rate : 20.0
89+
90+ ` ` `
91+
92+ ## Operation Modes
93+
94+ 1. **Model Inference (` model`)**:
95+ - Loads the specified strategy model.
96+ - Synchronizes RGB and Depth image streams.
97+ - Performs real-time inference and publishes joint actions to arm and hand controllers.
98+
99+ 2. **Data Replay (`replay`)** :
100+ - Reads action sequences from the specified HDF5 file.
101+ - Streams actions to hardware at the specified `action_rate`.
102+ - Useful for verifying hardware communication and trajectory execution.
0 commit comments