World-Class General Purpose Robotics Framework & API for Java
JRobotics is a modular, high-performance, and secure robotics platform for Java 21+. It provides an end-to-end toolkit spanning hardware abstraction, sensor fusion, computer vision, kinematics, artificial intelligence, multi-robot swarm orchestration, physical 2D/3D simulation, and real-time networking.
| Metric | Value |
|---|---|
| Maven Modules | 14 (13 submodules + root parent) |
| Java Classes | 214+ classes & records |
| Lines of Code | ~25,000 LOC |
| Test Suites | Unit, Integration, & JMH Benchmarks (100% pass rate) |
| Target Java Version | Java 21 LTS (records, pattern matching, concurrent utilities) |
| License | MIT Open Source |
- Deterministic Lifecycle: Uniform component states (
CREATED,INITIALIZED,STARTED,RUNNING,PAUSED,STOPPED,DESTROYED) with thread-safe atomic transitions. - Asynchronous Event Bus: High-throughput typed event publication and subscription.
- Dedicated Threading Infrastructure:
RobotExecutorsmanaging sensor acquisition, actuator command loops, and background I/O. - Internationalization (i18n): Fully localized diagnostics and logs (English, French, Spanish, German, Chinese).
- Unified Protocol Interfaces: GPIO, I2C, SPI, and UART/Serial abstractions.
- Target Drivers: Native Raspberry Pi support (Pi4J), USB/Serial devices (JSerialComm), and automated virtual mock fallback for desktop simulation.
- Extensive Sensor Types: LiDAR, Ultrasonic, Depth/RGB Vision, 9-DoF IMU, Encoders, GPS/GNSS, and Vosk Speech Recognition.
- Sensor Fusion Algorithms:
- 1D Kalman Filter & Multi-dimensional Extended Kalman Filter (EKF) with Gauss-Jordan inversion.
- Complementary Filter for low-latency orientation tracking.
- Motors: DC, Stepper, and Brushless motor controllers with speed ramp curves and zero-division guards.
- Servos: Position and continuous servos,
ServoBankmulti-channel controllers, acceleration profiles. - Closed-Loop Control: Industrial-grade PID / Feedforward controllers with integral windup protection.
- Path Planning & Navigation:
- Grid-based A* (optimal priority queue re-evaluation).
- Dynamic Window Approach (DWA) obstacle avoidance.
- Rapidly-exploring Random Trees (RRT) and Dijkstra graph search.
- Simultaneous Localization and Mapping (SLAM):
- FastSLAM 2.0 particle filter with landmark estimation.
- Occupancy Grid Mapping with Bresenham ray-casting and log-odds updates.
- Deep Learning & Computer Vision:
- Deep Java Library (DJL) engine support (PyTorch & TensorFlow inference).
- Object detection pipelines (YOLO / SSD) with non-maximum suppression.
- Reinforcement Learning:
- Deep Q-Network (DQN) agents with experience replay.
- Proximal Policy Optimization (PPO) Actor-Critic agents with analytical backpropagation.
- Behavior Trees: Robust execution trees with composite, decorator, and leaf action/condition nodes.
- Swarm Intelligence: Boids Reynolds flocking, V-shape/Circle/Grid formation control, and dynamic leader election.
- Distributed Shared Memory (DSM): UDP multicast peer-to-peer state synchronization.
- Federated Learning (FedAvg): Decentralized model aggregation across robotic swarms.
- Hive Mind: Centralized orchestration for multi-robot fleets.
- Hardened Serialization: JSON-over-TCP/UDP communication with length headers and maximum payload boundaries, eliminating Java native deserialization RCE risks (CWE-502).
- Transport Security (TLS 1.3): Enforced TLS endpoint hostname verification (CWE-297).
- Authentication & RBAC: Token-based authentication with constant-time verification (
MessageDigest.isEqual) against timing side-channel attacks (CWE-208). - Secure OTA Updates: Over-The-Air firmware deployments with streaming SHA-256 validation and directory traversal prevention (CWE-22).
- Real-Time Web Dashboard: Lightweight HTTP/WebSocket monitoring server protected against Slowloris DoS.
- Physics Engine: Rigid body dynamics, gravity, friction, restitution, and collisions.
- Zero-Allocation Pools:
Vector3Poolwith double-release guards for GC-free physics hot loops. - Multi-Engine Visualizers: Console ASCII renderer, JavaFX 2D canvas, Swing 2D viewport, and JMonkeyEngine (jME3) 3D world.
- Mobile Platforms: Differential drive, Ackermann, and Omnidirectional kinematics with real-time odometry.
- Manipulators: Multi-link
RoboticArmwith CCD (Cyclic Coordinate Descent) Inverse Kinematics solver. - Adapters: TurtleBot3, iRobot Create3, Arduino, and custom DIY frames.
- ROS 2 Integration: Native ROS 2 bridge client for topics and services.
- MQTT Bridge: Clean Eclipse Paho MQTT bridge for IoT gateways.
- Cloud Adapters: Extensible protocols for AWS IoT and Azure IoT Hub.
- CLI (
jrobotics-cli): Command-line interface for robot discovery, diagnostics, and telemetry streaming. - Visual Editor (
jrobotics-editor): Graphical canvas for designing Behavior Trees and robot setups. - Benchmarks (
jrobotics-benchmark): JMH harnesses measuring microsecond-level performance.
- JDK 21+ (Eclipse Temurin, OpenJDK, or GraalVM recommended)
- Maven 3.9+
- Git
# Clone the repository
git clone https://github.com/silvere-martin/jrobotics.git
cd jrobotics/v2
# Build all 14 modules and run the full test suite
mvn clean test
# Package all JAR artifacts
mvn clean package -DskipTests# Interactive 2D Visual / Console Simulation
./run-visual-demo.bat # Windows
./run-visual-demo.sh # Linux / macOS
# JMonkeyEngine 3D Physics Simulation
./run-3d-demo.bat # Windows
./run-3d-demo.sh # Linux / macOS
# Web Telemetry Dashboard
./run-dashboard-demo.bat # Windows
./run-dashboard-demo.sh # Linux / macOS
# JMH Microbenchmarks
./run-benchmarks.bat # Windows
./run-benchmarks.sh # Linux / macOSimport org.jrobotics.core.context.DefaultRobotContext;
import org.jrobotics.robot.mobile.DifferentialDriveRobot;
import org.jrobotics.processor.navigation.AStarPathPlanner;
// Create and initialize robot
DifferentialDriveRobot robot = new DifferentialDriveRobot("Scout-1", 0.15, 0.30);
robot.init(new DefaultRobotContext());
robot.start();
// Plan path on 100x100 occupancy grid
AStarPathPlanner planner = new AStarPathPlanner(100, 100);
List<int[]> path = planner.findPath(0, 0, 45, 80);
// Drive along path
robot.drive(0.5, 0.0); // 0.5 m/s forwardimport org.jrobotics.robot.manipulator.RoboticArm;
import org.jrobotics.robot.manipulator.CcdInverseKinematicsSolver;
import org.jrobotics.simulation.Vector3;
RoboticArm arm = new RoboticArm("Arm-6DoF");
arm.addSegment(1.0, Vector3.ZERO);
arm.addSegment(0.8, new Vector3(1.0, 0, 0));
arm.addSegment(0.5, new Vector3(1.8, 0, 0));
CcdInverseKinematicsSolver solver = new CcdInverseKinematicsSolver(50, 0.01);
boolean reached = solver.solve(arm, new Vector3(1.2, 0.5, 0.2));import org.jrobotics.network.server.TcpServer;
import org.jrobotics.network.server.TcpClient;
import org.jrobotics.network.security.SecureTransport;
import org.jrobotics.network.security.TLSConfig;
// Setup TLS configuration
TLSConfig tls = TLSConfig.builder()
.keyStorePath("keystore.jks")
.keyStorePassword("secret")
.requireClientAuth(true)
.build();
TcpServer server = new TcpServer(8443, tls);
server.start();
TcpClient client = new TcpClient("127.0.0.1", 8443, tls);
client.connect();
client.sendMessage("Scout-1", "TELEMETRY", Map.of("battery", 98.5));jrobotics/
βββ jrobotics-core # Lifecycle, EventBus, Concurrency, i18n
βββ jrobotics-hal # GPIO, I2C, SPI, Serial, Hardware abstraction
βββ jrobotics-sensor # LiDAR, IMU, Vision, Vosk Voice, Kalman & EKF
βββ jrobotics-actuator # DC/Stepper/Brushless Motors, Servos, PID loops
βββ jrobotics-processor # A*, DWA, FastSLAM, OccupancyGrid, DJL, DQN, PPO
βββ jrobotics-simulation # Rigid-body physics, Vector3Pool, 2D/3D renderers
βββ jrobotics-network # TLS Sockets, RBAC, Safe JSON, Swarm DSM, OTA
βββ jrobotics-robot # Mobile robots, Manipulators, CCD IK, Adapters
βββ jrobotics-bridge # ROS 2, MQTT, Cloud IoT connectors
βββ jrobotics-benchmark # JMH performance measurement suites
βββ jrobotics-demo # Interactive 2D/3D & multi-robot scenarios
βββ jrobotics-cli # Operator CLI terminal
βββ jrobotics-editor # Visual Behavior Tree & Configuration designer
- ποΈ Architecture & Design Guide
- π Networking & Security Protocol Comparison
- πΊοΈ Development Roadmap & Milestones
- π₯ Project Credits & Bibliography
This project is licensed under the MIT License. See the LICENSE file for details.
- Silvère Martin-Michiellot - Lead Architect & Developer - silvere.martin@gmail.com
- Google DeepMind / Antigravity AI - Co-Developer & QA Auditor