eddy-ai 0.1.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.
Files changed (36) hide show
  1. eddy_ai-0.1.0/LICENSE +202 -0
  2. eddy_ai-0.1.0/NOTICE +4 -0
  3. eddy_ai-0.1.0/PKG-INFO +191 -0
  4. eddy_ai-0.1.0/README.md +166 -0
  5. eddy_ai-0.1.0/pyproject.toml +34 -0
  6. eddy_ai-0.1.0/setup.cfg +4 -0
  7. eddy_ai-0.1.0/src/eddy/__init__.py +7 -0
  8. eddy_ai-0.1.0/src/eddy/__main__.py +6 -0
  9. eddy_ai-0.1.0/src/eddy/adapters/__init__.py +81 -0
  10. eddy_ai-0.1.0/src/eddy/adapters/base.py +82 -0
  11. eddy_ai-0.1.0/src/eddy/adapters/line.py +421 -0
  12. eddy_ai-0.1.0/src/eddy/adapters/ros2.py +1015 -0
  13. eddy_ai-0.1.0/src/eddy/adapters/sim.py +184 -0
  14. eddy_ai-0.1.0/src/eddy/brain.py +960 -0
  15. eddy_ai-0.1.0/src/eddy/cli.py +459 -0
  16. eddy_ai-0.1.0/src/eddy/gestures.py +164 -0
  17. eddy_ai-0.1.0/src/eddy/intents.py +284 -0
  18. eddy_ai-0.1.0/src/eddy/kinematics.py +306 -0
  19. eddy_ai-0.1.0/src/eddy/link.py +536 -0
  20. eddy_ai-0.1.0/src/eddy/model.py +230 -0
  21. eddy_ai-0.1.0/src/eddy/runlog.py +120 -0
  22. eddy_ai-0.1.0/src/eddy/selftest.py +163 -0
  23. eddy_ai-0.1.0/src/eddy/senses/__init__.py +5 -0
  24. eddy_ai-0.1.0/src/eddy/senses/listen.py +138 -0
  25. eddy_ai-0.1.0/src/eddy/senses/speak.py +43 -0
  26. eddy_ai-0.1.0/src/eddy/senses/vision.py +102 -0
  27. eddy_ai-0.1.0/src/eddy/web.py +255 -0
  28. eddy_ai-0.1.0/src/eddy_ai.egg-info/PKG-INFO +191 -0
  29. eddy_ai-0.1.0/src/eddy_ai.egg-info/SOURCES.txt +34 -0
  30. eddy_ai-0.1.0/src/eddy_ai.egg-info/dependency_links.txt +1 -0
  31. eddy_ai-0.1.0/src/eddy_ai.egg-info/entry_points.txt +2 -0
  32. eddy_ai-0.1.0/src/eddy_ai.egg-info/requires.txt +15 -0
  33. eddy_ai-0.1.0/src/eddy_ai.egg-info/top_level.txt +1 -0
  34. eddy_ai-0.1.0/tests/test_end_to_end.py +47 -0
  35. eddy_ai-0.1.0/tests/test_firmware.py +118 -0
  36. eddy_ai-0.1.0/tests/test_units.py +1476 -0
