Add ruvector-robotics: unified cognitive robotics platform#220
Merged
Conversation
Copy 6 agentic-robotics crates (core, rt, mcp, embedded, node, benchmarks) into ruvector/crates/ for deep integration review. These provide: - ROS3 pub/sub messaging with Zenoh middleware and CDR serialization - Dual-runtime real-time executor with priority scheduling - MCP 2025-11 server for AI tool exposure - NAPI-RS Node.js bindings - Criterion benchmark suite Create comprehensive research documentation in docs/research/agentic-robotics/: - README.md: SOTA integration analysis (889 lines) - crate-review.md: Crate-by-crate deep code review (967 lines) - architecture-synergy.md: Architecture compatibility analysis (555 lines) - integration-roadmap.md: 18-week phased implementation plan (769 lines) Key findings: 14/16 shared dependencies are version-compatible, both use rkyv 0.8 for zero-copy serialization, identical build profiles, and complementary (not overlapping) functionality. The combination creates a unique cognitive robotics platform with sub-millisecond sensor-to-decision latency, native vector search, GNN inference, and MCP tool exposure. https://claude.ai/code/session_01H1GkTK5z9ppVVQDQukjBsY
…gnitive, and MCP modules Consolidates robotics functionality into a single crate with four modules: - bridge: Core types (Point3D, PointCloud, RobotState, Pose), spatial indexing, distance metrics, sensor converters, and perception pipeline - perception: Scene graph construction, obstacle detection/classification, anomaly detection, trajectory prediction, and attention focusing - cognitive: Behavior trees, perceive-think-act-learn loop, multi-criteria decision engine, three-tier memory system, skill learning from demonstration, swarm coordination with formations/consensus, and world model tracking - mcp: Tool registry with 15 registered tools across 6 categories Includes 26 passing tests (10 unit + 15 integration + 1 doc), 5 crate examples, 10 standalone binary examples, benchmarks covering 10 groups, and user guide. https://claude.ai/code/session_01H1GkTK5z9ppVVQDQukjBsY
The DRY refactor that extracted shared clustering code accidentally removed the HashMap import still needed by merge_scenes. https://claude.ai/code/session_01H1GkTK5z9ppVVQDQukjBsY
…ross-domain transfer Performance optimizations (net -134 lines): - BinaryHeap kNN: O(n log k) vs O(n log n) full sort in SpatialIndex - Zero-clone behavior tree tick via pointer-based borrow splitting - VecDeque percept buffer for O(1) front eviction - HashSet assigned_robots for O(1) membership checks - Shared clustering module eliminates 3 duplicate implementations Correctness fixes: - UntilFail decorator 10k iteration guard prevents infinite loops - OccupancyGrid bounds-checked get() returns Option<f32> - Pipeline position_history capped at 1000 entries - Skill learning gracefully handles empty demonstrations - Anomaly type gets Serialize/Deserialize derives Dead code removal: - Remove unused TrajectoryPoint struct - Remove unused tracing and rand dependencies Domain expansion integration (behind `domain-expansion` feature flag): - RoboticsDomain implements domain::Domain trait with 5 task categories: PointCloudClustering, ObstacleAvoidance, SceneGraphConstruction, SkillSequencing, SwarmFormation - 64-dim embedding space compatible with planning/orchestration/synthesis - Reference solutions, difficulty scaling, cross-domain transfer tests - Enables Meta Thompson Sampling transfer between robotics and existing domains (Rust synthesis, structured planning, tool orchestration) All 257 tests pass (231 unit + 25 integration + 1 doc-test). https://claude.ai/code/session_01H1GkTK5z9ppVVQDQukjBsY
- Remove unsafe pointer aliasing in BehaviorTree::tick(), use safe disjoint field borrowing instead (P0) - Fix usize underflow in score_scene_graph when expected_objects < 2 (P0) - Fix cluster ID overflow in reference_solution for PointCloudClustering (P0) - Fix NaN handling in MaxDistEntry::cmp — NaN treated as maximally distant so it gets evicted from kNN heap first (P1) - Clamp cosine_distance output to prevent negative values from floating-point rounding (P1) - Change search_radius to return Ok(Vec::new()) for empty index instead of Err(EmptyIndex) for correct semantics (P1) - Add debug_assert guards for empty slices in bounding_sphere and cluster_to_object (P1) - Remove dead PipelineConfig.spatial_search_k field (P2) - Use serde_json::from_value instead of to_string+from_str roundtrip in domain_expansion for better performance (P2) All 257 tests pass. https://claude.ai/code/session_01H1GkTK5z9ppVVQDQukjBsY
…usion, and benchmarks New modules for ruvector-robotics: - bridge/gaussian: GaussianSplat types, PointCloud→Gaussian conversion, vwm-viewer JSON export - planning: A* pathfinding on OccupancyGrid with octile heuristic, potential field velocity commands - mcp/executor: ToolExecutor dispatching ToolRequests to perception pipeline and spatial index - perception/sensor_fusion: multi-sensor cloud fusion with timestamp alignment and voxel downsampling Rewrites integration tests to use actual crate APIs instead of local reimplementations, eliminating ~280 lines of false-positive test code. Adds 15 benchmark groups covering all new modules (Gaussian conversion, A* planning, potential fields, sensor fusion, MCP execution). All 270+ tests pass including domain-expansion feature. https://claude.ai/code/session_01H1GkTK5z9ppVVQDQukjBsY
New `rvf` feature flag enables the `ruvf::RoboticsRvf` wrapper that bridges point clouds, scene graphs, trajectories, Gaussian splats, and obstacles into the RuVector Format (.rvf) for persistence and similarity search. RoboticsRvf supports: - pack_point_cloud (dim 3) - pack_scene_objects / pack_scene_graph (dim 9) - pack_trajectory (dim 3) - pack_gaussians (dim 7) — converts PointCloud→GaussianSplatCloud→RVF - pack_obstacles (dim 6) - query_nearest (kNN via HNSW index) - open/open_readonly/close lifecycle 9 unit tests covering create, ingest, query, reopen, dimension mismatch, and empty data rejection. Also fixes unused import warnings in integration tests. All 290 tests pass across default, domain-expansion, and rvf features. https://claude.ai/code/session_01H1GkTK5z9ppVVQDQukjBsY
…erception SpatialIndex: replace Vec<Vec<f32>> with flat Vec<f32> buffer for cache locality and zero per-point heap allocation; use squared Euclidean distance in kNN/radius search (defer sqrt to final k results); fuse cosine distance into single loop. Clustering: add union-by-rank to union-find preventing tree degeneration (O(α(n)) amortized); add #[inline] on hot helpers. A* planning: add closed set (HashSet) to avoid re-expanding nodes; reuse neighbor buffer to eliminate per-expansion Vec allocation; pre-allocate HashMap capacity; add #[inline] on helpers. Perception: defer sqrt in bounding_sphere (compare squared distances, one sqrt at end); defer sqrt in scene graph edge construction (filter on squared threshold); add #[inline] on dist_3d. Sensor fusion: pre-allocate merged vectors from total eligible cloud size. Anomaly detection: fuse distance + statistics into single pass using Welford's online algorithm (eliminates one full data pass). All 281 tests pass. https://claude.ai/code/session_01H1GkTK5z9ppVVQDQukjBsY
edmondklu2-crypto
approved these changes
Feb 27, 2026
Clippy fixes (8 warnings → 0): - Replace 5 manual Default impls with #[derive(Default)] - Use .clamp() instead of .min().max() chain - Use .is_some_and() instead of .map_or(false, ...) - Add type alias for complex return type in scene_graph_to_adjacency P0 correctness fixes from code review: - Fix NaN panic: use unwrap_or(Ordering::Equal) in cognitive_core think() - Fix integer overflow: use checked_mul in OccupancyGrid::new - Fix potential unwrap: use map_or in domain_expansion score_avoidance Co-Authored-By: claude-flow <ruv@ruv.net>
Add repository, homepage, keywords, categories for crates.io listing. Pin optional dependency versions (ruvector-domain-expansion 2.0.4, rvf-runtime 0.2, rvf-types 0.2) required for cargo publish. Co-Authored-By: claude-flow <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces
ruvector-robotics, a comprehensive cognitive robotics platform that integrates with ruvector's vector database, graph neural networks, and self-learning infrastructure. The new crate provides a complete robotics stack spanning perception, planning, cognitive architecture, and multi-robot coordination.Key Changes
Core Bridge Module (
crates/ruvector-robotics/src/bridge/)Perception Subsystem (
crates/ruvector-robotics/src/perception/)Cognitive Architecture (
crates/ruvector-robotics/src/cognitive/)MCP Integration (
crates/ruvector-robotics/src/mcp/)Planning Module (
crates/ruvector-robotics/src/planning.rs)Domain Expansion (
crates/ruvector-robotics/src/domain_expansion.rs)ruvector_domain_expansion::Domaintrait for cross-domain transfer learningRVF Packaging (
crates/ruvector-robotics/src/rvf.rs)Testing & Benchmarking
tests/robotics_integration.rs,tests/integration.rs): Full pipeline validation across bridge, perception, cognitive, and MCP modulesbenches/robotics_benchmarks.rs): 1247-line benchmark suite covering point cloud conversion, spatial search, obstacle detection, trajectory prediction, attention computation, behavior tree execution, scene graph construction, episodic memory recall, full perceive→think→act pipeline, and swarm task assignmentExamples
https://claude.ai/code/session_01H1GkTK5z9ppVVQDQukjBsY