BulletLab 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. bulletlab-0.1.2/BulletLab.egg-info/PKG-INFO +284 -0
  2. bulletlab-0.1.2/BulletLab.egg-info/SOURCES.txt +75 -0
  3. bulletlab-0.1.2/BulletLab.egg-info/dependency_links.txt +1 -0
  4. bulletlab-0.1.2/BulletLab.egg-info/requires.txt +15 -0
  5. bulletlab-0.1.2/BulletLab.egg-info/top_level.txt +1 -0
  6. bulletlab-0.1.2/LICENSE +21 -0
  7. bulletlab-0.1.2/MANIFEST.in +6 -0
  8. bulletlab-0.1.2/PKG-INFO +284 -0
  9. bulletlab-0.1.2/README.md +237 -0
  10. bulletlab-0.1.2/bulletlab/__init__.py +48 -0
  11. bulletlab-0.1.2/bulletlab/core/__init__.py +10 -0
  12. bulletlab-0.1.2/bulletlab/core/simulation.py +377 -0
  13. bulletlab-0.1.2/bulletlab/core/world.py +173 -0
  14. bulletlab-0.1.2/bulletlab/logging/__init__.py +9 -0
  15. bulletlab-0.1.2/bulletlab/logging/csv_writer.py +54 -0
  16. bulletlab-0.1.2/bulletlab/logging/json_writer.py +70 -0
  17. bulletlab-0.1.2/bulletlab/logging/logger.py +258 -0
  18. bulletlab-0.1.2/bulletlab/plotting/__init__.py +9 -0
  19. bulletlab-0.1.2/bulletlab/plotting/live_plot.py +364 -0
  20. bulletlab-0.1.2/bulletlab/robot/__init__.py +12 -0
  21. bulletlab-0.1.2/bulletlab/robot/joint.py +402 -0
  22. bulletlab-0.1.2/bulletlab/robot/link.py +401 -0
  23. bulletlab-0.1.2/bulletlab/robot/robot.py +533 -0
  24. bulletlab-0.1.2/bulletlab/telemetry/__init__.py +10 -0
  25. bulletlab-0.1.2/bulletlab/telemetry/channel.py +124 -0
  26. bulletlab-0.1.2/bulletlab/telemetry/manager.py +227 -0
  27. bulletlab-0.1.2/bulletlab/ui/__init__.py +31 -0
  28. bulletlab-0.1.2/bulletlab/ui/app.py +543 -0
  29. bulletlab-0.1.2/bulletlab/ui/panels/__init__.py +16 -0
  30. bulletlab-0.1.2/bulletlab/ui/panels/console.py +189 -0
  31. bulletlab-0.1.2/bulletlab/ui/panels/explorer.py +144 -0
  32. bulletlab-0.1.2/bulletlab/ui/panels/plots.py +143 -0
  33. bulletlab-0.1.2/bulletlab/ui/panels/properties.py +265 -0
  34. bulletlab-0.1.2/bulletlab/ui/panels/telemetry.py +105 -0
  35. bulletlab-0.1.2/bulletlab/ui/widgets.py +348 -0
  36. bulletlab-0.1.2/bulletlab/utils/__init__.py +26 -0
  37. bulletlab-0.1.2/bulletlab/utils/math_utils.py +183 -0
  38. bulletlab-0.1.2/bulletlab/utils/timer.py +107 -0
  39. bulletlab-0.1.2/bulletlab/utils/urdf_utils.py +114 -0
  40. bulletlab-0.1.2/docs/api/joint.md +9 -0
  41. bulletlab-0.1.2/docs/api/link.md +5 -0
  42. bulletlab-0.1.2/docs/api/logging.md +5 -0
  43. bulletlab-0.1.2/docs/api/plotting.md +5 -0
  44. bulletlab-0.1.2/docs/api/robot.md +5 -0
  45. bulletlab-0.1.2/docs/api/simulation.md +24 -0
  46. bulletlab-0.1.2/docs/api/telemetry.md +9 -0
  47. bulletlab-0.1.2/docs/api/ui.md +11 -0
  48. bulletlab-0.1.2/docs/developer/architecture.md +85 -0
  49. bulletlab-0.1.2/docs/developer/developer_guide.md +91 -0
  50. bulletlab-0.1.2/docs/guides/example_guide.md +88 -0
  51. bulletlab-0.1.2/docs/guides/plotting_guide.md +62 -0
  52. bulletlab-0.1.2/docs/guides/rl_guide.md +113 -0
  53. bulletlab-0.1.2/docs/guides/robot_guide.md +144 -0
  54. bulletlab-0.1.2/docs/guides/telemetry_guide.md +67 -0
  55. bulletlab-0.1.2/docs/guides/ui_guide.md +117 -0
  56. bulletlab-0.1.2/docs/index.md +64 -0
  57. bulletlab-0.1.2/docs/quickstart.md +125 -0
  58. bulletlab-0.1.2/examples/01_differential_drive_rover.py +190 -0
  59. bulletlab-0.1.2/examples/02_robotic_arm.py +170 -0
  60. bulletlab-0.1.2/examples/03_self_balancing_robot.py +198 -0
  61. bulletlab-0.1.2/examples/04_drone_parameter_tuning.py +278 -0
  62. bulletlab-0.1.2/examples/05_generic_robot_inspector.py +214 -0
  63. bulletlab-0.1.2/examples/06_irregular_terrain.py +213 -0
  64. bulletlab-0.1.2/examples/assets/quadrotor.urdf +71 -0
  65. bulletlab-0.1.2/examples/demo_ui_control.py +281 -0
  66. bulletlab-0.1.2/pyproject.toml +104 -0
  67. bulletlab-0.1.2/setup.cfg +4 -0
  68. bulletlab-0.1.2/setup.py +9 -0
  69. bulletlab-0.1.2/tests/test_joint.py +108 -0
  70. bulletlab-0.1.2/tests/test_link.py +115 -0
  71. bulletlab-0.1.2/tests/test_logging.py +211 -0
  72. bulletlab-0.1.2/tests/test_plotting.py +77 -0
  73. bulletlab-0.1.2/tests/test_robot.py +118 -0
  74. bulletlab-0.1.2/tests/test_simulation.py +134 -0
  75. bulletlab-0.1.2/tests/test_telemetry.py +172 -0
  76. bulletlab-0.1.2/tests/test_ui_panels.py +245 -0
  77. bulletlab-0.1.2/tests/test_utils.py +205 -0
