saltybot_gimbal ROS2 Python package for pan/tilt camera head control via JLINK binary protocol over serial to STM32 (Issue #547 C side). - gimbal_node.py: subscribes /saltybot/gimbal/cmd (Vector3: pan, tilt, speed), publishes /saltybot/gimbal/state (JSON), /saltybot/gimbal/cmd_echo - Services: /saltybot/gimbal/home (Trigger), /saltybot/gimbal/look_at (Trigger + /saltybot/gimbal/look_at_target PointStamped) - jlink_gimbal.py: JLINK codec matching jlink.h — CMD_GIMBAL_POS=0x0B, TLM_GIMBAL_STATE=0x84, CRC16-CCITT, deg*10 encoding, speed register - MotionAxis: trapezoidal velocity profile (configurable accel + speed) - Configurable limits: pan ±150°, tilt ±45° (gimbal_params.yaml) - Serial reconnect with configurable retry delay - 48 unit tests — all passing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
839 B
YAML
30 lines
839 B
YAML
gimbal_node:
|
|
ros__parameters:
|
|
# Serial port connecting to STM32 over JLINK protocol
|
|
serial_port: "/dev/ttyTHS1"
|
|
baud_rate: 921600
|
|
|
|
# Soft angle limits (degrees, ± from center)
|
|
pan_limit_deg: 150.0
|
|
tilt_limit_deg: 45.0
|
|
|
|
# Home position (degrees from center)
|
|
home_pan_deg: 0.0
|
|
home_tilt_deg: 0.0
|
|
|
|
# Motion profile
|
|
max_speed_deg_s: 90.0 # maximum pan/tilt speed (°/s)
|
|
accel_deg_s2: 180.0 # trapezoidal acceleration (°/s²)
|
|
|
|
# Update rates
|
|
update_rate_hz: 20.0 # motion tick + JLINK TX rate
|
|
state_publish_hz: 10.0 # /saltybot/gimbal/state publish rate
|
|
|
|
# Serial reconnect
|
|
reconnect_delay_s: 2.0
|
|
|
|
# D435i camera parameters (for look_at 3D→pan/tilt projection)
|
|
camera_focal_length_px: 600.0
|
|
image_width_px: 848
|
|
image_height_px: 480
|