eddy_ai-0.1.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
eddy_ai-0.1.0/NOTICE ADDED
@@ -0,0 +1,4 @@
1
+ Eddy
2
+ Copyright 2026 Oluwatobi Talabi
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
eddy_ai-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: eddy-ai
3
+ Version: 0.1.0
4
+ Summary: Eddy: a plug-and-play universal robot controller that wraps existing robot code.
5
+ Author: Oluwatobi Talabi
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/myseiv/eddy
8
+ Keywords: robotics,ros2,robot control,multi-robot,plug and play
9
+ Requires-Python: >=3.9
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ Requires-Dist: numpy>=1.21
14
+ Provides-Extra: serial
15
+ Requires-Dist: pyserial>=3.5; extra == "serial"
16
+ Provides-Extra: vision
17
+ Requires-Dist: opencv-python-headless>=4.5; extra == "vision"
18
+ Requires-Dist: mediapipe>=0.10; extra == "vision"
19
+ Provides-Extra: voice
20
+ Requires-Dist: vosk>=0.3.42; extra == "voice"
21
+ Requires-Dist: sounddevice>=0.4; extra == "voice"
22
+ Provides-Extra: dev
23
+ Requires-Dist: pytest>=7; extra == "dev"
24
+ Dynamic: license-file
25
+
26
+ # Eddy
27
+
28
+ A plug-and-play controller that sits on top of a robot's existing code and controls it.
29
+
30
+ Eddy does not replace what already runs on a robot. It attaches to it, works out what the
31
+ robot can do, and then accepts the same commands on every robot: typed, spoken, shown as a
32
+ hand sign, sent by a program, or sent by another robot.
33
+
34
+ ```
35
+ typed text speech hand signs another robot your program
36
+ \ | | | /
37
+ +--------+----------+------------+-------------+
38
+ | Eddy | sentences -> commands
39
+ | safety limits · inverse kinematics · stop | commands -> motion
40
+ +----------------------+-----------------------+
41
+ | one adapter interface
42
+ +-----------+-----------+-----------+------------+
43
+ | ros2 | serial: | tcp: | sim |
44
+ | existing | Arduino / | networked | built-in |
45
+ | ROS nodes | ESP32 | robot | simulator |
46
+ +-----------+-----------+-----------+------------+
47
+ ```
48
+
49
+ ## Try it (no robot needed)
50
+
51
+ ```bash
52
+ python3 -m venv .venv && .venv/bin/pip install -e '.[dev]'
53
+ ```
54
+
55
+ ```bash
56
+ .venv/bin/eddy selftest
57
+ ```
58
+
59
+ ```bash
60
+ .venv/bin/eddy shell -r sim
61
+ ```
62
+
63
+ Then type things like `drive forward 1 meter`, `turn left 90 degrees`, `slide left 20 cm` (bases that can move sideways; try it with `-r sim:mecanum`), `reach 0.2 0.1 0.3`,
64
+ `close the gripper`, `wander for 30 seconds`, `status`, `stop`.
65
+
66
+ ## Put it on a Raspberry Pi
67
+
68
+ From this folder on your computer (the Pi only needs SSH enabled):
69
+
70
+ ```bash
71
+ ./scripts/deploy.sh pi@raspberrypi.local --all
72
+ ```
73
+
74
+ Or, on the Pi itself, once the code is on GitHub:
75
+
76
+ ```bash
77
+ git clone https://github.com/myseiv/eddy.git && cd eddy && ./scripts/install.sh --all
78
+ ```
79
+
80
+ `--all` adds serial robots, voice and vision; leave it off for the core only. The installer
81
+ ends by running `eddy doctor` and `eddy selftest` on the Pi. To start Eddy at boot:
82
+
83
+ ```bash
84
+ ./scripts/install.sh --service "run -r ros2 --speak --peers --key my-secret"
85
+ ```
86
+
87
+ ## Attach it to a robot
88
+
89
+ | Robot | Command | What Eddy needs from it |
90
+ |---|---|---|
91
+ | Anything running ROS 2 | `eddy info -r ros2` | Nothing new. Eddy reads the graph (all topics and nodes) and finds the velocity topic, odometry, laser, joint states, trajectory controllers and URDF by itself. |
92
+ | Arduino / ESP32 / Pico on USB | `eddy info -r serial:/dev/ttyUSB0` | Firmware that answers the Eddy line protocol (7 one-line commands, documented in `src/eddy/adapters/line.py`). |
93
+ | A robot on the network | `eddy info -r tcp:192.168.1.20:9000` | The same protocol on a TCP port. `eddy serve` provides it for any robot Eddy can already reach. Serve with `--key <secret>` and connect with the same `--key`, so only you can drive it. A served robot stops by itself if the link drops. |
94
+ | No robot | `eddy info -r sim` | Nothing. |
95
+
96
+ `eddy scan` lists what it can find. `eddy doctor` says what is installed and what is missing.
97
+
98
+ ## Control it from a web page
99
+
100
+ ```bash
101
+ eddy web -r ros2
102
+ ```
103
+
104
+ Eddy prints a link. Open it on a laptop or phone on the same network: the robot's camera, where
105
+ it is, a box to type commands in, and a big stop button. Nothing extra to install. The link
106
+ carries a short code that changes every start, so only someone who saw the robot's terminal can
107
+ drive it. A camera that publishes compressed pictures needs nothing; an uncompressed one needs
108
+ OpenCV on the robot (the page says so if that is the case).
109
+
110
+ ## See what happened
111
+
112
+ Every `eddy do`, `shell`, `run` and `web` session is logged, one line per command, with the
113
+ robot's state before and after:
114
+
115
+ ```bash
116
+ eddy log
117
+ ```
118
+
119
+ The files are in `~/.eddy/logs` (JSON lines). `--no-log` switches it off.
120
+
121
+ ## Everything on
122
+
123
+ ```bash
124
+ eddy run -r ros2 --speak --voice --gestures --peers --key my-secret --obey
125
+ ```
126
+
127
+ - `--voice` listens offline; say "Eddy, drive forward one meter".
128
+ - `--gestures` watches the camera: open palm or fist = stop, point = forward, V = back, thumb sideways = turn that way.
129
+ - `--peers` finds other Eddy robots on the network. In the prompt, `peers` lists them and where they are, `@name turn left` sends a command to one, and `@all stop` stops them all.
130
+ - `--peer 192.168.1.21` adds a robot by address, for networks where robots do not find each other (many Wi-Fi networks).
131
+ - `--start 2,0,180` says where this robot is now (x, y in metres and heading in degrees) from a mark on the floor that all the robots use. With it, robots tell each other positions that mean the same thing to all of them.
132
+ - The robot's own operator comes first: a peer cannot take over a move the operator asked for, or restart the robot for 10 s after the operator stopped it. A peer can always stop it.
133
+ - `--obey` lets peers that hold the same `--key` command this robot. Without it, the robot answers questions and honours `stop`, but will not move for anyone else.
134
+
135
+ ## Safety built in
136
+
137
+ - Speeds are clamped to the robot's limits (`--speed 0.5` halves everything).
138
+ - Eddy will not start, and will stop, a forward drive when its distance sensor sees something closer than `--min-range` (0.25 m).
139
+ - `stop` (typed, spoken, signed, or from a peer) interrupts whatever is running.
140
+ - Arm targets are checked with inverse kinematics first; unreachable points are refused, joint limits are respected.
141
+ - Commands from other robots must be signed with the shared key, are time-limited and cannot be replayed.
142
+
143
+ Eddy only knows about obstacles straight ahead that the robot's own range sensor reports. It
144
+ is not a certified safety system: keep a physical emergency stop on any robot that can hurt someone.
145
+
146
+ ## Tests
147
+
148
+ ```bash
149
+ .venv/bin/python -m pytest -q
150
+ ```
151
+
152
+ ```bash
153
+ ./tests/ros2/run.sh
154
+ ```
155
+
156
+ ```bash
157
+ ./tests/peers/run.sh
158
+ ```
159
+
160
+ ```bash
161
+ ./tests/ros2/run_hiwonder.sh
162
+ ```
163
+
164
+ ```bash
165
+ ./tests/sims/run.sh
166
+ ```
167
+
168
+ ```bash
169
+ ./tests/manip/run.sh
170
+ ```
171
+
172
+ All but the first need Docker; run them one at a time (containers see each other's ROS topics).
173
+ `tests/manip/run.sh` runs 13 checks for robots that drive and have an arm on three of them,
174
+ including Gazebo's stock vehicle carrying a stock Franka Panda. `tests/ros2/run.sh` runs Eddy against a mock robot on real
175
+ ROS 2 Jazzy, and `tests/peers/run.sh` runs two robots on separate machines talking to each
176
+ other. `run_hiwonder.sh` uses stand-ins for two real robots Eddy has been tried on.
177
+ `tests/sims/run.sh` uses public simulators that were not written for Eddy (a Franka Panda arm
178
+ on stock ros2_control controllers, Gazebo's stock differential-drive and car-steered
179
+ vehicles, and its stock quadcopter) and compares every result with the simulator's true pose; it builds a 4 GB image
180
+ the first time and takes about ten minutes.
181
+
182
+ Step-by-step setup guides for ROS 2, network (TCP) and microcontroller robots are in [setup/](setup/README.md).
183
+
184
+ ## Citing Eddy
185
+
186
+ If you use Eddy in your work, please cite it. GitHub's "Cite this repository" button gives the
187
+ reference from [CITATION.cff](CITATION.cff); a paper describing Eddy is in preparation.
188
+
189
+ ## Licence
190
+
191
+ Apache License 2.0: see [LICENSE](LICENSE) and [NOTICE](NOTICE).
@@ -0,0 +1,166 @@
1
+ # Eddy
2
+
3
+ A plug-and-play controller that sits on top of a robot's existing code and controls it.
4
+
5
+ Eddy does not replace what already runs on a robot. It attaches to it, works out what the
6
+ robot can do, and then accepts the same commands on every robot: typed, spoken, shown as a
7
+ hand sign, sent by a program, or sent by another robot.
8
+
9
+ ```
10
+ typed text speech hand signs another robot your program
11
+ \ | | | /
12
+ +--------+----------+------------+-------------+
13
+ | Eddy | sentences -> commands
14
+ | safety limits · inverse kinematics · stop | commands -> motion
15
+ +----------------------+-----------------------+
16
+ | one adapter interface
17
+ +-----------+-----------+-----------+------------+
18
+ | ros2 | serial: | tcp: | sim |
19
+ | existing | Arduino / | networked | built-in |
20
+ | ROS nodes | ESP32 | robot | simulator |
21
+ +-----------+-----------+-----------+------------+
22
+ ```
23
+
24
+ ## Try it (no robot needed)
25
+
26
+ ```bash
27
+ python3 -m venv .venv && .venv/bin/pip install -e '.[dev]'
28
+ ```
29
+
30
+ ```bash
31
+ .venv/bin/eddy selftest
32
+ ```
33
+
34
+ ```bash
35
+ .venv/bin/eddy shell -r sim
36
+ ```
37
+
38
+ Then type things like `drive forward 1 meter`, `turn left 90 degrees`, `slide left 20 cm` (bases that can move sideways; try it with `-r sim:mecanum`), `reach 0.2 0.1 0.3`,
39
+ `close the gripper`, `wander for 30 seconds`, `status`, `stop`.
40
+
41
+ ## Put it on a Raspberry Pi
42
+
43
+ From this folder on your computer (the Pi only needs SSH enabled):
44
+
45
+ ```bash
46
+ ./scripts/deploy.sh pi@raspberrypi.local --all
47
+ ```
48
+
49
+ Or, on the Pi itself, once the code is on GitHub:
50
+
51
+ ```bash
52
+ git clone https://github.com/myseiv/eddy.git && cd eddy && ./scripts/install.sh --all
53
+ ```
54
+
55
+ `--all` adds serial robots, voice and vision; leave it off for the core only. The installer
56
+ ends by running `eddy doctor` and `eddy selftest` on the Pi. To start Eddy at boot:
57
+
58
+ ```bash
59
+ ./scripts/install.sh --service "run -r ros2 --speak --peers --key my-secret"
60
+ ```
61
+
62
+ ## Attach it to a robot
63
+
64
+ | Robot | Command | What Eddy needs from it |
65
+ |---|---|---|
66
+ | Anything running ROS 2 | `eddy info -r ros2` | Nothing new. Eddy reads the graph (all topics and nodes) and finds the velocity topic, odometry, laser, joint states, trajectory controllers and URDF by itself. |
67
+ | Arduino / ESP32 / Pico on USB | `eddy info -r serial:/dev/ttyUSB0` | Firmware that answers the Eddy line protocol (7 one-line commands, documented in `src/eddy/adapters/line.py`). |
68
+ | A robot on the network | `eddy info -r tcp:192.168.1.20:9000` | The same protocol on a TCP port. `eddy serve` provides it for any robot Eddy can already reach. Serve with `--key <secret>` and connect with the same `--key`, so only you can drive it. A served robot stops by itself if the link drops. |
69
+ | No robot | `eddy info -r sim` | Nothing. |
70
+
71
+ `eddy scan` lists what it can find. `eddy doctor` says what is installed and what is missing.
72
+
73
+ ## Control it from a web page
74
+
75
+ ```bash
76
+ eddy web -r ros2
77
+ ```
78
+
79
+ Eddy prints a link. Open it on a laptop or phone on the same network: the robot's camera, where
80
+ it is, a box to type commands in, and a big stop button. Nothing extra to install. The link
81
+ carries a short code that changes every start, so only someone who saw the robot's terminal can
82
+ drive it. A camera that publishes compressed pictures needs nothing; an uncompressed one needs
83
+ OpenCV on the robot (the page says so if that is the case).
84
+
85
+ ## See what happened
86
+
87
+ Every `eddy do`, `shell`, `run` and `web` session is logged, one line per command, with the
88
+ robot's state before and after:
89
+
90
+ ```bash
91
+ eddy log
92
+ ```
93
+
94
+ The files are in `~/.eddy/logs` (JSON lines). `--no-log` switches it off.
95
+
96
+ ## Everything on
97
+
98
+ ```bash
99
+ eddy run -r ros2 --speak --voice --gestures --peers --key my-secret --obey
100
+ ```
101
+
102
+ - `--voice` listens offline; say "Eddy, drive forward one meter".
103
+ - `--gestures` watches the camera: open palm or fist = stop, point = forward, V = back, thumb sideways = turn that way.
104
+ - `--peers` finds other Eddy robots on the network. In the prompt, `peers` lists them and where they are, `@name turn left` sends a command to one, and `@all stop` stops them all.
105
+ - `--peer 192.168.1.21` adds a robot by address, for networks where robots do not find each other (many Wi-Fi networks).
106
+ - `--start 2,0,180` says where this robot is now (x, y in metres and heading in degrees) from a mark on the floor that all the robots use. With it, robots tell each other positions that mean the same thing to all of them.
107
+ - The robot's own operator comes first: a peer cannot take over a move the operator asked for, or restart the robot for 10 s after the operator stopped it. A peer can always stop it.
108
+ - `--obey` lets peers that hold the same `--key` command this robot. Without it, the robot answers questions and honours `stop`, but will not move for anyone else.
109
+
110
+ ## Safety built in
111
+
112
+ - Speeds are clamped to the robot's limits (`--speed 0.5` halves everything).
113
+ - Eddy will not start, and will stop, a forward drive when its distance sensor sees something closer than `--min-range` (0.25 m).
114
+ - `stop` (typed, spoken, signed, or from a peer) interrupts whatever is running.
115
+ - Arm targets are checked with inverse kinematics first; unreachable points are refused, joint limits are respected.
116
+ - Commands from other robots must be signed with the shared key, are time-limited and cannot be replayed.
117
+
118
+ Eddy only knows about obstacles straight ahead that the robot's own range sensor reports. It
119
+ is not a certified safety system: keep a physical emergency stop on any robot that can hurt someone.
120
+
121
+ ## Tests
122
+
123
+ ```bash
124
+ .venv/bin/python -m pytest -q
125
+ ```
126
+
127
+ ```bash
128
+ ./tests/ros2/run.sh
129
+ ```
130
+
131
+ ```bash
132
+ ./tests/peers/run.sh
133
+ ```
134
+
135
+ ```bash
136
+ ./tests/ros2/run_hiwonder.sh
137
+ ```
138
+
139
+ ```bash
140
+ ./tests/sims/run.sh
141
+ ```
142
+
143
+ ```bash
144
+ ./tests/manip/run.sh
145
+ ```
146
+
147
+ All but the first need Docker; run them one at a time (containers see each other's ROS topics).
148
+ `tests/manip/run.sh` runs 13 checks for robots that drive and have an arm on three of them,
149
+ including Gazebo's stock vehicle carrying a stock Franka Panda. `tests/ros2/run.sh` runs Eddy against a mock robot on real
150
+ ROS 2 Jazzy, and `tests/peers/run.sh` runs two robots on separate machines talking to each
151
+ other. `run_hiwonder.sh` uses stand-ins for two real robots Eddy has been tried on.
152
+ `tests/sims/run.sh` uses public simulators that were not written for Eddy (a Franka Panda arm
153
+ on stock ros2_control controllers, Gazebo's stock differential-drive and car-steered
154
+ vehicles, and its stock quadcopter) and compares every result with the simulator's true pose; it builds a 4 GB image
155
+ the first time and takes about ten minutes.
156
+
157
+ Step-by-step setup guides for ROS 2, network (TCP) and microcontroller robots are in [setup/](setup/README.md).
158
+
159
+ ## Citing Eddy
160
+
161
+ If you use Eddy in your work, please cite it. GitHub's "Cite this repository" button gives the
162
+ reference from [CITATION.cff](CITATION.cff); a paper describing Eddy is in preparation.
163
+
164
+ ## Licence
165
+
166
+ Apache License 2.0: see [LICENSE](LICENSE) and [NOTICE](NOTICE).
@@ -0,0 +1,34 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "eddy-ai"
7
+ version = "0.1.0"
8
+ description = "Eddy: a plug-and-play universal robot controller that wraps existing robot code."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ authors = [{ name = "Oluwatobi Talabi" }]
12
+ license = "Apache-2.0"
13
+ license-files = ["LICENSE", "NOTICE"]
14
+ keywords = ["robotics", "ros2", "robot control", "multi-robot", "plug and play"]
15
+ dependencies = ["numpy>=1.21"]
16
+
17
+ [project.optional-dependencies]
18
+ serial = ["pyserial>=3.5"]
19
+ vision = ["opencv-python-headless>=4.5", "mediapipe>=0.10"]
20
+ voice = ["vosk>=0.3.42", "sounddevice>=0.4"]
21
+ dev = ["pytest>=7"]
22
+
23
+ [project.urls]
24
+ Homepage = "https://github.com/myseiv/eddy"
25
+
26
+ [project.scripts]
27
+ eddy = "eddy.cli:main"
28
+
29
+ [tool.setuptools.packages.find]
30
+ where = ["src"]
31
+
32
+ [tool.pytest.ini_options]
33
+ testpaths = ["tests"]
34
+ pythonpath = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,7 @@
1
+ """Eddy: a plug-and-play controller that wraps any robot's existing code."""
2
+ __version__ = "0.1.0"
3
+
4
+ # The names most programs need, importable straight from `eddy`:
5
+ # from eddy import Eddy, open_robot
6
+ from .brain import Eddy, Result, Safety # noqa: E402,F401
7
+ from .adapters import open_robot, scan # noqa: E402,F401
@@ -0,0 +1,6 @@
1
+ """Lets `python -m eddy ...` do the same as the `eddy` command."""
2
+ import sys
3
+
4
+ from .cli import main
5
+
6
+ sys.exit(main())