🐝hiveBr — OpenLab Simulator
A lightweight 2D simulation framework for single- and multi-robot mobile navigation, built on Pygame, with a dual-paradigm OpenLab API for centralized and decentralized control.
Robots in the simulator are called B-bots (for bee), keeping the hive metaphor.
📖 Full documentation: https://eliasjof.github.io/hivebr_simulator/
Installation
pip install hivebr
Optional extras:
pip install "hivebr[maps]" # occupancy grids (Pillow + scipy)
pip install "hivebr[plot]" # data logger plots (matplotlib)
Quick start
from hivebr import HiveBrAgent, SwarmExperiment
class Patrol(HiveBrAgent):
def loop(self, state, neighbors):
# state.goal holds the current waypoint (x, y, theta)
return 0.5, 0.0
exp = SwarmExperiment(robots=3, backend="navsim2d")
exp.assign_agent(robot_ids=[0, 1, 2], agent_class=Patrol)
exp.assign_route(0, [[5, 2, 0.0], [5, 6, 0.0]])
exp.run()
A single robot is just a fleet with N = 1. Switching backend="ros2" reuses
the same agent code on the physical arena.
Dual paradigm
Decentralized — HiveBrAgent |
Centralized — SwarmController |
|---|---|
| One instance per B-bot | Exactly one instance |
Receives its state + neighbors |
Receives all states |
| Returns a command | Returns {robot_id: command} |
| Reactive control, consensus | Global planning, optimization (DE, L-SHADE) |
Features
- Mono or fleet, one API. A single robot is a fleet with
N = 1. - Interactive GUI. Pan/zoom, load occupancy-grid maps, switch themes, toggle LiDAR, add waypoints and obstacles with the mouse.
- Two environment representations. Analytic circular obstacles and image-based occupancy grids with inflation.
- Precision sensing. Ray-casting LiDAR (DDA) against the grid plus analytic circle intersections.
- Deterministic fleets. Each timestep is computed from a frozen snapshot of the fleet state, independent of update order.
- Research-ready. Pluggable controllers, path planners (A*, RRT, RRT*, PRM, BIT*, OMPL, RRT-Dubins), and a data logger for offline analysis.
Robot models
type |
Command |
|---|---|
differential |
{"v": ..., "omega": ...} |
differential_firstorder |
{"v": ..., "omega": ...} |
holonomic |
{"vx": ..., "vy": ...} |
ackermann |
{"speed": ..., "steer": ...} |
boat |
{"v": ..., "omega": ...} |
Run the examples
# from a clone of the repository (examples are not shipped in the wheel)
python examples/controle_robodiferencial.py
python examples/decentralized_swarm.py
python examples/decentralized_multiprocess.py
python examples/multi_robot_differential.py
python examples/multi_line_follower.py
Links
- Documentation: https://eliasjof.github.io/hivebr_simulator/
- Repository: https://github.com/eliasjof/hivebr_simulator
- Issue tracker: https://github.com/eliasjof/hivebr_simulator/issues
License
MIT — free for educational and research use. See LICENSE.
Metadata
Release files for hivebr 0.1.5.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hivebr-0.1.5.6.tar.gz | 2.1 MB | Without provenance | Details for hivebr-0.1.5.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hivebr-0.1.5.6-py3-none-any.whl | Python 3 | none | any | Details for hivebr-0.1.5.6-py3-none-any.whl |
Total release size: 4.1 MB
Release files / hivebr-0.1.5.6.tar.gz
| Download URL | hivebr-0.1.5.6.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95cb3e2c10326b3126de79f6fe8d0a081cf627839db9bcfd84db100737c89258
|
|
BLAKE2b-256 checksum How to use checksums |
7e9f983325088d55cbc3ef39d78043829c0f32a5790989cec0a5ec1c1c30872b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / hivebr-0.1.5.6-py3-none-any.whl
| Download URL | hivebr-0.1.5.6-py3-none-any.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d97e1170a8300e630879243d6d63e34025bd690fbb499a4f9056726cc6306a80
|
|
BLAKE2b-256 checksum How to use checksums |
85b101bd1d0f208f0cb5ca9c575dde849ee70ec27159f92059eda0e5ee501189
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for hivebr 0.1.5.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.