sl-jetson d421d63c6f feat: Add Issue #473 - Event Logger with structured JSON logging
Comprehensive event logging system for SaltyBot with:

Features:
- MQTT subscription to /saltybot/* state topics (9 event types)
- Structured JSON event logging to ~/.saltybot-data/events/YYYY-MM-DD.jsonl
- Event types: encounter, voice_command, trick, e-stop, geofence, dock, error, boot, shutdown
- Query service (time range + type filter)
- Stats publisher (/saltybot/event_stats) with daily summaries
- Dashboard live feed (/saltybot/event_feed)
- Automatic log rotation: compress >7 days, delete >90 days
- CSV export functionality
- Thread-safe event processing

Components:
- EventLogger ROS2 node with background timers
- Event dataclass with timestamp/type/source/data
- File-based storage (JSONL + compressed archives)
- Query API for time/type filtering
- CSV export utility
- Comprehensive unit tests (15 test cases)

Configuration:
- Data directory: ~/.saltybot-data/events
- Rotation: 7 days compress, 90 days delete
- Stats interval: 60 seconds
- Rotation check: hourly

Launch:
- event_logger.launch.py - Standalone launch
- Config: event_logger.yaml with topic mappings

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-05 12:09:07 -05:00
..

saltybot_curiosity

Autonomous curiosity behavior for SaltyBot — frontier exploration when idle.

Features

  • Idle Detection: Activates after >60s without people
  • Frontier Exploration: Random walk toward unexplored areas
  • Sound Localization: Turns toward detected sounds
  • Object Interest: Approaches colorful/moving objects
  • Self-Narration: TTS commentary during exploration
  • Safety: Respects geofence, avoids obstacles
  • Auto-Timeout: Returns home after 10 minutes
  • Curiosity Level: Configurable 0-1.0 activation probability

Launch

ros2 launch saltybot_curiosity curiosity.launch.py

Parameters

  • curiosity_level: 0.0-1.0 probability of exploring when idle (default: 0.7)
  • idle_threshold_sec: seconds of idle before activation (default: 60)
  • exploration_max_duration_sec: max exploration time in seconds (default: 600)
  • exploration_radius_m: search radius in meters (default: 5.0)
  • pan_tilt_step_deg: pan-tilt sweep step (default: 15)
  • min_sound_activity: sound detection threshold (default: 0.1)

Topics

Publishes

  • /saltybot/curiosity_state (String): State updates
  • /saltybot/tts_request (String): Self-narration text
  • /saltybot/pan_tilt_cmd (String): Pan-tilt commands
  • /cmd_vel (Twist): Velocity commands (if direct movement)

Subscribes

  • /saltybot/audio_direction (Float32): Sound bearing (degrees)
  • /saltybot/audio_activity (Bool): Sound detected
  • /saltybot/person_detections (Detection2DArray): People nearby
  • /saltybot/object_detections (Detection2DArray): Interesting objects
  • /saltybot/battery_percent (Float32): Battery level
  • /saltybot/geofence_status (String): Geofence boundary info

State Machine

IDLE → (is_idle && should_explore) → EXPLORING
EXPLORING → (timeout || person detected) → RETURNING
RETURNING → IDLE

Issue #470

Implements autonomous curiosity exploration as specified in Issue #470.