dreamscale-i2rt 1.1.2.post1__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 (109) hide show
  1. dreamscale_i2rt-1.1.2.post1/LICENSE +9 -0
  2. dreamscale_i2rt-1.1.2.post1/PKG-INFO +244 -0
  3. dreamscale_i2rt-1.1.2.post1/README.md +197 -0
  4. dreamscale_i2rt-1.1.2.post1/i2rt/__init__.py +1 -0
  5. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/README.md +399 -0
  6. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/assets/base_heading.jpg +0 -0
  7. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/assets/drive_motor_direction.jpg +0 -0
  8. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/assets/flow_base.png +0 -0
  9. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/assets/flow_base_panel.jpg +0 -0
  10. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/assets/linear_rail.png +0 -0
  11. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/assets/motor_numbering.jpg +0 -0
  12. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/assets/remote.jpg +0 -0
  13. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/assets/steering_alignment_pin.jpg +0 -0
  14. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/assets/usb-gpio.jpg +0 -0
  15. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/flow_base_client.py +236 -0
  16. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/flow_base_controller.py +1072 -0
  17. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/linear_rail_controller.py +585 -0
  18. dreamscale_i2rt-1.1.2.post1/i2rt/flow_base/tests/test_odometry_integration.py +77 -0
  19. dreamscale_i2rt-1.1.2.post1/i2rt/motor_config_tool/ping_motors.py +34 -0
  20. dreamscale_i2rt-1.1.2.post1/i2rt/motor_config_tool/set_timeout.py +52 -0
  21. dreamscale_i2rt-1.1.2.post1/i2rt/motor_config_tool/set_zero.py +36 -0
  22. dreamscale_i2rt-1.1.2.post1/i2rt/motor_config_tool/utils.py +200 -0
  23. dreamscale_i2rt-1.1.2.post1/i2rt/motor_drivers/can_interface.py +136 -0
  24. dreamscale_i2rt-1.1.2.post1/i2rt/motor_drivers/dm_driver.py +845 -0
  25. dreamscale_i2rt-1.1.2.post1/i2rt/motor_drivers/utils.py +239 -0
  26. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/__init__.py +17 -0
  27. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/big_yam/assets/base.stl +0 -0
  28. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/big_yam/assets/link1.stl +0 -0
  29. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/big_yam/assets/link2.stl +0 -0
  30. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/big_yam/assets/link3.stl +0 -0
  31. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/big_yam/assets/link4.stl +0 -0
  32. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/big_yam/assets/link5.stl +0 -0
  33. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/big_yam/big_yam.urdf +285 -0
  34. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/big_yam/big_yam.xml +44 -0
  35. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam/assets/base.stl +0 -0
  36. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam/assets/link1.stl +0 -0
  37. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam/assets/link2.stl +0 -0
  38. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam/assets/link3.stl +0 -0
  39. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam/assets/link4.stl +0 -0
  40. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam/assets/link5.stl +0 -0
  41. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam/yam.urdf +211 -0
  42. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam/yam.xml +45 -0
  43. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_pro/assets/base.stl +0 -0
  44. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_pro/assets/link1.stl +0 -0
  45. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_pro/assets/link2.stl +0 -0
  46. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_pro/assets/link3.stl +0 -0
  47. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_pro/assets/link4.stl +0 -0
  48. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_pro/assets/link5.stl +0 -0
  49. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_pro/yam_pro.urdf +453 -0
  50. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_pro/yam_pro.xml +46 -0
  51. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_ultra/assets/base.stl +0 -0
  52. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_ultra/assets/link1.stl +0 -0
  53. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_ultra/assets/link2.stl +0 -0
  54. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_ultra/assets/link3.stl +0 -0
  55. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_ultra/assets/link4.stl +0 -0
  56. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_ultra/assets/link5.stl +0 -0
  57. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_ultra/yam_ultra.urdf +211 -0
  58. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/arm/yam_ultra/yam_ultra.xml +46 -0
  59. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/crank_4310/assets/gripper_collision.stl +0 -0
  60. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/crank_4310/crank_4310.xml +16 -0
  61. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/flexible_4310/assets/base.stl +0 -0
  62. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/flexible_4310/assets/linear_module.stl +0 -0
  63. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/flexible_4310/assets/soft_tips.stl +0 -0
  64. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/flexible_4310/flexible_4310.urdf +125 -0
  65. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/flexible_4310/flexible_4310.xml +40 -0
  66. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/linear_3507/assets/gripper.stl +0 -0
  67. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/linear_3507/assets/tip_left.stl +0 -0
  68. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/linear_3507/assets/tip_right.stl +0 -0
  69. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/linear_3507/linear_3507.xml +38 -0
  70. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/linear_4310/assets/gripper.stl +0 -0
  71. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/linear_4310/assets/tip_left.stl +0 -0
  72. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/linear_4310/assets/tip_right.stl +0 -0
  73. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/linear_4310/linear_4310.xml +38 -0
  74. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/no_gripper/no_gripper.xml +11 -0
  75. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/gripper/yam_teaching_handle/yam_teaching_handle.xml +10 -0
  76. dreamscale_i2rt-1.1.2.post1/i2rt/robot_models/scripts/simplify_mesh.py +64 -0
  77. dreamscale_i2rt-1.1.2.post1/i2rt/robots/config/big_yam.yml +18 -0
  78. dreamscale_i2rt-1.1.2.post1/i2rt/robots/config/crank_4310.yml +37 -0
  79. dreamscale_i2rt-1.1.2.post1/i2rt/robots/config/flexible_4310.yml +36 -0
  80. dreamscale_i2rt-1.1.2.post1/i2rt/robots/config/linear_3507.yml +35 -0
  81. dreamscale_i2rt-1.1.2.post1/i2rt/robots/config/linear_4310.yml +35 -0
  82. dreamscale_i2rt-1.1.2.post1/i2rt/robots/config/no_gripper.yml +27 -0
  83. dreamscale_i2rt-1.1.2.post1/i2rt/robots/config/yam.yml +18 -0
  84. dreamscale_i2rt-1.1.2.post1/i2rt/robots/config/yam_pro.yml +18 -0
  85. dreamscale_i2rt-1.1.2.post1/i2rt/robots/config/yam_teaching_handle.yml +27 -0
  86. dreamscale_i2rt-1.1.2.post1/i2rt/robots/config/yam_ultra.yml +18 -0
  87. dreamscale_i2rt-1.1.2.post1/i2rt/robots/get_robot.py +302 -0
  88. dreamscale_i2rt-1.1.2.post1/i2rt/robots/kinematics.py +127 -0
  89. dreamscale_i2rt-1.1.2.post1/i2rt/robots/motor_chain_robot.py +773 -0
  90. dreamscale_i2rt-1.1.2.post1/i2rt/robots/robot.py +120 -0
  91. dreamscale_i2rt-1.1.2.post1/i2rt/robots/sim_robot.py +317 -0
  92. dreamscale_i2rt-1.1.2.post1/i2rt/robots/tests/conftest.py +3 -0
  93. dreamscale_i2rt-1.1.2.post1/i2rt/robots/tests/test_assembly.py +198 -0
  94. dreamscale_i2rt-1.1.2.post1/i2rt/robots/tests/test_control_interface.py +130 -0
  95. dreamscale_i2rt-1.1.2.post1/i2rt/robots/tests/test_gravity_comp.py +82 -0
  96. dreamscale_i2rt-1.1.2.post1/i2rt/robots/tests/test_kinematics.py +45 -0
  97. dreamscale_i2rt-1.1.2.post1/i2rt/robots/tests/test_robot_variants.py +200 -0
  98. dreamscale_i2rt-1.1.2.post1/i2rt/robots/utils.py +767 -0
  99. dreamscale_i2rt-1.1.2.post1/i2rt/utils/can_flash.py +346 -0
  100. dreamscale_i2rt-1.1.2.post1/i2rt/utils/encoder_manager.py +1202 -0
  101. dreamscale_i2rt-1.1.2.post1/i2rt/utils/gamepad_utils.py +63 -0
  102. dreamscale_i2rt-1.1.2.post1/i2rt/utils/mujoco_control_interface.py +764 -0
  103. dreamscale_i2rt-1.1.2.post1/i2rt/utils/mujoco_utils.py +42 -0
  104. dreamscale_i2rt-1.1.2.post1/i2rt/utils/tests/conftest.py +110 -0
  105. dreamscale_i2rt-1.1.2.post1/i2rt/utils/tests/test_usb_gpio_driver.py +303 -0
  106. dreamscale_i2rt-1.1.2.post1/i2rt/utils/usb_gpio_driver.py +506 -0
  107. dreamscale_i2rt-1.1.2.post1/i2rt/utils/utils.py +85 -0
  108. dreamscale_i2rt-1.1.2.post1/i2rt/utils/viser_control_interface.py +585 -0
  109. dreamscale_i2rt-1.1.2.post1/pyproject.toml +141 -0
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) I2RT Robotics
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,244 @@
1
+ Metadata-Version: 2.4
2
+ Name: dreamscale-i2rt
3
+ Version: 1.1.2.post1
4
+ Summary: Dreamscale's maintained build of the I2RT YAM arm and Flow Base Python driver.
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Requires-Dist: crcmod-plus>=2.3.1
10
+ Requires-Dist: dm-env>=1.6
11
+ Requires-Dist: mink>=0.0.13
12
+ Requires-Dist: mujoco>=3.3.5
13
+ Requires-Dist: numpy>=1.26,<3
14
+ Requires-Dist: packaging
15
+ Requires-Dist: pydantic>=2.0
16
+ Requires-Dist: python-can>=4.5,<5
17
+ Requires-Dist: pyyaml>=6.0.0
18
+ Requires-Dist: qpsolvers[quadprog]>=4.7.1
19
+ Requires-Dist: tyro>=1.0.0
20
+ Requires-Dist: dreamscale-i2rt[flow-base, gamepad, viz, gpio, scripts] ; extra == "all"
21
+ Requires-Dist: dreamscale-i2rt[all] ; extra == "dev"
22
+ Requires-Dist: pyright>=1.1.408 ; extra == "dev"
23
+ Requires-Dist: pytest>=8.4.0 ; extra == "dev"
24
+ Requires-Dist: pytest-xdist>=3.8.0 ; extra == "dev"
25
+ Requires-Dist: ruff>=0.15.6 ; extra == "dev"
26
+ Requires-Dist: portal>=3.7.3 ; extra == "flow-base"
27
+ Requires-Dist: pygame>=2.6.1 ; extra == "flow-base"
28
+ Requires-Dist: ruckig>=0.15.3 ; extra == "flow-base"
29
+ Requires-Dist: threadpoolctl>=3.6.0 ; extra == "flow-base"
30
+ Requires-Dist: pygame>=2.6.1 ; extra == "gamepad"
31
+ Requires-Dist: pyserial>=3.5 ; extra == "gpio"
32
+ Requires-Dist: rpi-lgpio>=0.6 ; extra == "gpio" and ( sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'armv7l' or platform_machine == 'armv6l'))
33
+ Requires-Dist: click>=8.0 ; extra == "scripts"
34
+ Requires-Dist: mcap-ros2-support>=0.5.5 ; extra == "scripts"
35
+ Requires-Dist: rerun-sdk>=0.32.2 ; extra == "viz"
36
+ Requires-Dist: viser>=0.2.0 ; extra == "viz"
37
+ Project-URL: Source, https://github.com/Dreamscale-Labs/dreamscale-i2rt
38
+ Project-URL: Upstream, https://github.com/i2rt-robotics/i2rt
39
+ Provides-Extra: all
40
+ Provides-Extra: dev
41
+ Provides-Extra: flow-base
42
+ Provides-Extra: gamepad
43
+ Provides-Extra: gpio
44
+ Provides-Extra: scripts
45
+ Provides-Extra: viz
46
+
47
+ # dreamscale-i2rt
48
+
49
+ Dreamscale Labs' maintained build of the [I2RT Python API](https://github.com/i2rt-robotics/i2rt),
50
+ published to PyPI so the YAM driver installs like any other package:
51
+
52
+ ```bash
53
+ pip install dreamscale-i2rt
54
+ ```
55
+
56
+ It installs the same `i2rt` import package, so it replaces an upstream `i2rt` install in the same
57
+ environment rather than sitting beside it. The core install is what YAM arm control needs; the
58
+ Flow Base, gamepad, visualisation, GPIO and script dependencies are extras
59
+ (`flow-base`, `gamepad`, `viz`, `gpio`, `scripts`, or `all`).
60
+
61
+ This is a fork. I2RT Robotics wrote the original code under the MIT licence; see [LICENSE](LICENSE).
62
+ Releases are tagged `v<version>` and published from [publish.yml](.github/workflows/publish.yml).
63
+
64
+ ---
65
+
66
+ # I2RT Python API
67
+
68
+ A Python client library for interacting with [I2RT](https://i2rt.com/) products — designed for learning-based robotics, teleoperation, and real-world deployment.
69
+
70
+ [![I2RT](https://github.com/user-attachments/assets/025ac3f0-7af1-4e6f-ab9f-7658c5978f92)](https://i2rt.com/)
71
+
72
+ > 📚 **Full documentation:** [doc.i2rt.com](https://doc.i2rt.com)
73
+
74
+ ## Features
75
+
76
+ - Plug-and-play Python interface for YAM arms and Flow Base
77
+ - Real-time robot control via CAN bus (DM series motors)
78
+ - MuJoCo gravity compensation, simulation, and URDF/MJCF models
79
+ - Gripper force control and auto-calibration
80
+ - Bimanual teleoperation and trajectory record & replay
81
+ - Policy-deployment ready — works with standard robot learning pipelines
82
+
83
+ ## Installation
84
+
85
+ ```bash
86
+ git clone https://github.com/i2rt-robotics/i2rt.git && cd i2rt
87
+ curl -LsSf https://astral.sh/uv/install.sh | sh
88
+ source $HOME/.local/bin/env
89
+ uv venv --python 3.11
90
+ source .venv/bin/activate
91
+ ```
92
+
93
+ ```bash
94
+ sudo apt update
95
+ sudo apt install build-essential python3-dev linux-headers-$(uname -r)
96
+ uv pip install -e .
97
+ ```
98
+
99
+ ## CAN Bus Setup
100
+
101
+ ```bash
102
+ # Check detected CAN devices
103
+ ls -l /sys/class/net/can*
104
+
105
+ # Bring up interface at 1 Mbit/s
106
+ sudo ip link set can0 up type can bitrate 1000000
107
+
108
+ # Auto-enable on boot
109
+ sudo sh devices/install_devices.sh
110
+
111
+ # Reset unresponsive adapter
112
+ sh scripts/reset_all_can.sh
113
+ ```
114
+
115
+ ## YAM Arm
116
+
117
+ ### Zero-gravity mode
118
+
119
+ ```bash
120
+ python i2rt/robots/motor_chain_robot.py --channel can0 --gripper linear_4310
121
+ ```
122
+
123
+ ### Python API
124
+
125
+ ```python
126
+ from i2rt.robots.get_robot import get_yam_robot
127
+ from i2rt.robots.utils import GripperType
128
+ import numpy as np
129
+
130
+ robot = get_yam_robot(channel="can0", gripper_type=GripperType.LINEAR_4310)
131
+
132
+ # Read joint positions (radians)
133
+ q = robot.get_joint_pos() # shape: (6,)
134
+
135
+ # Command a target configuration
136
+ robot.command_joint_pos(np.zeros(6))
137
+ ```
138
+
139
+ ### Leader-follower teleoperation
140
+
141
+ ```bash
142
+ # Follower arm
143
+ python examples/minimum_gello/minimum_gello.py --gripper linear_4310 --mode follower --can-channel can0 --bilateral-kp 0.2
144
+
145
+ # Leader arm (teaching handle)
146
+ python examples/minimum_gello/minimum_gello.py --gripper yam_teaching_handle --mode leader --can-channel can1 --bilateral-kp 0.2
147
+ ```
148
+
149
+ - **Top button (press once):** enable synchronisation — follower tracks leader
150
+ - **Top button (press again):** disable synchronisation
151
+ - `--bilateral-kp` controls resistance felt on the leader (0.1–0.2 recommended)
152
+
153
+ To inspect leader arm output:
154
+
155
+ ```bash
156
+ python scripts/run_yam_leader.py --channel $CAN_CHANNEL
157
+ ```
158
+
159
+ ### MuJoCo visualiser
160
+
161
+ ```bash
162
+ python examples/minimum_gello/minimum_gello.py --mode visualizer_local
163
+ ```
164
+
165
+ ## Gripper Types
166
+
167
+ | Gripper | Motor | Notes |
168
+ |---------|-------|-------|
169
+ | `crank_4310` | DM4310 | Zero-linkage crank — minimises gripper width |
170
+ | `linear_3507` | DM3507 | Lightweight linear; start closed or run calibration |
171
+ | `linear_4310` | DM4310 | Standard linear; slightly more force than 3507 |
172
+ | `yam_teaching_handle` | — | Leader arm handle with trigger + 2 buttons. |
173
+
174
+ The linear grippers require calibration because their motor travels more than 2π radians over the full stroke — either start with the gripper fully closed, or run the calibration routine.
175
+
176
+ ## Flow Base
177
+
178
+ ```bash
179
+ # Joystick demo
180
+ python i2rt/flow_base/flow_base_controller.py
181
+ ```
182
+
183
+ ```python
184
+ from i2rt.flow_base.flow_base_client import FlowBaseClient
185
+
186
+ client = FlowBaseClient(host="172.6.2.20")
187
+ client.set_target_velocity([0.1, 0.0, 0.0], frame="local")
188
+ ```
189
+
190
+ ## Examples
191
+
192
+ | Example | Location |
193
+ |---------|----------|
194
+ | Bimanual lead-follower | `examples/bimanual_lead_follower/` |
195
+ | Record & replay trajectory | `examples/record_replay_trajectory/` |
196
+ | Single motor PD control | `examples/single_motor_position_pd_control/` |
197
+ | MuJoCo control interface | `examples/control_with_mujoco/` |
198
+
199
+ ## Advanced: Motor Configuration
200
+
201
+ ### Safety timeout
202
+
203
+ The factory default is a **400 ms timeout** — motors enter damping mode if no command is received within 400 ms.
204
+
205
+ ```bash
206
+ # Disable timeout (advanced users only — run twice)
207
+ python i2rt/motor_config_tool/set_timeout.py --channel can0
208
+ python i2rt/motor_config_tool/set_timeout.py --channel can0
209
+
210
+ # Re-enable timeout
211
+ python i2rt/motor_config_tool/set_timeout.py --channel can0 --timeout
212
+ ```
213
+
214
+ > ⚠️ Without the timeout, a failed gravity-compensation loop can produce uncontrolled torque. If you disable it, always initialise with a PD target:
215
+ > ```python
216
+ > robot = get_yam_robot(channel="can0", zero_gravity_mode=False)
217
+ > ```
218
+
219
+ ### Zero motor offsets
220
+
221
+ ```bash
222
+ python i2rt/motor_config_tool/set_zero.py --channel can0 --motor_id 1
223
+ ```
224
+
225
+ Run for each motor ID (1–6 for a standard YAM).
226
+
227
+ ## Contributing
228
+
229
+ Pull requests welcome. Open an issue to request examples or report bugs.
230
+
231
+ ## License
232
+
233
+ MIT License — see [LICENSE](LICENSE).
234
+
235
+ ## Support
236
+
237
+ - Email: support@i2rt.com
238
+ - Sales: sales@i2rt.com
239
+
240
+ ## Acknowledgments
241
+
242
+ - [TidyBot++](https://github.com/jimmyyhwu/tidybot2) — Flow Base hardware and control inspired by TidyBot++
243
+ - [GELLO](https://github.com/wuphilipp/gello_software) — Teleoperation design inspired by GELLO
244
+
@@ -0,0 +1,197 @@
1
+ # dreamscale-i2rt
2
+
3
+ Dreamscale Labs' maintained build of the [I2RT Python API](https://github.com/i2rt-robotics/i2rt),
4
+ published to PyPI so the YAM driver installs like any other package:
5
+
6
+ ```bash
7
+ pip install dreamscale-i2rt
8
+ ```
9
+
10
+ It installs the same `i2rt` import package, so it replaces an upstream `i2rt` install in the same
11
+ environment rather than sitting beside it. The core install is what YAM arm control needs; the
12
+ Flow Base, gamepad, visualisation, GPIO and script dependencies are extras
13
+ (`flow-base`, `gamepad`, `viz`, `gpio`, `scripts`, or `all`).
14
+
15
+ This is a fork. I2RT Robotics wrote the original code under the MIT licence; see [LICENSE](LICENSE).
16
+ Releases are tagged `v<version>` and published from [publish.yml](.github/workflows/publish.yml).
17
+
18
+ ---
19
+
20
+ # I2RT Python API
21
+
22
+ A Python client library for interacting with [I2RT](https://i2rt.com/) products — designed for learning-based robotics, teleoperation, and real-world deployment.
23
+
24
+ [![I2RT](https://github.com/user-attachments/assets/025ac3f0-7af1-4e6f-ab9f-7658c5978f92)](https://i2rt.com/)
25
+
26
+ > 📚 **Full documentation:** [doc.i2rt.com](https://doc.i2rt.com)
27
+
28
+ ## Features
29
+
30
+ - Plug-and-play Python interface for YAM arms and Flow Base
31
+ - Real-time robot control via CAN bus (DM series motors)
32
+ - MuJoCo gravity compensation, simulation, and URDF/MJCF models
33
+ - Gripper force control and auto-calibration
34
+ - Bimanual teleoperation and trajectory record & replay
35
+ - Policy-deployment ready — works with standard robot learning pipelines
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ git clone https://github.com/i2rt-robotics/i2rt.git && cd i2rt
41
+ curl -LsSf https://astral.sh/uv/install.sh | sh
42
+ source $HOME/.local/bin/env
43
+ uv venv --python 3.11
44
+ source .venv/bin/activate
45
+ ```
46
+
47
+ ```bash
48
+ sudo apt update
49
+ sudo apt install build-essential python3-dev linux-headers-$(uname -r)
50
+ uv pip install -e .
51
+ ```
52
+
53
+ ## CAN Bus Setup
54
+
55
+ ```bash
56
+ # Check detected CAN devices
57
+ ls -l /sys/class/net/can*
58
+
59
+ # Bring up interface at 1 Mbit/s
60
+ sudo ip link set can0 up type can bitrate 1000000
61
+
62
+ # Auto-enable on boot
63
+ sudo sh devices/install_devices.sh
64
+
65
+ # Reset unresponsive adapter
66
+ sh scripts/reset_all_can.sh
67
+ ```
68
+
69
+ ## YAM Arm
70
+
71
+ ### Zero-gravity mode
72
+
73
+ ```bash
74
+ python i2rt/robots/motor_chain_robot.py --channel can0 --gripper linear_4310
75
+ ```
76
+
77
+ ### Python API
78
+
79
+ ```python
80
+ from i2rt.robots.get_robot import get_yam_robot
81
+ from i2rt.robots.utils import GripperType
82
+ import numpy as np
83
+
84
+ robot = get_yam_robot(channel="can0", gripper_type=GripperType.LINEAR_4310)
85
+
86
+ # Read joint positions (radians)
87
+ q = robot.get_joint_pos() # shape: (6,)
88
+
89
+ # Command a target configuration
90
+ robot.command_joint_pos(np.zeros(6))
91
+ ```
92
+
93
+ ### Leader-follower teleoperation
94
+
95
+ ```bash
96
+ # Follower arm
97
+ python examples/minimum_gello/minimum_gello.py --gripper linear_4310 --mode follower --can-channel can0 --bilateral-kp 0.2
98
+
99
+ # Leader arm (teaching handle)
100
+ python examples/minimum_gello/minimum_gello.py --gripper yam_teaching_handle --mode leader --can-channel can1 --bilateral-kp 0.2
101
+ ```
102
+
103
+ - **Top button (press once):** enable synchronisation — follower tracks leader
104
+ - **Top button (press again):** disable synchronisation
105
+ - `--bilateral-kp` controls resistance felt on the leader (0.1–0.2 recommended)
106
+
107
+ To inspect leader arm output:
108
+
109
+ ```bash
110
+ python scripts/run_yam_leader.py --channel $CAN_CHANNEL
111
+ ```
112
+
113
+ ### MuJoCo visualiser
114
+
115
+ ```bash
116
+ python examples/minimum_gello/minimum_gello.py --mode visualizer_local
117
+ ```
118
+
119
+ ## Gripper Types
120
+
121
+ | Gripper | Motor | Notes |
122
+ |---------|-------|-------|
123
+ | `crank_4310` | DM4310 | Zero-linkage crank — minimises gripper width |
124
+ | `linear_3507` | DM3507 | Lightweight linear; start closed or run calibration |
125
+ | `linear_4310` | DM4310 | Standard linear; slightly more force than 3507 |
126
+ | `yam_teaching_handle` | — | Leader arm handle with trigger + 2 buttons. |
127
+
128
+ The linear grippers require calibration because their motor travels more than 2π radians over the full stroke — either start with the gripper fully closed, or run the calibration routine.
129
+
130
+ ## Flow Base
131
+
132
+ ```bash
133
+ # Joystick demo
134
+ python i2rt/flow_base/flow_base_controller.py
135
+ ```
136
+
137
+ ```python
138
+ from i2rt.flow_base.flow_base_client import FlowBaseClient
139
+
140
+ client = FlowBaseClient(host="172.6.2.20")
141
+ client.set_target_velocity([0.1, 0.0, 0.0], frame="local")
142
+ ```
143
+
144
+ ## Examples
145
+
146
+ | Example | Location |
147
+ |---------|----------|
148
+ | Bimanual lead-follower | `examples/bimanual_lead_follower/` |
149
+ | Record & replay trajectory | `examples/record_replay_trajectory/` |
150
+ | Single motor PD control | `examples/single_motor_position_pd_control/` |
151
+ | MuJoCo control interface | `examples/control_with_mujoco/` |
152
+
153
+ ## Advanced: Motor Configuration
154
+
155
+ ### Safety timeout
156
+
157
+ The factory default is a **400 ms timeout** — motors enter damping mode if no command is received within 400 ms.
158
+
159
+ ```bash
160
+ # Disable timeout (advanced users only — run twice)
161
+ python i2rt/motor_config_tool/set_timeout.py --channel can0
162
+ python i2rt/motor_config_tool/set_timeout.py --channel can0
163
+
164
+ # Re-enable timeout
165
+ python i2rt/motor_config_tool/set_timeout.py --channel can0 --timeout
166
+ ```
167
+
168
+ > ⚠️ Without the timeout, a failed gravity-compensation loop can produce uncontrolled torque. If you disable it, always initialise with a PD target:
169
+ > ```python
170
+ > robot = get_yam_robot(channel="can0", zero_gravity_mode=False)
171
+ > ```
172
+
173
+ ### Zero motor offsets
174
+
175
+ ```bash
176
+ python i2rt/motor_config_tool/set_zero.py --channel can0 --motor_id 1
177
+ ```
178
+
179
+ Run for each motor ID (1–6 for a standard YAM).
180
+
181
+ ## Contributing
182
+
183
+ Pull requests welcome. Open an issue to request examples or report bugs.
184
+
185
+ ## License
186
+
187
+ MIT License — see [LICENSE](LICENSE).
188
+
189
+ ## Support
190
+
191
+ - Email: support@i2rt.com
192
+ - Sales: sales@i2rt.com
193
+
194
+ ## Acknowledgments
195
+
196
+ - [TidyBot++](https://github.com/jimmyyhwu/tidybot2) — Flow Base hardware and control inspired by TidyBot++
197
+ - [GELLO](https://github.com/wuphilipp/gello_software) — Teleoperation design inspired by GELLO
@@ -0,0 +1 @@
1
+ """i2rt code base"""