Add autonomous patrol mode with idle behaviors and social integration:
Patrol Node:
- Nav2 /navigate_to_pose integration for autonomous navigation
- Idle behaviors at each waypoint (10-30s pan-tilt sweep + greetings)
- Person detection → pause patrol → social mode → resume
- Battery monitoring: automatic return to dock at <25%
- Teleop override: can be interrupted by joystick control
- Voice commands: 'patrol start/stop' via speech
- Randomized waypoint order for variety
- State publishing to /saltybot/patrol_state
Features:
- Waypoint loading from patrol_params.yaml (x, y, yaw coordinates)
- Random idle durations (configurable 10-30s)
- Pan-tilt sweep and greeting at each waypoint
- Person detection pause with timeout
- Automatic dock return when battery low
- Polling loop for state management
- Voice control integration
State Machine:
IDLE ↔ NAVIGATE → IDLE_BEHAVIOR → (next waypoint)
↓
[Person Detected] → PAUSE_PERSON
↓
[Battery Low] → RETURN_TO_DOCK
↓
[Teleop/Voice] → IDLE
Configuration:
- Waypoints with name, x, y, yaw
- Idle time range (min/max)
- Battery dock threshold (default 25%)
- Person detection pause timeout
Topics:
- /saltybot/patrol_state (String)
- /saltybot/speech_text (String)
- /saltybot/pan_tilt_cmd (String)
- /saltybot/person_detections (Detection2DArray)
- /saltybot/teleop_cmd (String)
- /saltybot/voice_cmd (String)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
30 lines
848 B
Python
30 lines
848 B
Python
from setuptools import setup
|
|
import os
|
|
from glob import glob
|
|
|
|
package_name = 'saltybot_patrol'
|
|
|
|
setup(
|
|
name=package_name,
|
|
version='0.1.0',
|
|
packages=[package_name],
|
|
data_files=[
|
|
('share/ament_index/resource_index/packages', ['resource/' + package_name]),
|
|
('share/' + package_name, ['package.xml']),
|
|
(os.path.join('share', package_name, 'launch'), glob('launch/*.py')),
|
|
(os.path.join('share', package_name, 'config'), glob('config/*.yaml')),
|
|
],
|
|
install_requires=['setuptools'],
|
|
zip_safe=True,
|
|
maintainer='seb',
|
|
maintainer_email='seb@vayrette.com',
|
|
description='Autonomous patrol mode for SaltyBot',
|
|
license='MIT',
|
|
tests_require=['pytest'],
|
|
entry_points={
|
|
'console_scripts': [
|
|
'patrol_node = saltybot_patrol.patrol_node:main',
|
|
],
|
|
},
|
|
)
|