@@ -0,0 +1,284 @@
1
+ Metadata-Version: 2.4
2
+ Name: BulletLab
3
+ Version: 0.1.2
4
+ Summary: A high-level robotics simulation and experimentation framework built on PyBullet.
5
+ Home-page: https://github.com/NuclearVenom/BulletLab
6
+ Author: Ranasurya Ghosh
7
+ Author-email: Ranasurya Ghosh <ranasuryaghosh@gmail.com>
8
+ Maintainer-email: Ranasurya Ghosh <ranasuryaghosh@gmail.com>
9
+ License-Expression: MIT
10
+ Project-URL: Homepage, https://github.com/NuclearVenom/BulletLab
11
+ Project-URL: Documentation, https://nuclearvenom.bulletlab.docs
12
+ Project-URL: Repository, https://github.com/NuclearVenom/BulletLab
13
+ Project-URL: Issues, https://github.com/NuclearVenom/BulletLab/issues
14
+ Keywords: robotics,simulation,pybullet,reinforcement-learning,telemetry,imgui,physics,research,robot-control,robotics-framework
15
+ Classifier: Development Status :: 3 - Alpha
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Education
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Scientific/Engineering
25
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
26
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
+ Requires-Python: >=3.10
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: pybullet>=3.2.6
31
+ Requires-Dist: numpy>=1.24.0
32
+ Requires-Dist: pandas>=2.0.0
33
+ Requires-Dist: pyyaml>=6.0
34
+ Requires-Dist: imgui[glfw]>=2.0.0
35
+ Requires-Dist: pyqtgraph>=0.13.3
36
+ Requires-Dist: PyQt5>=5.15.0
37
+ Provides-Extra: dev
38
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
39
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
40
+ Requires-Dist: pytest-mock>=3.11.0; extra == "dev"
41
+ Requires-Dist: mkdocs>=1.5.0; extra == "dev"
42
+ Requires-Dist: mkdocstrings[python]>=0.23.0; extra == "dev"
43
+ Requires-Dist: mkdocs-material>=9.4.0; extra == "dev"
44
+ Dynamic: author
45
+ Dynamic: home-page
46
+ Dynamic: license-file
47
+
48
+ <h1>
49
+ <img src="https://raw.githubusercontent.com/NuclearVenom/BulletLab/main/assets/logo.png" width="40" align="center" alt="[logo]">
50
+ BulletLab
51
+ </h1>
52
+
53
+ Developed by [Ranasurya Ghosh](https://github.com/NuclearVenom)
54
+
55
+
56
+ >**A robotics experimentation framework that transforms PyBullet robots into intuitive Python objects, with modern ImGui-based controls, telemetry, visualization, and reinforcement learning workflows.**
57
+
58
+ [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/)
59
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
60
+
61
+ **Install BulletLab library:** `pip install bulletlab`<br><br>
62
+ [Read Documentation](https://nuclearvenom.github.io/BulletLab/)
63
+ <br><br>
64
+
65
+ ![BulletLab example UI](https://raw.githubusercontent.com/NuclearVenom/BulletLab/main/assets/bulletlab_ui.png)
66
+
67
+ ---
68
+
69
+ ## What is BulletLab?
70
+
71
+ BulletLab provides a high-level object-oriented interface to [PyBullet](https://pybullet.org/wordpress/) that simplifies robotics experimentation by exposing joints, links, sensors, and environments as intuitive Python objects instead of raw physics engine IDs. It combines real-time simulation with a [ImGui](https://www.dearimgui.com/)-powered modern interface for interactive control, parameter tuning, telemetry visualization, and experiment management, while also offering reinforcement learning integration for training and evaluating autonomous robotic systems within a unified workflow.
72
+
73
+ **Instead of this:**
74
+ ```python
75
+ p.setJointMotorControl2(
76
+ robot_id, joint_index,
77
+ controlMode=p.VELOCITY_CONTROL,
78
+ targetVelocity=15,
79
+ force=100
80
+ )
81
+ ```
82
+
83
+ **You write this:**
84
+ ```python
85
+ robot.joints["motor"].velocity = 15
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Architecture
91
+
92
+ BulletLab uses a **two-window architecture**:
93
+
94
+ | Window | Purpose |
95
+ |--------|---------|
96
+ | PyBullet Native Window | Physics simulation, 3D rendering, camera |
97
+ | BulletLab ImGui Window | Control panels, telemetry, live plots, console |
98
+
99
+ These windows communicate through Python objects. BulletLab does **not** attempt to replace PyBullet's renderer or embed ImGui inside the simulation viewport.
100
+
101
+ ---
102
+
103
+ ## Quick Start
104
+
105
+ ### Installation
106
+
107
+ ```bash
108
+ pip install bulletlab
109
+ # or from source:
110
+ pip install -e .
111
+ ```
112
+
113
+ ### Basic Example
114
+
115
+ ```python
116
+ from bulletlab import Simulation, Robot
117
+ from bulletlab.ui import BulletLabUI
118
+
119
+ # Create simulation
120
+ sim = Simulation()
121
+ sim.start()
122
+
123
+ # Load robot
124
+ robot = Robot.load("path/to/robot.urdf", sim=sim)
125
+
126
+ # Control joints by name
127
+ robot.joints["wheel_left"].velocity = 10
128
+ robot.joints["wheel_right"].velocity = 10
129
+
130
+ # Modify physics parameters
131
+ robot.links["chassis"].mass = 5.0
132
+ robot.links["wheel_fl"].friction = 1.2
133
+
134
+ # Get robot state
135
+ state = robot.get_state()
136
+ print(f"Position: {robot.base_position}")
137
+ print(f"Roll: {robot.roll:.2f}°")
138
+
139
+ # Build UI
140
+ ui = BulletLabUI(sim=sim)
141
+ ui.register_panel(...)
142
+ ui.run()
143
+ ```
144
+
145
+ ### Telemetry & Logging
146
+
147
+ ```python
148
+ from bulletlab.telemetry import TelemetryManager
149
+ from bulletlab.logging import DataLogger
150
+
151
+ telemetry = TelemetryManager()
152
+ telemetry.watch("Speed", lambda: robot.base_velocity[0])
153
+ telemetry.watch("Roll", lambda: robot.roll)
154
+
155
+ logger = DataLogger()
156
+ logger.watch("speed", lambda: robot.base_velocity[0])
157
+ logger.start("run1.csv")
158
+
159
+ for _ in range(1000):
160
+ sim.step()
161
+ telemetry.update()
162
+ logger.step()
163
+
164
+ logger.stop()
165
+ ```
166
+
167
+ ### Live Plotting
168
+
169
+ ```python
170
+ from bulletlab.plotting import LivePlot
171
+
172
+ plot = LivePlot(title="Robot Speed")
173
+ plot.watch("Speed", lambda: robot.base_velocity[0], color="#00ff88")
174
+ plot.start()
175
+
176
+ for _ in range(1000):
177
+ sim.step()
178
+ plot.update()
179
+ ```
180
+
181
+ ### ImGui Control Panel
182
+
183
+ ```python
184
+ from bulletlab.ui import BulletLabUI
185
+ from bulletlab.ui import widgets as ui
186
+
187
+ app = BulletLabUI(sim=sim, robots=[robot])
188
+
189
+ @app.custom_panel("My Controls")
190
+ def my_panel():
191
+ ui.button("Reset", robot.reset)
192
+ ui.slider("Wheel Mass", robot.links["wheel"].mass, 0.1, 20,
193
+ setter=lambda v: setattr(robot.links["wheel"], "mass", v))
194
+ ui.checkbox("Motors Enabled", lambda: motors_on,
195
+ setter=lambda v: toggle_motors(v))
196
+
197
+ app.run()
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Supported Robot Types
203
+
204
+ BulletLab is completely generic — no code assumes a specific robot type:
205
+
206
+ - Cars & rovers
207
+ - Drones & quadrotors
208
+ - Robotic arms
209
+ - Self-balancing robots
210
+ - Quadrupeds
211
+ - Humanoids
212
+ - Custom mechanisms
213
+
214
+ ---
215
+
216
+ ## Reinforcement Learning
217
+
218
+ BulletLab exposes clean state/action interfaces without depending on any ML framework:
219
+
220
+ ```python
221
+ # Compatible with any RL approach
222
+ state = robot.get_state() # → numpy array
223
+ action = my_policy(state) # → numpy array
224
+ robot.apply_action(action) # → updates joints
225
+
226
+ # Manual Q-learning, SARSA, evolutionary algorithms — all supported
227
+ ```
228
+
229
+ ---
230
+
231
+ ## Examples
232
+
233
+ | Example | Description |
234
+ |---------|-------------|
235
+ | `examples/01_differential_drive_rover.py` | Rover with wheel velocity control |
236
+ | `examples/02_robotic_arm.py` | Joint position control with ImGui sliders |
237
+ | `examples/03_self_balancing_robot.py` | PD controller for balance |
238
+ | `examples/04_drone_parameter_tuning.py` | Thrust/mass parameter exploration |
239
+ | `examples/05_generic_robot_inspector.py` | Load any URDF and inspect it |
240
+
241
+ Run any example:
242
+ ```bash
243
+ python examples/01_differential_drive_rover.py
244
+ ```
245
+
246
+ ---
247
+
248
+ ## Documentation
249
+
250
+ ```bash
251
+ pip install -e ".[dev]"
252
+ mkdocs serve
253
+ ```
254
+
255
+ Then visit http://localhost:8000
256
+
257
+ ---
258
+
259
+ ## Testing
260
+
261
+ ```bash
262
+ pip install -e ".[dev]"
263
+ pytest tests/ -v --cov=bulletlab --cov-report=term-missing
264
+ ```
265
+
266
+ ---
267
+
268
+ ## Technology Stack
269
+
270
+ | Component | Library |
271
+ |-----------|---------|
272
+ | Physics | PyBullet |
273
+ | UI | Dear ImGui (pyimgui) |
274
+ | Data | NumPy, Pandas |
275
+ | Config | PyYAML |
276
+ | Plotting | PyQtGraph |
277
+ | Testing | PyTest |
278
+ | Docs | MkDocs + mkdocstrings |
279
+
280
+ ---
281
+
282
+ ## License
283
+
284
+ MIT License — see [LICENSE](LICENSE) for details.
@@ -0,0 +1,75 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ setup.py
6
+ BulletLab.egg-info/PKG-INFO
7
+ BulletLab.egg-info/SOURCES.txt
8
+ BulletLab.egg-info/dependency_links.txt
9
+ BulletLab.egg-info/requires.txt
10
+ BulletLab.egg-info/top_level.txt
11
+ bulletlab/__init__.py
12
+ bulletlab/core/__init__.py
13
+ bulletlab/core/simulation.py
14
+ bulletlab/core/world.py
15
+ bulletlab/logging/__init__.py
16
+ bulletlab/logging/csv_writer.py
17
+ bulletlab/logging/json_writer.py
18
+ bulletlab/logging/logger.py
19
+ bulletlab/plotting/__init__.py
20
+ bulletlab/plotting/live_plot.py
21
+ bulletlab/robot/__init__.py
22
+ bulletlab/robot/joint.py
23
+ bulletlab/robot/link.py
24
+ bulletlab/robot/robot.py
25
+ bulletlab/telemetry/__init__.py
26
+ bulletlab/telemetry/channel.py
27
+ bulletlab/telemetry/manager.py
28
+ bulletlab/ui/__init__.py
29
+ bulletlab/ui/app.py
30
+ bulletlab/ui/widgets.py
31
+ bulletlab/ui/panels/__init__.py
32
+ bulletlab/ui/panels/console.py
33
+ bulletlab/ui/panels/explorer.py
34
+ bulletlab/ui/panels/plots.py
35
+ bulletlab/ui/panels/properties.py
36
+ bulletlab/ui/panels/telemetry.py
37
+ bulletlab/utils/__init__.py
38
+ bulletlab/utils/math_utils.py
39
+ bulletlab/utils/timer.py
40
+ bulletlab/utils/urdf_utils.py
41
+ docs/index.md
42
+ docs/quickstart.md
43
+ docs/api/joint.md
44
+ docs/api/link.md
45
+ docs/api/logging.md
46
+ docs/api/plotting.md
47
+ docs/api/robot.md
48
+ docs/api/simulation.md
49
+ docs/api/telemetry.md
50
+ docs/api/ui.md
51
+ docs/developer/architecture.md
52
+ docs/developer/developer_guide.md
53
+ docs/guides/example_guide.md
54
+ docs/guides/plotting_guide.md
55
+ docs/guides/rl_guide.md
56
+ docs/guides/robot_guide.md
57
+ docs/guides/telemetry_guide.md
58
+ docs/guides/ui_guide.md
59
+ examples/01_differential_drive_rover.py
60
+ examples/02_robotic_arm.py
61
+ examples/03_self_balancing_robot.py
62
+ examples/04_drone_parameter_tuning.py
63
+ examples/05_generic_robot_inspector.py
64
+ examples/06_irregular_terrain.py
65
+ examples/demo_ui_control.py
66
+ examples/assets/quadrotor.urdf
67
+ tests/test_joint.py
68
+ tests/test_link.py
69
+ tests/test_logging.py
70
+ tests/test_plotting.py
71
+ tests/test_robot.py
72
+ tests/test_simulation.py
73
+ tests/test_telemetry.py
74
+ tests/test_ui_panels.py
75
+ tests/test_utils.py
@@ -0,0 +1,15 @@
1
+ pybullet>=3.2.6
2
+ numpy>=1.24.0
3
+ pandas>=2.0.0
4
+ pyyaml>=6.0
5
+ imgui[glfw]>=2.0.0
6
+ pyqtgraph>=0.13.3
7
+ PyQt5>=5.15.0
8
+
9
+ [dev]
10
+ pytest>=7.4.0
11
+ pytest-cov>=4.1.0
12
+ pytest-mock>=3.11.0
13
+ mkdocs>=1.5.0
14
+ mkdocstrings[python]>=0.23.0
15
+ mkdocs-material>=9.4.0
@@ -0,0 +1 @@
1
+ bulletlab
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ranasurya Ghosh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ include README.md
2
+ include LICENSE
3
+ include pyproject.toml
4
+ recursive-include bulletlab *.py *.yaml *.yml *.urdf *.json
5
+ recursive-include docs *.md *.yaml *.yml *.png
6
+ recursive-include examples *.py *.urdf *.yaml
@@ -0,0 +1,284 @@
1
+ Metadata-Version: 2.4
2
+ Name: BulletLab
3
+ Version: 0.1.2
4
+ Summary: A high-level robotics simulation and experimentation framework built on PyBullet.
5
+ Home-page: https://github.com/NuclearVenom/BulletLab
6
+ Author: Ranasurya Ghosh
7
+ Author-email: Ranasurya Ghosh <ranasuryaghosh@gmail.com>
8
+ Maintainer-email: Ranasurya Ghosh <ranasuryaghosh@gmail.com>
9
+ License-Expression: MIT
10
+ Project-URL: Homepage, https://github.com/NuclearVenom/BulletLab
11
+ Project-URL: Documentation, https://nuclearvenom.bulletlab.docs
12
+ Project-URL: Repository, https://github.com/NuclearVenom/BulletLab
13
+ Project-URL: Issues, https://github.com/NuclearVenom/BulletLab/issues
14
+ Keywords: robotics,simulation,pybullet,reinforcement-learning,telemetry,imgui,physics,research,robot-control,robotics-framework
15
+ Classifier: Development Status :: 3 - Alpha
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Education
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Scientific/Engineering
25
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
26
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
+ Requires-Python: >=3.10
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: pybullet>=3.2.6
31
+ Requires-Dist: numpy>=1.24.0
32
+ Requires-Dist: pandas>=2.0.0
33
+ Requires-Dist: pyyaml>=6.0
34
+ Requires-Dist: imgui[glfw]>=2.0.0
35
+ Requires-Dist: pyqtgraph>=0.13.3
36
+ Requires-Dist: PyQt5>=5.15.0
37
+ Provides-Extra: dev
38
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
39
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
40
+ Requires-Dist: pytest-mock>=3.11.0; extra == "dev"
41
+ Requires-Dist: mkdocs>=1.5.0; extra == "dev"
42
+ Requires-Dist: mkdocstrings[python]>=0.23.0; extra == "dev"
43
+ Requires-Dist: mkdocs-material>=9.4.0; extra == "dev"
44
+ Dynamic: author
45
+ Dynamic: home-page
46
+ Dynamic: license-file
47
+
48
+ <h1>
49
+ <img src="https://raw.githubusercontent.com/NuclearVenom/BulletLab/main/assets/logo.png" width="40" align="center" alt="[logo]">
50
+ BulletLab
51
+ </h1>
52
+
53
+ Developed by [Ranasurya Ghosh](https://github.com/NuclearVenom)
54
+
55
+
56
+ >**A robotics experimentation framework that transforms PyBullet robots into intuitive Python objects, with modern ImGui-based controls, telemetry, visualization, and reinforcement learning workflows.**
57
+
58
+ [![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/)
59
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
60
+
61
+ **Install BulletLab library:** `pip install bulletlab`<br><br>
62
+ [Read Documentation](https://nuclearvenom.github.io/BulletLab/)
63
+ <br><br>
64
+
65
+ ![BulletLab example UI](https://raw.githubusercontent.com/NuclearVenom/BulletLab/main/assets/bulletlab_ui.png)
66
+
67
+ ---
68
+
69
+ ## What is BulletLab?
70
+
71
+ BulletLab provides a high-level object-oriented interface to [PyBullet](https://pybullet.org/wordpress/) that simplifies robotics experimentation by exposing joints, links, sensors, and environments as intuitive Python objects instead of raw physics engine IDs. It combines real-time simulation with a [ImGui](https://www.dearimgui.com/)-powered modern interface for interactive control, parameter tuning, telemetry visualization, and experiment management, while also offering reinforcement learning integration for training and evaluating autonomous robotic systems within a unified workflow.
72
+
73
+ **Instead of this:**
74
+ ```python
75
+ p.setJointMotorControl2(
76
+ robot_id, joint_index,
77
+ controlMode=p.VELOCITY_CONTROL,
78
+ targetVelocity=15,
79
+ force=100
80
+ )
81
+ ```
82
+
83
+ **You write this:**
84
+ ```python
85
+ robot.joints["motor"].velocity = 15
86
+ ```
87
+
88
+ ---
89
+
90
+ ## Architecture
91
+
92
+ BulletLab uses a **two-window architecture**:
93
+
94
+ | Window | Purpose |
95
+ |--------|---------|
96
+ | PyBullet Native Window | Physics simulation, 3D rendering, camera |
97
+ | BulletLab ImGui Window | Control panels, telemetry, live plots, console |
98
+
99
+ These windows communicate through Python objects. BulletLab does **not** attempt to replace PyBullet's renderer or embed ImGui inside the simulation viewport.
100
+
101
+ ---
102
+
103
+ ## Quick Start
104
+
105
+ ### Installation
106
+
107
+ ```bash
108
+ pip install bulletlab
109
+ # or from source:
110
+ pip install -e .
111
+ ```
112
+
113
+ ### Basic Example
114
+
115
+ ```python
116
+ from bulletlab import Simulation, Robot
117
+ from bulletlab.ui import BulletLabUI
118
+
119
+ # Create simulation
120
+ sim = Simulation()
121
+ sim.start()
122
+
123
+ # Load robot
124
+ robot = Robot.load("path/to/robot.urdf", sim=sim)
125
+
126
+ # Control joints by name
127
+ robot.joints["wheel_left"].velocity = 10
128
+ robot.joints["wheel_right"].velocity = 10
129
+
130
+ # Modify physics parameters
131
+ robot.links["chassis"].mass = 5.0
132
+ robot.links["wheel_fl"].friction = 1.2
133
+
134
+ # Get robot state
135
+ state = robot.get_state()
136
+ print(f"Position: {robot.base_position}")
137
+ print(f"Roll: {robot.roll:.2f}°")
138
+
139
+ # Build UI
140
+ ui = BulletLabUI(sim=sim)
141
+ ui.register_panel(...)
142
+ ui.run()
143
+ ```
144
+
145
+ ### Telemetry & Logging
146
+
147
+ ```python
148
+ from bulletlab.telemetry import TelemetryManager
149
+ from bulletlab.logging import DataLogger
150
+
151
+ telemetry = TelemetryManager()
152
+ telemetry.watch("Speed", lambda: robot.base_velocity[0])
153
+ telemetry.watch("Roll", lambda: robot.roll)
154
+
155
+ logger = DataLogger()
156
+ logger.watch("speed", lambda: robot.base_velocity[0])
157
+ logger.start("run1.csv")
158
+
159
+ for _ in range(1000):
160
+ sim.step()
161
+ telemetry.update()
162
+ logger.step()
163
+
164
+ logger.stop()
165
+ ```
166
+
167
+ ### Live Plotting
168
+
169
+ ```python
170
+ from bulletlab.plotting import LivePlot
171
+
172
+ plot = LivePlot(title="Robot Speed")
173
+ plot.watch("Speed", lambda: robot.base_velocity[0], color="#00ff88")
174
+ plot.start()
175
+
176
+ for _ in range(1000):
177
+ sim.step()
178
+ plot.update()
179
+ ```
180
+
181
+ ### ImGui Control Panel
182
+
183
+ ```python
184
+ from bulletlab.ui import BulletLabUI
185
+ from bulletlab.ui import widgets as ui
186
+
187
+ app = BulletLabUI(sim=sim, robots=[robot])
188
+
189
+ @app.custom_panel("My Controls")
190
+ def my_panel():
191
+ ui.button("Reset", robot.reset)
192
+ ui.slider("Wheel Mass", robot.links["wheel"].mass, 0.1, 20,
193
+ setter=lambda v: setattr(robot.links["wheel"], "mass", v))
194
+ ui.checkbox("Motors Enabled", lambda: motors_on,
195
+ setter=lambda v: toggle_motors(v))
196
+
197
+ app.run()
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Supported Robot Types
203
+
204
+ BulletLab is completely generic — no code assumes a specific robot type:
205
+
206
+ - Cars & rovers
207
+ - Drones & quadrotors
208
+ - Robotic arms
209
+ - Self-balancing robots
210
+ - Quadrupeds
211
+ - Humanoids
212
+ - Custom mechanisms
213
+
214
+ ---
215
+
216
+ ## Reinforcement Learning
217
+
218
+ BulletLab exposes clean state/action interfaces without depending on any ML framework:
219
+
220
+ ```python
221
+ # Compatible with any RL approach
222
+ state = robot.get_state() # → numpy array
223
+ action = my_policy(state) # → numpy array
224
+ robot.apply_action(action) # → updates joints
225
+
226
+ # Manual Q-learning, SARSA, evolutionary algorithms — all supported
227
+ ```
228
+
229
+ ---
230
+
231
+ ## Examples
232
+
233
+ | Example | Description |
234
+ |---------|-------------|
235
+ | `examples/01_differential_drive_rover.py` | Rover with wheel velocity control |
236
+ | `examples/02_robotic_arm.py` | Joint position control with ImGui sliders |
237
+ | `examples/03_self_balancing_robot.py` | PD controller for balance |
238
+ | `examples/04_drone_parameter_tuning.py` | Thrust/mass parameter exploration |
239
+ | `examples/05_generic_robot_inspector.py` | Load any URDF and inspect it |
240
+
241
+ Run any example:
242
+ ```bash
243
+ python examples/01_differential_drive_rover.py
244
+ ```
245
+
246
+ ---
247
+
248
+ ## Documentation
249
+
250
+ ```bash
251
+ pip install -e ".[dev]"
252
+ mkdocs serve
253
+ ```
254
+
255
+ Then visit http://localhost:8000
256
+
257
+ ---
258
+
259
+ ## Testing
260
+
261
+ ```bash
262
+ pip install -e ".[dev]"
263
+ pytest tests/ -v --cov=bulletlab --cov-report=term-missing
264
+ ```
265
+
266
+ ---
267
+
268
+ ## Technology Stack
269
+
270
+ | Component | Library |
271
+ |-----------|---------|
272
+ | Physics | PyBullet |
273
+ | UI | Dear ImGui (pyimgui) |
274
+ | Data | NumPy, Pandas |
275
+ | Config | PyYAML |
276
+ | Plotting | PyQtGraph |
277
+ | Testing | PyTest |
278
+ | Docs | MkDocs + mkdocstrings |
279
+
280
+ ---
281
+
282
+ ## License
283
+
284
+ MIT License — see [LICENSE](LICENSE) for details.