chromapi 1.0.0__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.
- chromapi-1.0.0/LICENSE +201 -0
- chromapi-1.0.0/MANIFEST.in +1 -0
- chromapi-1.0.0/PKG-INFO +222 -0
- chromapi-1.0.0/README.md +172 -0
- chromapi-1.0.0/pyproject.toml +129 -0
- chromapi-1.0.0/setup.cfg +4 -0
- chromapi-1.0.0/src/chromapi/__init__.py +2 -0
- chromapi-1.0.0/src/chromapi/__main__.py +6 -0
- chromapi-1.0.0/src/chromapi/assets/audio/alert.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/chromapi_scream.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/confused.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/dizzy.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/excited.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/greeting.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/happy.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/no.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/purring.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/sad.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/scared.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/sleepy.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/squeak.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/surprised.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/thinking.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/upset.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/audio/yes.wav +0 -0
- chromapi-1.0.0/src/chromapi/assets/favicon.ico +0 -0
- chromapi-1.0.0/src/chromapi/assets/firmware/chromapi_stm32_core_v2.0.0.hex +2222 -0
- chromapi-1.0.0/src/chromapi/assets/firmware/flash.sh +88 -0
- chromapi-1.0.0/src/chromapi/assets/moves/README.md +48 -0
- chromapi-1.0.0/src/chromapi/assets/moves/angry.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/confused.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/dizzy.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/excited.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/greeting.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/happy.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/joy.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/kick.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/metadata.jsonl +15 -0
- chromapi-1.0.0/src/chromapi/assets/moves/no.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/purring.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/sad.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/scared.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/surprised.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/tired.json +1 -0
- chromapi-1.0.0/src/chromapi/assets/moves/yes.json +1 -0
- chromapi-1.0.0/src/chromapi/chromapi.py +1460 -0
- chromapi-1.0.0/src/chromapi/cli.py +106 -0
- chromapi-1.0.0/src/chromapi/config/config.yaml +118 -0
- chromapi-1.0.0/src/chromapi/estimation/__init__.py +6 -0
- chromapi-1.0.0/src/chromapi/estimation/attitude.py +107 -0
- chromapi-1.0.0/src/chromapi/hardware/__init__.py +2 -0
- chromapi-1.0.0/src/chromapi/hardware/battery.py +54 -0
- chromapi-1.0.0/src/chromapi/hardware/fan.py +165 -0
- chromapi-1.0.0/src/chromapi/hardware/motherboard_bridge.py +345 -0
- chromapi-1.0.0/src/chromapi/input/__init__.py +2 -0
- chromapi-1.0.0/src/chromapi/input/gamepad.py +379 -0
- chromapi-1.0.0/src/chromapi/input/pairing.py +98 -0
- chromapi-1.0.0/src/chromapi/kinematics/__init__.py +10 -0
- chromapi-1.0.0/src/chromapi/kinematics/kromatics.py +324 -0
- chromapi-1.0.0/src/chromapi/kinematics/poses.py +29 -0
- chromapi-1.0.0/src/chromapi/kinematics/topology.py +26 -0
- chromapi-1.0.0/src/chromapi/kinematics/types.py +21 -0
- chromapi-1.0.0/src/chromapi/locomotion/__init__.py +7 -0
- chromapi-1.0.0/src/chromapi/locomotion/balance.py +284 -0
- chromapi-1.0.0/src/chromapi/locomotion/gait.py +595 -0
- chromapi-1.0.0/src/chromapi/locomotion/recorded_move.py +290 -0
- chromapi-1.0.0/src/chromapi/media/__init__.py +2 -0
- chromapi-1.0.0/src/chromapi/media/audio.py +424 -0
- chromapi-1.0.0/src/chromapi/media/led.py +461 -0
- chromapi-1.0.0/src/chromapi/model/LICENSE +438 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/additional.xml +21 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/18650_li_ion_battery.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/18650_li_ion_battery.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/battery_holder.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/battery_holder.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/camera_imx219_d160.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/camera_imx219_d160.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/chromapi_logo.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/chromapi_logo.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/chromapi_logo_circle.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/chromapi_logo_inner.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/chromapi_logo_outer.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/chromapi_motherboard.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/chromapi_motherboard.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/composant2_1__corps1.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/composant2_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/composant3_1__corps1.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/composant3_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/composant4_1__corps1.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/composant4_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/connector_f_1__corps1.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/connector_f_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/connector_f_1__corps1_1.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/connector_f_1__corps1_1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/corps14.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/corps14.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/fan_nf_a4x10.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/fan_nf_a4x10.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/foot.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/foot.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/left_coxa.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/left_coxa.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/left_femur.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/left_femur.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/left_tibia.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/left_tibia.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/microswitch.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/microswitch.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/power_switch.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/power_switch.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/raspberry_pi_4_model_b.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/raspberry_pi_4_model_b.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/right_coxa.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/right_coxa.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/right_femur.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/right_femur.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/right_tibia.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/right_tibia.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/robot_case_bottom.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/robot_case_bottom.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/robot_case_top.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/robot_case_top.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/rpi_battery_bracket.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/rpi_battery_bracket.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/speaker.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/speaker.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/vis_1__corps1.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/vis_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/vis_1__corps1_1.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/vis_1__corps1_1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/vis_a_tete_tronconique_jis_b_1111_m3x4_h_acier_inoxydable_a2_standard_v1_1__corps1.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/vis_a_tete_tronconique_jis_b_1111_m3x4_h_acier_inoxydable_a2_standard_v1_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/ws2812b_cob_pixel_ring_27mm.msh +0 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/assets/ws2812b_cob_pixel_ring_27mm.part +13 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/config.json +14 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/robot.xml +639 -0
- chromapi-1.0.0/src/chromapi/model/mjcf/scene.xml +24 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/18650_li_ion_battery.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/18650_li_ion_battery.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/battery_holder.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/battery_holder.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/camera_imx219_d160.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/camera_imx219_d160.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/chromapi_logo.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/chromapi_logo.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/chromapi_logo_circle.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/chromapi_logo_inner.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/chromapi_logo_outer.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/chromapi_motherboard.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/chromapi_motherboard.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/composant2_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/composant2_1__corps1.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/composant3_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/composant3_1__corps1.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/composant4_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/composant4_1__corps1.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/connector_f_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/connector_f_1__corps1.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/connector_f_1__corps1_1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/connector_f_1__corps1_1.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/corps14.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/corps14.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/fan_nf_a4x10.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/fan_nf_a4x10.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/foot.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/foot.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/left_coxa.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/left_coxa.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/left_femur.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/left_femur.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/left_tibia.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/left_tibia.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/microswitch.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/microswitch.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/power_switch.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/power_switch.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/raspberry_pi_4_model_b.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/raspberry_pi_4_model_b.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/right_coxa.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/right_coxa.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/right_femur.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/right_femur.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/right_tibia.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/right_tibia.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/robot_case_bottom.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/robot_case_bottom.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/robot_case_top.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/robot_case_top.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/rpi_battery_bracket.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/rpi_battery_bracket.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/speaker.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/speaker.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/vis_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/vis_1__corps1.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/vis_1__corps1_1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/vis_1__corps1_1.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/vis_a_tete_tronconique_jis_b_1111_m3x4_h_acier_inoxydable_a2_standard_v1_1__corps1.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/vis_a_tete_tronconique_jis_b_1111_m3x4_h_acier_inoxydable_a2_standard_v1_1__corps1.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/ws2812b_cob_pixel_ring_27mm.part +13 -0
- chromapi-1.0.0/src/chromapi/model/urdf/assets/ws2812b_cob_pixel_ring_27mm.stl +0 -0
- chromapi-1.0.0/src/chromapi/model/urdf/config.json +8 -0
- chromapi-1.0.0/src/chromapi/model/urdf/robot.urdf +2587 -0
- chromapi-1.0.0/src/chromapi/utils/calibrate_imu_mount.py +80 -0
- chromapi-1.0.0/src/chromapi/utils/calibrate_servo_centers.py +432 -0
- chromapi-1.0.0/src/chromapi/utils/flash.py +141 -0
- chromapi-1.0.0/src/chromapi/utils/health.py +210 -0
- chromapi-1.0.0/src/chromapi/utils/report.py +75 -0
- chromapi-1.0.0/src/chromapi/utils/setup_motors.py +189 -0
- chromapi-1.0.0/src/chromapi/utils/sim_server.py +126 -0
- chromapi-1.0.0/src/chromapi/web/__init__.py +2 -0
- chromapi-1.0.0/src/chromapi/web/access.py +167 -0
- chromapi-1.0.0/src/chromapi/web/app.py +1136 -0
- chromapi-1.0.0/src/chromapi/web/camera.py +202 -0
- chromapi-1.0.0/src/chromapi/web/static/fonts/varela-round.woff2 +0 -0
- chromapi-1.0.0/src/chromapi/web/static/index.html +1079 -0
- chromapi-1.0.0/src/chromapi/web/static/logo.png +0 -0
- chromapi-1.0.0/src/chromapi/web/static/motherboard_front.png +0 -0
- chromapi-1.0.0/src/chromapi/web/static/socket.io.min.js +7 -0
- chromapi-1.0.0/src/chromapi.egg-info/PKG-INFO +222 -0
- chromapi-1.0.0/src/chromapi.egg-info/SOURCES.txt +222 -0
- chromapi-1.0.0/src/chromapi.egg-info/dependency_links.txt +1 -0
- chromapi-1.0.0/src/chromapi.egg-info/entry_points.txt +2 -0
- chromapi-1.0.0/src/chromapi.egg-info/requires.txt +27 -0
- chromapi-1.0.0/src/chromapi.egg-info/top_level.txt +1 -0
chromapi-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
global-exclude __pycache__ *.py[cod]
|
chromapi-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chromapi
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: High-level software for the Chromapi 12-DOF quadruped robot
|
|
5
|
+
Author-email: Mowibox <ousmane.thiongane@outlook.com>
|
|
6
|
+
License-Expression: Apache-2.0 AND CC-BY-NC-SA-4.0
|
|
7
|
+
Project-URL: Homepage, https://mowibox.github.io/chroma/en/chromapi/
|
|
8
|
+
Project-URL: Documentation, https://mowibox.github.io/chroma/en/chromapi/
|
|
9
|
+
Project-URL: Source, https://github.com/Mowibox/chromapi
|
|
10
|
+
Project-URL: Issues, https://github.com/Mowibox/chromapi/issues
|
|
11
|
+
Project-URL: Firmware, https://github.com/Mowibox/chromapi_motherboard
|
|
12
|
+
Project-URL: Discord, https://discord.gg/SUQTs6QV3M
|
|
13
|
+
Keywords: robotics,quadruped,robot,raspberry-pi,mujoco,sdk
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Education
|
|
17
|
+
Classifier: Intended Audience :: Science/Research
|
|
18
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Requires-Python: >=3.12
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
License-File: src/chromapi/model/LICENSE
|
|
27
|
+
Requires-Dist: numpy>=2.2.5
|
|
28
|
+
Requires-Dist: pyserial>=3.5
|
|
29
|
+
Requires-Dist: scipy<2.0.0,>=1.15.3
|
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
|
31
|
+
Requires-Dist: opencv-contrib-python-headless>=4.13.0.92
|
|
32
|
+
Requires-Dist: waitress>=3.0.2
|
|
33
|
+
Requires-Dist: flask>=3.1.3
|
|
34
|
+
Requires-Dist: flask-socketio>=5.3.0
|
|
35
|
+
Requires-Dist: placo<1.0,>=0.9.25
|
|
36
|
+
Provides-Extra: audio
|
|
37
|
+
Requires-Dist: sounddevice>=0.4; extra == "audio"
|
|
38
|
+
Provides-Extra: sim
|
|
39
|
+
Requires-Dist: mujoco>=3.0; extra == "sim"
|
|
40
|
+
Provides-Extra: rl
|
|
41
|
+
Requires-Dist: onnxruntime>=1.16; extra == "rl"
|
|
42
|
+
Provides-Extra: hub
|
|
43
|
+
Requires-Dist: huggingface_hub>=0.25; extra == "hub"
|
|
44
|
+
Provides-Extra: all
|
|
45
|
+
Requires-Dist: chromapi[audio]; extra == "all"
|
|
46
|
+
Requires-Dist: chromapi[sim]; extra == "all"
|
|
47
|
+
Requires-Dist: chromapi[rl]; extra == "all"
|
|
48
|
+
Requires-Dist: chromapi[hub]; extra == "all"
|
|
49
|
+
Dynamic: license-file
|
|
50
|
+
|
|
51
|
+
<p align="center">
|
|
52
|
+
<img alt="Chromapi logo" src="https://media.githubusercontent.com/media/Mowibox/chromapi/main/assets/chromapi_logo.png" width="220">
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
<h1 align="center">Chromapi</h1>
|
|
56
|
+
|
|
57
|
+
<p align="center">
|
|
58
|
+
<em>An open-source 12-DoF quadruped robot that I design and build on my own.</em>
|
|
59
|
+
</p>
|
|
60
|
+
|
|
61
|
+
<p align="center">
|
|
62
|
+
<a href="https://mowibox.github.io/chroma/en/chromapi/">Documentation</a> ·
|
|
63
|
+
<a href="https://github.com/Mowibox/chromapi/tree/main/examples">Examples</a> ·
|
|
64
|
+
<a href="https://discord.gg/SUQTs6QV3M">Discord</a> ·
|
|
65
|
+
<a href="#contributions">Contributing</a>
|
|
66
|
+
</p>
|
|
67
|
+
|
|
68
|
+
<p align="center">
|
|
69
|
+
<img alt="Chromapi software" src="https://custom-icon-badges.demolab.com/badge/Chromapi-software-a957f9?logo=chromapi">
|
|
70
|
+
<img alt="Python 3.12+" src="https://img.shields.io/badge/Python-3.12+-blue?logo=python">
|
|
71
|
+
<a href="https://github.com/Mowibox/chromapi/actions/workflows/lint.yml"><img alt="CI: Linters" src="https://github.com/Mowibox/chromapi/actions/workflows/lint.yml/badge.svg"></a>
|
|
72
|
+
<a href="https://github.com/Mowibox/chromapi/actions/workflows/pytest.yml"><img alt="CI: Unit Tests" src="https://github.com/Mowibox/chromapi/actions/workflows/pytest.yml/badge.svg"></a>
|
|
73
|
+
<img alt="Issues" src="https://img.shields.io/github/issues/Mowibox/chromapi">
|
|
74
|
+
<img alt="Stars" src="https://img.shields.io/github/stars/Mowibox/chromapi?style=social">
|
|
75
|
+
</p>
|
|
76
|
+
|
|
77
|
+
<p align="center">
|
|
78
|
+
<img alt="Chromapi dancing" src="https://media.githubusercontent.com/media/Mowibox/chromapi/main/assets/chromapi.gif"/>
|
|
79
|
+
</p>
|
|
80
|
+
|
|
81
|
+
## Getting started
|
|
82
|
+
|
|
83
|
+
Three ways in, each detailed on the [Chroma website](https://mowibox.github.io/chroma/en/chromapi/):
|
|
84
|
+
|
|
85
|
+
* **Build the robot:** print the parts and order the components from the [Bill of Materials](https://mowibox.github.io/chroma/en/chromapi/build/robot-bom/), then follow the [build guide](https://mowibox.github.io/chroma/en/chromapi/build/).
|
|
86
|
+
* **Set up a robot you have built:** flash the Chromapi OS image on a microSD card with Raspberry Pi Imager ([installation](https://mowibox.github.io/chroma/en/chromapi/getting-started/installation/)), then follow the [first start steps](https://mowibox.github.io/chroma/en/chromapi/getting-started/first-start/) and drive it from your phone with the [web app](https://mowibox.github.io/chroma/en/chromapi/getting-started/web-app/).
|
|
87
|
+
* **Program it, with or without a robot:** install the SDK below and start in [simulation](https://mowibox.github.io/chroma/en/chromapi/developing/simulation/).
|
|
88
|
+
|
|
89
|
+
### Installation
|
|
90
|
+
|
|
91
|
+
Requires Python 3.12 or later.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pip install "chromapi[all]" # or, in a uv project: uv add "chromapi[all]"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Extras: `audio` enables sounds on the robot, `sim` installs MuJoCo for simulation, `rl` installs ONNX Runtime to run trained policies *(coming soon!)*, and `hub` downloads moves from Hugging Face datasets.
|
|
98
|
+
|
|
99
|
+
To contribute or run the examples, install from source instead:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
git clone https://github.com/Mowibox/chromapi
|
|
103
|
+
cd chromapi
|
|
104
|
+
uv sync --all-extras # or: pip install -e ".[all]"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### In simulation
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from chromapi.chromapi import Chromapi
|
|
111
|
+
|
|
112
|
+
with Chromapi(backend="mujoco", launch_viewer=True) as robot:
|
|
113
|
+
robot.wake_up(wait=True)
|
|
114
|
+
robot.walk_distance(0.3) # [m]
|
|
115
|
+
robot.rest()
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
More demos are in [`examples/`](https://github.com/Mowibox/chromapi/tree/main/examples). Each example runs on the robot, or in MuJoCo with `--sim`.
|
|
119
|
+
|
|
120
|
+
To keep a Chromapi simulation open between runs of your script, start the simulation window on its own, then use `backend="sim-server"`:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
chromapi sim # In a terminal: launches the simulation and its window (--headless: no window)
|
|
124
|
+
python my_script.py # In another terminal: Chromapi(backend="sim-server")
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### On the real robot
|
|
128
|
+
|
|
129
|
+
On the Raspberry Pi, once the [motherboard firmware](https://github.com/Mowibox/chromapi_motherboard) is flashed:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
chromapi motors setup # interactive: set each servo's ID, one servo at a time
|
|
133
|
+
chromapi calibrate servos --all # find each servo's center from its mechanical stops (lift the robot first)
|
|
134
|
+
chromapi calibrate imu # measure the IMU board tilt, robot still on a level floor
|
|
135
|
+
chromapi health # what is wrong with the robot, and what to do about it
|
|
136
|
+
chromapi version # SDK, firmware and bridge protocol versions
|
|
137
|
+
chromapi flash # update the motherboard firmware (lay the robot down first)
|
|
138
|
+
chromapi report # support report to attach to a message on Discord
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
`chromapi --help` lists every command (`python -m chromapi` works too).
|
|
142
|
+
|
|
143
|
+
`chromapi run` starts the robot and its web app, at `https://<robot-name>.local:5000` (or `https://<robot-ip>:5000`) from a phone or a PC on the same network.
|
|
144
|
+
|
|
145
|
+
The same code then runs on the robot with `Chromapi(backend="hardware")`, which talks to the motherboard over UART.
|
|
146
|
+
|
|
147
|
+
## Project overview
|
|
148
|
+
|
|
149
|
+
| Resource | Description | Location | Status |
|
|
150
|
+
| :--- | :--- | :--- | :--- |
|
|
151
|
+
| **📋 Bill of Materials** | Complete hardware, electronics, and 3D-printed parts list to build Chromapi from scratch. | [Chroma Website](https://mowibox.github.io/chroma/en/chromapi/build/robot-bom/) | **Available** |
|
|
152
|
+
| **💻 Software API** | Python control framework, hardware interfaces, and kinematic solvers. | [`/src/chromapi`](https://github.com/Mowibox/chromapi/tree/main/src/chromapi) | **v1 Available** |
|
|
153
|
+
| **📐 CAD Model** | 3D mechanical design and robot assembly workspace. | [Onshape Document](https://cad.onshape.com/documents/3b2f6609101a115f427bb3a2/w/dda5699ddfe216cfbe74c22b/e/50bb405a7750d04ab1c412db?renderMode=0&uiState=6a7266a5caff22fc791d5f8b) | **Available** |
|
|
154
|
+
| **📖 Documentation** | Getting started, build guide, SDK tutorials, hardware specifications and communication protocol. | [Chroma Website](https://mowibox.github.io/chroma/en/chromapi/) | **Available** |
|
|
155
|
+
| **🛠️ Hardware Utilities** | `chromapi` command: health check, servo setup and calibration tools. | [`/src/chromapi/utils`](https://github.com/Mowibox/chromapi/tree/main/src/chromapi/utils) | **Available** |
|
|
156
|
+
| **🤖 Simulation Models** | URDF and MJCF models for MuJoCo simulation. | [`/src/chromapi/model`](https://github.com/Mowibox/chromapi/tree/main/src/chromapi/model) | **Available** |
|
|
157
|
+
| **⚡ Electronics** | Custom PCB files, schematics, and low-level firmware. | [`chromapi_motherboard` repository](https://github.com/Mowibox/chromapi_motherboard) | **Available** |
|
|
158
|
+
|
|
159
|
+
## Authors
|
|
160
|
+
|
|
161
|
+
| |
|
|
162
|
+
| :---: |
|
|
163
|
+
| <img src="https://github.com/Mowibox.png" width="100"> |
|
|
164
|
+
| [**Ousmane THIONGANE**](https://mowibox.github.io) |
|
|
165
|
+
|
|
166
|
+
## Sponsors & Acknowledgements
|
|
167
|
+
|
|
168
|
+
This project has been made possible thanks to the sponsors listed below. Their contributions in manufacturing, assembly, and prototyping have greatly accelerated the development of Chromapi.
|
|
169
|
+
|
|
170
|
+
<div align="center">
|
|
171
|
+
|
|
172
|
+
| | |
|
|
173
|
+
| :---: | :---: |
|
|
174
|
+
| <a href="https://www.pcbway.com"><img src="https://media.githubusercontent.com/media/Mowibox/chromapi/main/assets/pcbway.jpg" width="150" alt="PCBWay"></a> | <a href="https://www.ensea.fr"><img src="https://media.githubusercontent.com/media/Mowibox/chromapi/main/assets/ensea.jpg" width="150" alt="ENSEA"></a> |
|
|
175
|
+
| [**PCBWay**](https://www.pcbway.com) | [**ENSEA**](https://www.ensea.fr) |
|
|
176
|
+
| PCB Manufacturing & Assembly | 3D Printing & Prototyping |
|
|
177
|
+
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
> Huge thanks to everyone who gave me feedback on Chromapi's design, shared ideas, or simply took the time to brainstorm with me. This project wouldn't be where it is today without your help!
|
|
183
|
+
|
|
184
|
+
## Contributions
|
|
185
|
+
|
|
186
|
+
Contributions are always welcome!
|
|
187
|
+
|
|
188
|
+
* **Report Issues:** Found an error or have a feature request? Create a new issue [here](https://github.com/Mowibox/chromapi/issues/new/choose).
|
|
189
|
+
* **Fix Bugs & Add Features:** Find out where you can lend a hand by checking out [existing issues](https://github.com/Mowibox/chromapi/issues).
|
|
190
|
+
|
|
191
|
+
Before opening a pull request, don't forget to run the linters and unit tests: `uv run ruff check . && uv run mypy && uv run pytest`.
|
|
192
|
+
|
|
193
|
+
_By submitting a contribution, you agree that it is published under the license of the part it belongs to._
|
|
194
|
+
|
|
195
|
+
## Citation
|
|
196
|
+
|
|
197
|
+
If you use Chromapi in your research, please cite it as below:
|
|
198
|
+
|
|
199
|
+
```bibtex
|
|
200
|
+
@software{othiongane_chromapi,
|
|
201
|
+
author = {Thiongane, Ousmane},
|
|
202
|
+
title = {Chromapi: an open-source 12-DoF quadruped robot},
|
|
203
|
+
month = nov,
|
|
204
|
+
year = {2026},
|
|
205
|
+
version = {1.0.0},
|
|
206
|
+
url = {https://github.com/Mowibox/chromapi}
|
|
207
|
+
howpublished = "\url{https://github.com/Mowibox/chromapi}",
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## License
|
|
212
|
+
|
|
213
|
+
This repository is multi-licensed:
|
|
214
|
+
|
|
215
|
+
| Part | Path | License |
|
|
216
|
+
| :--- | :--- | :--- |
|
|
217
|
+
| Software (Python SDK, tools, tests, Raspberry Pi setup) | [`/src`](https://github.com/Mowibox/chromapi/tree/main/src), [`/tests`](https://github.com/Mowibox/chromapi/tree/main/tests), [`/deploy`](https://github.com/Mowibox/chromapi/tree/main/deploy) | [Apache 2.0](https://github.com/Mowibox/chromapi/blob/main/LICENSE) |
|
|
218
|
+
| Robot description (URDF, MJCF, configuration files) | [`/src/chromapi/model`](https://github.com/Mowibox/chromapi/tree/main/src/chromapi/model) | [Apache 2.0](https://github.com/Mowibox/chromapi/blob/main/LICENSE) |
|
|
219
|
+
| 3D meshes (`.stl`, `.part`) | [`/src/chromapi/model/*/assets`](https://github.com/Mowibox/chromapi/tree/main/src/chromapi/model) | [CC BY-NC-SA 4.0](https://github.com/Mowibox/chromapi/blob/main/src/chromapi/model/LICENSE) |
|
|
220
|
+
| Documentation and media (README, images, GIFs) | [`/assets`](https://github.com/Mowibox/chromapi/tree/main/assets), this README | [CC BY-NC-SA 4.0](https://github.com/Mowibox/chromapi/blob/main/src/chromapi/model/LICENSE) |
|
|
221
|
+
|
|
222
|
+
**Third-party content keeps its own license:** meshes of off-the-shelf parts (Raspberry Pi 4, IMX219 camera, Noctua NF-A4x10 fan, WS2812B ring, 18650 battery, speaker, microswitch, power switch, connectors, screws) come from their respective manufacturers. The ENSEA and PCBWay logos in [`/assets`](https://github.com/Mowibox/chromapi/tree/main/assets) are trademarks of their respective owners.
|
chromapi-1.0.0/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img alt="Chromapi logo" src="https://media.githubusercontent.com/media/Mowibox/chromapi/main/assets/chromapi_logo.png" width="220">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Chromapi</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<em>An open-source 12-DoF quadruped robot that I design and build on my own.</em>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://mowibox.github.io/chroma/en/chromapi/">Documentation</a> ·
|
|
13
|
+
<a href="https://github.com/Mowibox/chromapi/tree/main/examples">Examples</a> ·
|
|
14
|
+
<a href="https://discord.gg/SUQTs6QV3M">Discord</a> ·
|
|
15
|
+
<a href="#contributions">Contributing</a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<img alt="Chromapi software" src="https://custom-icon-badges.demolab.com/badge/Chromapi-software-a957f9?logo=chromapi">
|
|
20
|
+
<img alt="Python 3.12+" src="https://img.shields.io/badge/Python-3.12+-blue?logo=python">
|
|
21
|
+
<a href="https://github.com/Mowibox/chromapi/actions/workflows/lint.yml"><img alt="CI: Linters" src="https://github.com/Mowibox/chromapi/actions/workflows/lint.yml/badge.svg"></a>
|
|
22
|
+
<a href="https://github.com/Mowibox/chromapi/actions/workflows/pytest.yml"><img alt="CI: Unit Tests" src="https://github.com/Mowibox/chromapi/actions/workflows/pytest.yml/badge.svg"></a>
|
|
23
|
+
<img alt="Issues" src="https://img.shields.io/github/issues/Mowibox/chromapi">
|
|
24
|
+
<img alt="Stars" src="https://img.shields.io/github/stars/Mowibox/chromapi?style=social">
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<img alt="Chromapi dancing" src="https://media.githubusercontent.com/media/Mowibox/chromapi/main/assets/chromapi.gif"/>
|
|
29
|
+
</p>
|
|
30
|
+
|
|
31
|
+
## Getting started
|
|
32
|
+
|
|
33
|
+
Three ways in, each detailed on the [Chroma website](https://mowibox.github.io/chroma/en/chromapi/):
|
|
34
|
+
|
|
35
|
+
* **Build the robot:** print the parts and order the components from the [Bill of Materials](https://mowibox.github.io/chroma/en/chromapi/build/robot-bom/), then follow the [build guide](https://mowibox.github.io/chroma/en/chromapi/build/).
|
|
36
|
+
* **Set up a robot you have built:** flash the Chromapi OS image on a microSD card with Raspberry Pi Imager ([installation](https://mowibox.github.io/chroma/en/chromapi/getting-started/installation/)), then follow the [first start steps](https://mowibox.github.io/chroma/en/chromapi/getting-started/first-start/) and drive it from your phone with the [web app](https://mowibox.github.io/chroma/en/chromapi/getting-started/web-app/).
|
|
37
|
+
* **Program it, with or without a robot:** install the SDK below and start in [simulation](https://mowibox.github.io/chroma/en/chromapi/developing/simulation/).
|
|
38
|
+
|
|
39
|
+
### Installation
|
|
40
|
+
|
|
41
|
+
Requires Python 3.12 or later.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install "chromapi[all]" # or, in a uv project: uv add "chromapi[all]"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Extras: `audio` enables sounds on the robot, `sim` installs MuJoCo for simulation, `rl` installs ONNX Runtime to run trained policies *(coming soon!)*, and `hub` downloads moves from Hugging Face datasets.
|
|
48
|
+
|
|
49
|
+
To contribute or run the examples, install from source instead:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git clone https://github.com/Mowibox/chromapi
|
|
53
|
+
cd chromapi
|
|
54
|
+
uv sync --all-extras # or: pip install -e ".[all]"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### In simulation
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from chromapi.chromapi import Chromapi
|
|
61
|
+
|
|
62
|
+
with Chromapi(backend="mujoco", launch_viewer=True) as robot:
|
|
63
|
+
robot.wake_up(wait=True)
|
|
64
|
+
robot.walk_distance(0.3) # [m]
|
|
65
|
+
robot.rest()
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
More demos are in [`examples/`](https://github.com/Mowibox/chromapi/tree/main/examples). Each example runs on the robot, or in MuJoCo with `--sim`.
|
|
69
|
+
|
|
70
|
+
To keep a Chromapi simulation open between runs of your script, start the simulation window on its own, then use `backend="sim-server"`:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
chromapi sim # In a terminal: launches the simulation and its window (--headless: no window)
|
|
74
|
+
python my_script.py # In another terminal: Chromapi(backend="sim-server")
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### On the real robot
|
|
78
|
+
|
|
79
|
+
On the Raspberry Pi, once the [motherboard firmware](https://github.com/Mowibox/chromapi_motherboard) is flashed:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
chromapi motors setup # interactive: set each servo's ID, one servo at a time
|
|
83
|
+
chromapi calibrate servos --all # find each servo's center from its mechanical stops (lift the robot first)
|
|
84
|
+
chromapi calibrate imu # measure the IMU board tilt, robot still on a level floor
|
|
85
|
+
chromapi health # what is wrong with the robot, and what to do about it
|
|
86
|
+
chromapi version # SDK, firmware and bridge protocol versions
|
|
87
|
+
chromapi flash # update the motherboard firmware (lay the robot down first)
|
|
88
|
+
chromapi report # support report to attach to a message on Discord
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`chromapi --help` lists every command (`python -m chromapi` works too).
|
|
92
|
+
|
|
93
|
+
`chromapi run` starts the robot and its web app, at `https://<robot-name>.local:5000` (or `https://<robot-ip>:5000`) from a phone or a PC on the same network.
|
|
94
|
+
|
|
95
|
+
The same code then runs on the robot with `Chromapi(backend="hardware")`, which talks to the motherboard over UART.
|
|
96
|
+
|
|
97
|
+
## Project overview
|
|
98
|
+
|
|
99
|
+
| Resource | Description | Location | Status |
|
|
100
|
+
| :--- | :--- | :--- | :--- |
|
|
101
|
+
| **📋 Bill of Materials** | Complete hardware, electronics, and 3D-printed parts list to build Chromapi from scratch. | [Chroma Website](https://mowibox.github.io/chroma/en/chromapi/build/robot-bom/) | **Available** |
|
|
102
|
+
| **💻 Software API** | Python control framework, hardware interfaces, and kinematic solvers. | [`/src/chromapi`](https://github.com/Mowibox/chromapi/tree/main/src/chromapi) | **v1 Available** |
|
|
103
|
+
| **📐 CAD Model** | 3D mechanical design and robot assembly workspace. | [Onshape Document](https://cad.onshape.com/documents/3b2f6609101a115f427bb3a2/w/dda5699ddfe216cfbe74c22b/e/50bb405a7750d04ab1c412db?renderMode=0&uiState=6a7266a5caff22fc791d5f8b) | **Available** |
|
|
104
|
+
| **📖 Documentation** | Getting started, build guide, SDK tutorials, hardware specifications and communication protocol. | [Chroma Website](https://mowibox.github.io/chroma/en/chromapi/) | **Available** |
|
|
105
|
+
| **🛠️ Hardware Utilities** | `chromapi` command: health check, servo setup and calibration tools. | [`/src/chromapi/utils`](https://github.com/Mowibox/chromapi/tree/main/src/chromapi/utils) | **Available** |
|
|
106
|
+
| **🤖 Simulation Models** | URDF and MJCF models for MuJoCo simulation. | [`/src/chromapi/model`](https://github.com/Mowibox/chromapi/tree/main/src/chromapi/model) | **Available** |
|
|
107
|
+
| **⚡ Electronics** | Custom PCB files, schematics, and low-level firmware. | [`chromapi_motherboard` repository](https://github.com/Mowibox/chromapi_motherboard) | **Available** |
|
|
108
|
+
|
|
109
|
+
## Authors
|
|
110
|
+
|
|
111
|
+
| |
|
|
112
|
+
| :---: |
|
|
113
|
+
| <img src="https://github.com/Mowibox.png" width="100"> |
|
|
114
|
+
| [**Ousmane THIONGANE**](https://mowibox.github.io) |
|
|
115
|
+
|
|
116
|
+
## Sponsors & Acknowledgements
|
|
117
|
+
|
|
118
|
+
This project has been made possible thanks to the sponsors listed below. Their contributions in manufacturing, assembly, and prototyping have greatly accelerated the development of Chromapi.
|
|
119
|
+
|
|
120
|
+
<div align="center">
|
|
121
|
+
|
|
122
|
+
| | |
|
|
123
|
+
| :---: | :---: |
|
|
124
|
+
| <a href="https://www.pcbway.com"><img src="https://media.githubusercontent.com/media/Mowibox/chromapi/main/assets/pcbway.jpg" width="150" alt="PCBWay"></a> | <a href="https://www.ensea.fr"><img src="https://media.githubusercontent.com/media/Mowibox/chromapi/main/assets/ensea.jpg" width="150" alt="ENSEA"></a> |
|
|
125
|
+
| [**PCBWay**](https://www.pcbway.com) | [**ENSEA**](https://www.ensea.fr) |
|
|
126
|
+
| PCB Manufacturing & Assembly | 3D Printing & Prototyping |
|
|
127
|
+
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
> Huge thanks to everyone who gave me feedback on Chromapi's design, shared ideas, or simply took the time to brainstorm with me. This project wouldn't be where it is today without your help!
|
|
133
|
+
|
|
134
|
+
## Contributions
|
|
135
|
+
|
|
136
|
+
Contributions are always welcome!
|
|
137
|
+
|
|
138
|
+
* **Report Issues:** Found an error or have a feature request? Create a new issue [here](https://github.com/Mowibox/chromapi/issues/new/choose).
|
|
139
|
+
* **Fix Bugs & Add Features:** Find out where you can lend a hand by checking out [existing issues](https://github.com/Mowibox/chromapi/issues).
|
|
140
|
+
|
|
141
|
+
Before opening a pull request, don't forget to run the linters and unit tests: `uv run ruff check . && uv run mypy && uv run pytest`.
|
|
142
|
+
|
|
143
|
+
_By submitting a contribution, you agree that it is published under the license of the part it belongs to._
|
|
144
|
+
|
|
145
|
+
## Citation
|
|
146
|
+
|
|
147
|
+
If you use Chromapi in your research, please cite it as below:
|
|
148
|
+
|
|
149
|
+
```bibtex
|
|
150
|
+
@software{othiongane_chromapi,
|
|
151
|
+
author = {Thiongane, Ousmane},
|
|
152
|
+
title = {Chromapi: an open-source 12-DoF quadruped robot},
|
|
153
|
+
month = nov,
|
|
154
|
+
year = {2026},
|
|
155
|
+
version = {1.0.0},
|
|
156
|
+
url = {https://github.com/Mowibox/chromapi}
|
|
157
|
+
howpublished = "\url{https://github.com/Mowibox/chromapi}",
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## License
|
|
162
|
+
|
|
163
|
+
This repository is multi-licensed:
|
|
164
|
+
|
|
165
|
+
| Part | Path | License |
|
|
166
|
+
| :--- | :--- | :--- |
|
|
167
|
+
| Software (Python SDK, tools, tests, Raspberry Pi setup) | [`/src`](https://github.com/Mowibox/chromapi/tree/main/src), [`/tests`](https://github.com/Mowibox/chromapi/tree/main/tests), [`/deploy`](https://github.com/Mowibox/chromapi/tree/main/deploy) | [Apache 2.0](https://github.com/Mowibox/chromapi/blob/main/LICENSE) |
|
|
168
|
+
| Robot description (URDF, MJCF, configuration files) | [`/src/chromapi/model`](https://github.com/Mowibox/chromapi/tree/main/src/chromapi/model) | [Apache 2.0](https://github.com/Mowibox/chromapi/blob/main/LICENSE) |
|
|
169
|
+
| 3D meshes (`.stl`, `.part`) | [`/src/chromapi/model/*/assets`](https://github.com/Mowibox/chromapi/tree/main/src/chromapi/model) | [CC BY-NC-SA 4.0](https://github.com/Mowibox/chromapi/blob/main/src/chromapi/model/LICENSE) |
|
|
170
|
+
| Documentation and media (README, images, GIFs) | [`/assets`](https://github.com/Mowibox/chromapi/tree/main/assets), this README | [CC BY-NC-SA 4.0](https://github.com/Mowibox/chromapi/blob/main/src/chromapi/model/LICENSE) |
|
|
171
|
+
|
|
172
|
+
**Third-party content keeps its own license:** meshes of off-the-shelf parts (Raspberry Pi 4, IMX219 camera, Noctua NF-A4x10 fan, WS2812B ring, 18650 battery, speaker, microswitch, power switch, connectors, screws) come from their respective manufacturers. The ENSEA and PCBWay logos in [`/assets`](https://github.com/Mowibox/chromapi/tree/main/assets) are trademarks of their respective owners.
|