Commit Graph

16 Commits

Author SHA1 Message Date
dev01 64c93d992d refactor: replace http.server with Microdot framework in web_node
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 13:30:50 +08:00
dev01 df02657f1d feat: add PnP pose estimation, laser world coordinate solving, and new 0xA5 protocol
- Replace hardcoded arrays with JSON string format for calibration and laser
  parameters, matching scripts/calibrate/laser_pnp.py
- Apply IMAGE_SCALE to resize factor instead of hardcoded 0.5
- Add rectangle corner ordering (TL/BL/BR/TR) and PnP solving with SOLVEPNP_IPPE
- Compute laser world coordinates on Z=0 plane, normalize by RECT_L/RECT_W
  as measurement values; reference values set to rectangle center (0.5, 0.5)
- Publish Float32MultiArray [measure_x, ref_x, measure_y, ref_y] on /vision/target
- Remove /vision/binary_image publisher
- Add ENABLE_CUDA toggle and CUDA detection log with pipeline breakdown
2026-06-04 11:33:13 +08:00
dev01 fd3d6b7ab5 feat: add PnP laser solving and update 0xA5 frame to 4-float protocol
- Integrate PnP rectangle pose estimation + laser world coordinate computation from scripts/calibrate/laser_pnp.py
- Publish normalized measurement (laser/RECT) and reference (rect center) via Float32MultiArray
- Update gimbal 0xA5 frame to 18-byte format: measure_x, ref_x, measure_y, ref_y
- Add camera calibration, laser line params, and RECT_L/W constants
- Add corner ordering (TL/BL/BR/TR), SOLVEPNP_IPPE, and pose/laser visualization overlay
- Remove standalone vision_example.py (superseded by ROS2 nodes)
- Add scripts/calibrate/ with calibration and PnP tools
2026-06-03 22:38:51 +08:00
dev01 0340d40b84 fix: gate gimbal callbacks by current mode
Add _current_mode state to prevent manual commands during auto
tracking and vice versa. Remove unused auto_tracking_enabled param.
2026-06-03 22:08:14 +08:00
dev01 e8c6957772 feat: add CUDA GPU acceleration to vision_node preprocessing
Move resize, BGR2GRAY, and GaussianBlur to GPU via cv2.cuda, with
graceful CPU fallback when CUDA is unavailable.
2026-06-03 22:08:08 +08:00
dev01 64da9fd848 fix: suppress shutdown errors and align rosbridge params with Jazzy defaults
- Wrap rclpy.shutdown() in try/except across all nodes to avoid
  "rcl_shutdown already called" errors when launched via ros2 launch.
- Replace web_node's server.shutdown() with server_close() to prevent
  the HTTP server from hanging on SIGINT (shutdown() waits on an event
  only set by serve_forever, which the timer-based approach doesn't use).
- Set rosbridge_websocket default_call_service_timeout=5.0,
  call_services_in_new_thread=True, send_action_goals_in_new_thread=True
  to match upcoming Jazzy defaults and silence startup warnings.
2026-06-02 21:23:52 +08:00
dev01 d81558d1be docs: update gimbal protocol and frontend integration specs 2026-06-02 19:54:56 +08:00
dev01 a2acd62e9d fix: align gimbal protocol and API responses with updated docs
- 0xA6 frame: remove zero_force byte, use angular velocity directly (10 bytes)
- PID keys: vision_* -> visual_*, motor_* -> angle_*
- HTTP API responses: use {"code": 0, "message": "ok"} format
2026-06-02 18:07:57 +08:00
dev01 ede16af126 refactor: make port configurable for web_node and explicit in launch 2026-06-02 12:42:14 +08:00
dev01 5159929c01 feat: add rosbridge_websocket and web_video_server to launch file 2026-06-01 22:07:13 +08:00
dev01 3d91a2908a fix: update serial baud rate to 921600 in launch file 2026-06-01 22:01:59 +08:00
dev01 c4bdcd3dda refactor: remove HTTP image preview from web_node, keep API only 2026-06-01 21:11:55 +08:00
dev01 bb8724035f feat: separate laser API endpoint (POST /api/laser) 2026-06-01 20:50:54 +08:00
dev01 a281fd115e docs: add usage guide and README with architecture overview 2026-05-31 22:25:00 +08:00
dev01 19d5e432a4 fix: change serial port from /dev/ttyTHS0 to /dev/ttyTHS1 2026-05-31 22:13:49 +08:00
dev01 d506e01188 feat: initial ROS2 vision pipeline with gimbal control and nginx config
- camera_node (driver_pkg): Hikrobot MvCamera SDK image capture
- vision_node (algorithm_pkg): Otsu threshold + contour detection + target tracking
- web_node (application_pkg): HTTP server with MJPEG preview and mode switch API
- gimbal_node (gimbal_control_pkg): UART serial communication per gimbal protocol
- bringup_pkg: launch file for full pipeline
- config: nginx reverse-proxy for MJPEG streaming and API routing
2026-05-31 22:10:12 +08:00