Skip to main content

Crate gloamy_robot

Crate gloamy_robot 

Source
Expand description

§Gloamy Robot

gloamy-robot is the standalone robot-control crate for Gloamy. It groups the robot-facing tool surface in one library so robot integrations can evolve without coupling every hardware concern into the root runtime.

§Included tool surfaces

  • DriveTool: movement commands for mock, serial, or ROS2-backed bases
  • LookTool: image capture plus optional Ollama-based vision description
  • ListenTool: offline speech-to-text using arecord and whisper.cpp
  • SpeakTool: Piper-based text-to-speech and canned sound playback
  • SenseTool: obstacle, distance, and motion reads
  • EmoteTool: lightweight LED and sound-driven expression output
  • SafetyMonitor and SafeDrive: movement gating and emergency-stop support

§Integration model

This crate is a workspace member, but it is not auto-registered into the main gloamy tool factory. The expected pattern today is:

  1. load or construct a RobotConfig
  2. build tools with create_tools or create_safe_tools
  3. optionally adapt this crate’s Tool trait into the main runtime

§Quick start

use gloamy_robot::{create_tools, RobotConfig};

let config = RobotConfig::default();
let tools = create_tools(&config);

assert_eq!(tools.len(), 6);

§Safety model

The control plane may request movement, but SafetyMonitor decides whether movement is allowed. That separation is intentional and keeps collision handling, watchdog behavior, and emergency-stop responses outside the LLM’s decision loop.

Re-exports§

pub use config::RobotConfig;
pub use traits::Tool;
pub use traits::ToolResult;
pub use traits::ToolSpec;
pub use drive::DriveTool;
pub use emote::EmoteTool;
pub use listen::ListenTool;
pub use look::LookTool;
pub use sense::SenseTool;
pub use speak::SpeakTool;
pub use safety::preflight_check;
pub use safety::SafeDrive;
pub use safety::SafetyEvent;
pub use safety::SafetyMonitor;
pub use safety::SensorReading;

Modules§

config
Robot-kit configuration types and file helpers.
drive
Movement tool implementations.
emote
Expression and non-verbal feedback tools.
listen
Speech capture and transcription tools.
look
Camera capture and scene-description tools.
safety
Safety monitor and movement-gating utilities.
sense
Sensor reading and obstacle-awareness tools.
speak
Speech synthesis and sound playback tools.
traits
Lightweight tool contracts used by gloamy-robot.

Constants§

VERSION
Version of the published crate.

Functions§

create_safe_tools
Build the standard robot tool set with safety-enforced drive control.
create_tools
Build the standard robot tool set from a shared configuration.