Skip to main content

hiveBr — Brazilian Open Lab for Multi-Robots

🐝hiveBr — OpenLab Simulator

PyPI version Python versions License: MIT Docs

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

License

MIT — free for educational and research use. See LICENSE.

hivebr logo

Metadata

Release files for hivebr 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hivebr 0.1.3
File Size Uploaded
hivebr-0.1.3.tar.gz 2.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for hivebr 0.1.3
File Interpreter ABI Platform
hivebr-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 4.1 MB

Release files / hivebr-0.1.3.tar.gz

Download URL hivebr-0.1.3.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
4422b8604fd13e25400bb08840907001bd3f049ea4dafc51d5059ee4335d33e3
BLAKE2b-256 checksum
How to use checksums
d654ae91af93c9cf7b0790c5c31d9808abddecf65f6f6887ae5d05ebeee50203
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.3-py3-none-any.whl

Download URL hivebr-0.1.3-py3-none-any.whl
Size 2.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7875d5db9a03f8d7d231764e4a320a9e3061d628159a07aba1aeaf0f6fcfa69b
BLAKE2b-256 checksum
How to use checksums
57e66ff99cefee0d71b1e97dfdef33d8f3ad1bd8ecdf9c0286956a626fa2fb29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page