End-to-end (E2E) pipeline integration test¶
Run bag record → convert/validate → ACT inference → ROS 2 / Rerun mock wiring in sequence. For equipment prep before connecting the real robot, see hardware.md.
Prerequisites¶
- Docker runtime (ROS 2 execution environment)
- Host Python virtualenv with
pip install -e "port_pick_align/[training,dev]"installed - Environment split: the Docker image does not include PyTorch, so checkpoint inference runs on the host; inside Docker, run the visualization loop with
policy_mode:=mock.
One-shot pipeline run¶
# If checkpoints/synthetic_act/best_model.pt already exists, skip retraining and smoke-test inference
./scripts/e2e_pipeline_smoke.sh
Stages:
- Docker: record sensor topics from
mock_sensor_publisherwithros2 bag recordintodata/e2e/recorded_bag. - Host: run
scripts/convert_bag.py, convert todata/e2e/lerobotafter validator quality checks (if the recorded bag has frame dropouts under load, continue with the fixed fixturesample_bag). - Host: inference smoke test with a trained checkpoint (
--infer-only). - Docker: launch
mock_inference.launch.pyand verify topic I/O between the mock inference node and the Rerun node.
Single bag convert, integration test, checkpoint infer¶
1. Convert a single bag file¶
python scripts/convert_bag.py \
--bag port_pick_align/tests/fixtures/sample_bag \
--output data/from_bag/lerobot
2. Host integration test (CI integration equivalent)¶
3. Checkpoint inference in a host ROS 2 environment¶
ros2 run pai_final_pkg act_policy_node --ros-args \
-p policy_mode:=checkpoint \
-p checkpoint_path:=/workspace/checkpoints/synthetic_act/best_model.pt
Feetech extra and udev prep¶
pip install -e "port_pick_align/[training,feetech,dev]"
# Linux: edit serial numbers in deploy/udev/99-feetech-so101.rules for your hardware and install under /etc/udev/rules.d/
For detailed hardware setup, see hardware.md.