feat(social): voice command NLU — 30+ intents with confirmation flow (Issue #137) #148
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-jetson/issue-137-voice-commands"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
VoiceCommand.msg: new ROS2 message —intent,entities[](key=value),confidence,requires_confirmation,confirmation_tokenvoice_command_parser.py: pure-Python regex NLU, zero ML/ROS2 deps, < 1 ms/callvoice_command_node.py: subscribes/social/speech/transcript, publishes/social/voice_command, handles confirmation flowIntent taxonomy (30+ named commands)
nav.*go_to,go_home,follow_me,stop,wait,come_here,patrol,set_mode(6 sub-modes),teach_route,stop_teaching,replay_routesocial.*remember_me,forget_me⚠️,whats_my_name,tell_jokesystem.*battery_status,map_status,shutdown⚠️,restart⚠️,volume_up,volume_down,volume_setconfig.*personality,sass_level,follow_modeconfirm.*yes,nofallback→ LLM conversation engine⚠️ = requires_confirmation (10 s timeout, UUID token for matching)
Confirmation flow
Files
saltybot_social_msgs/msg/VoiceCommand.msgvoice_command_parser.pyvoice_command_node.pytest_voice_command_parser.pyconfig/voice_command_params.yamllaunch/voice_command.launch.pyTest plan
python -m pytest test/test_voice_command_parser.py -v→ 191/191 pass (no ROS2 runtime)colcon build --packages-select saltybot_social_msgs saltybot_socialros2 run saltybot_social voice_command_nodestarts without errors/social/voice_commandoutputCloses #137
🤖 Generated with Claude Code
## New files - saltybot_social_msgs/msg/VoiceCommand.msg intent + entities[] + confidence + confirmation_token + requires_confirmation - saltybot_social/voice_command_parser.py Pure-Python regex NLU, zero ROS2/ML deps, < 1 ms/call 30+ named intents across nav.*, social.*, system.*, config.*, confirm.* Entity extraction: location, name, mode, level, route name Dangerous-command flag: system.shutdown, system.restart, social.forget_me - saltybot_social/voice_command_node.py Subscribes /social/speech/transcript, publishes /social/voice_command Confirmation flow with UUID token + 10 s timeout Below-threshold → intent=fallback → LLM conversation engine - saltybot_social/test/test_voice_command_parser.py 191 unit tests (all pass), no ROS2 runtime required - saltybot_social/config/voice_command_params.yaml - saltybot_social/launch/voice_command.launch.py ## Intent taxonomy nav: go_to, go_home, follow_me, stop, wait, come_here, patrol, set_mode (shadow/lead/side/orbit/loose/tight), teach_route, stop_teaching, replay_route social: remember_me, forget_me [CONFIRM], whats_my_name, tell_joke system: battery_status, map_status, shutdown [CONFIRM], restart [CONFIRM], volume_up, volume_down, volume_set config: personality, sass_level, follow_mode ## Updated - saltybot_social_msgs/CMakeLists.txt: register VoiceCommand.msg - saltybot_social/setup.py: add voice_command_node entry point Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>