Skip to content

Commit 4a6d9d9

Browse files
author
Leonid Fedorenchik
committed
Merge remote-tracking branch 'github/main'
2 parents c499ab8 + 6d186d6 commit 4a6d9d9

18 files changed

+1311
-108
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# ChangeLog for pymycobot
22

3+
## v3.6.3 (2024-10-17)
4+
5+
- release v3.6.3
6+
- Fix bug and add new function
7+
38
## v3.6.2 (2024-10-11)
49

510
- release v3.6.2

docs/MechArm_270_en.md

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ mc.send_angle(1, 40, 20)
7272
- Attentions:After the joint is disabled, it needs to be enabled to control within 1 second
7373
- **Parameters**`data`(optional):The way to relax the joints. The default is damping mode, and if the 'data' parameter is provided, it can be specified as non damping mode (1- Undamping).
7474

75-
#### `focus_servos(servo_id)`
75+
#### `focus_servo(servo_id)`
7676

7777
- **function:** Power on designated servo
7878

@@ -114,6 +114,21 @@ mc.send_angle(1, 40, 20)
114114
- `1`: Always execute the latest command first.
115115
- `0`: Execute instructions sequentially in the form of a queue.
116116

117+
#### `focus_all_servos()`
118+
119+
- **Function:** All servos are powered on
120+
121+
- **Return value:**
122+
- `1`: complete
123+
124+
#### `set_vision_mode()`
125+
126+
- **Function:** Set the vision tracking mode, limit the posture flipping of send_coords in refresh mode. (Applicable only to vision tracking function)
127+
128+
- **Parameter:**
129+
- `1`: open
130+
- `0`: close
131+
117132
### 3.MDI Mode and Operation
118133

119134
#### `get_angles()`
@@ -182,20 +197,22 @@ mc.send_angle(1, 40, 20)
182197
- `0` - not stop
183198
- `-1` - error
184199

185-
#### `sync_send_angles(angles, speed)`
200+
#### `sync_send_angles(angles, speed, timeout=15)`
186201

187202
- **function:** Send the angle in synchronous state and return when the target point is reached
188203
- **Parameters:**
189204
- `angles`: a list of degree value(`List[float]`), length 6
190205
- `speed`: (`int`) 1 ~ 100
206+
- `timeout`: default 15 s
191207

192-
#### `sync_send_coords(coords, mode, speed)`
208+
#### `sync_send_coords(coords, speed, mode=0, timeout=15)`
193209

194210
- **function:** Send the coord in synchronous state and return when the target point is reached
195211
- **Parameters:**
196212
- `coords`: a list of coord value(`List[float]`), length 6
197213
- `speed`: (`int`) 1 ~ 100
198214
- `mode`: (`int`) 0 - angular(default), 1 - linear
215+
- `timeout`: default 15 s
199216

200217
#### `get_angles_coords()`
201218

@@ -244,6 +261,21 @@ mc.send_angle(1, 40, 20)
244261
- `0` not moving
245262
- `-1` error
246263

264+
#### `angles_to_coords(angles)`
265+
266+
- **Function** : Convert angles to coordinates.
267+
- **Parameters:**
268+
- `angles`: `list` List of floating points for all angles.
269+
- **Return value**: `list` List of floating points for all coordinates.
270+
271+
#### `solve_inv_kinematics(target_coords, current_angles)`
272+
273+
- **Function** : Convert coordinates to angles.
274+
- **Parameters:**
275+
- `target_coords`: `list` List of floating points for all coordinates.
276+
- `current_angles`: `list` List of floating points for all angles, current angles of the robot
277+
- **Return value**: `list` List of floating points for all angles.
278+
247279
### 4. JOG Mode and Operation
248280

249281
#### `jog_angle(joint_id, direction, speed)`
@@ -270,14 +302,24 @@ mc.send_angle(1, 40, 20)
270302
- `direction`: (`int`) To control the direction of machine arm movement, `1` - forward rotation, `0` - reverse rotation
271303
- `speed`: (`int`) 1 ~ 100
272304

273-
#### `jog_increment(joint_id, increment, speed)`
305+
#### `jog_increment_angle(joint_id, increment, speed)`
274306

275-
- **function:** Single joint angle increment control
307+
- **function:** Angle step, single joint angle increment control
276308
- **Parameters**:
277309
- `joint_id`: 1-6
278310
- `increment`: Incremental movement based on the current position angle
279311
- `speed`: 1 ~ 100
280312

313+
#### `jog_increment_coord(id, increment, speed)`
314+
315+
- **function:** Coord step, single coord increment control
316+
- **Parameters**:
317+
- `id`: axis 1-6
318+
- `increment`: Incremental movement based on the current position coord
319+
- `speed`: 1 ~ 100
320+
- **Return value:**
321+
- `1`: completed
322+
281323
#### `set_encoder(joint_id, encoder, speed)`
282324

283325
- **function**: Set a single joint rotation to the specified potential value

docs/MechArm_270_zh.md

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ mc.send_angle(1, 40, 20)
7171
- **功能:** 放松所有机械臂关节
7272
- **参数**`data`(可选):关节放松方式,默认为阻尼模式,若提供 `data`参数可指定为非阻尼模式(1-Undamping)。
7373

74-
#### `focus_servos(servo_id)`
74+
#### `focus_servo(servo_id)`
7575

7676
- **功能:** 单个舵机上电
7777

@@ -113,6 +113,24 @@ mc.send_angle(1, 40, 20)
113113
- `1`: 总是首先执行最新的命令。
114114
- `0`: 以队列的形式按顺序执行指令。
115115

116+
#### `focus_all_servos()`
117+
118+
- **功能:** 所有舵机上电
119+
120+
- **返回值:**
121+
- `1`: complete
122+
123+
#### `set_vision_mode()`
124+
125+
- **功能:** 设置视觉跟踪模式,限制刷新模式下send_coords的姿态翻转。(仅适用于视觉跟踪功能)
126+
127+
- **参数:**
128+
- `1`: 打开
129+
- `0`: 关闭
130+
131+
- **返回值:**
132+
- `1`: 完成
133+
116134
### 3. MDI运行与操作
117135

118136
#### `get_angles()`
@@ -181,20 +199,22 @@ mc.send_angle(1, 40, 20)
181199
- `0` - 没有停止
182200
- `-1` - 错误
183201

184-
#### `sync_send_angles(angles, speed)`
202+
#### `sync_send_angles(angles, speed, timeout=15)`
185203

186204
- **功能:** 同步状态下发送角度,到达目标点后返回
187205
- **参数:**
188206
- `angles`:角度值列表(`List[float]`),长度 6
189207
- `speed`:(`int`)1 ~ 100
208+
- `timeout`: 默认15秒
190209

191-
#### `sync_send_coords(coords, mode, speed)`
210+
#### `sync_send_coords(coords, speed,mode=0, timeout=15)`
192211

193212
- **功能:** 同步状态下发送坐标,到达目标点后返回
194213
- **参数:**
195214
- `coords`:坐标值列表(`List[float]`),长度6
196215
- `speed`:(`int`)1~100
197216
- `mode`:(`int`)0-非线性(默认),1-直线运动
217+
- `timeout`: 默认15秒
198218

199219
#### `get_angles_coords()`
200220

@@ -243,6 +263,21 @@ mc.send_angle(1, 40, 20)
243263
- `0` 未运动
244264
- `-1` 错误
245265

266+
#### `angles_to_coords(angles)`
267+
268+
- **功能** : 将角度转为坐标。
269+
- **参数:**
270+
- `angles``list` 所有角度的浮点列表。
271+
- **返回值**: `list` 所有坐标的浮点列表。
272+
273+
#### `solve_inv_kinematics(target_coords, current_angles)`
274+
275+
- **功能** : 将坐标转为角度。
276+
- **参数:**
277+
- `target_coords`: `list` 所有坐标的浮点列表。
278+
- `current_angles`: `list` 所有角度的浮点列表,机械臂当前角度
279+
- **返回值**: `list` 所有角度的浮点列表。
280+
246281
### 4. JOG运行与操作
247282

248283
#### `jog_angle(joint_id, direction, speed)`
@@ -269,22 +304,32 @@ mc.send_angle(1, 40, 20)
269304
- `direction`: (`int`) 控制机臂运动方向,`1` - 正转,`0` - 反转
270305
- `speed`: (`int`) 1 ~ 100
271306

272-
#### `jog_increment(joint_id, increment, speed)`
307+
#### `jog_increment_angle(joint_id, increment, speed)`
273308

274-
- **功能**:单关节角度增量控制
309+
- **功能**角度步进,单关节角度增量控制
275310
- **参数**
276311
- `joint_id`:1-6
277312
- `increment`:基于当前位置角度的增量移动
278313
- `speed`:1~100
279314

315+
#### `jog_increment_coord(id, increment, speed)`
316+
317+
- **功能**:坐标步进,单坐标增量控制
318+
- **参数**
319+
- `id`:坐标 id 1-6
320+
- `increment`:基于当前位置坐标的增量移动
321+
- `speed`:1~100
322+
- **返回值**
323+
- `1`:完成
324+
280325
#### `set_encoder(joint_id,coder,speed)`
281326

282327
- **功能**:设置单关节旋转为指定的潜在值
283328

284329
- **参数**
285-
- `joint_id`:(`int`) 1-6
286-
- `encoder`:0~4096
287-
- `speed`:1~100
330+
- `joint_id`:(`int`) 1-6
331+
- `encoder`:0~4096
332+
- `speed`:1~100
288333

289334
#### `get_encoder(joint_id)`
290335

docs/MyCobot_280_en.md

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ mc.send_angle(1, 40, 20)
8080
- **Return value:**
8181
- `1` - release completed.
8282

83-
#### `focus_servos(servo_id)`
83+
#### `focus_servo(servo_id)`
8484

8585
- **function:** Power on designated servo
8686

@@ -147,6 +147,24 @@ mc.send_angle(1, 40, 20)
147147
- `1`: free mode
148148
- `0`: on-free mode
149149

150+
#### `focus_all_servos()`
151+
152+
- **Function:** All servos are powered on
153+
154+
- **Return value:**
155+
- `1`: complete
156+
157+
#### `set_vision_mode()`
158+
159+
- **Function:** Set the vision tracking mode, limit the posture flipping of send_coords in refresh mode. (Applicable only to vision tracking function)
160+
161+
- **Parameter:**
162+
- `1`: open
163+
- `0`: close
164+
165+
- **Return value:**
166+
- `1`: complete
167+
150168
### 3.MDI Mode and Operation
151169

152170
#### `get_angles()`
@@ -223,24 +241,26 @@ mc.send_angle(1, 40, 20)
223241
- `0` - not stop
224242
- `-1` - error
225243

226-
#### `sync_send_angles(angles, speed)`
244+
#### `sync_send_angles(angles, speed, timeout=15)`
227245

228246
- **function:** Send the angle in synchronous state and return when the target point is reached
229247
- **Parameters:**
230248
- `angles`: a list of degree value(`List[float]`), length 6
231249
- `speed`: (`int`) 1 ~ 100
250+
- `timeout`: default 15 s
232251
- **Return value:**
233-
- `1`: complete
252+
- `1` - complete
234253

235-
#### `sync_send_coords(coords, mode, speed)`
254+
#### `sync_send_coords(coords, speed, mode=0, timeout=15)`
236255

237256
- **function:** Send the coord in synchronous state and return when the target point is reached
238257
- **Parameters:**
239258
- `coords`: a list of coord value(`List[float]`), length 6
240259
- `speed`: (`int`) 1 ~ 100
241260
- `mode`: (`int`) 0 - angular(default), 1 - linear
261+
- `timeout`: default 15 s
242262
- **Return value:**
243-
- `1`: complete
263+
- `1` - complete
244264

245265
#### `get_angles_coords()`
246266

@@ -291,6 +311,21 @@ mc.send_angle(1, 40, 20)
291311
- `0` not moving
292312
- `-1` error
293313

314+
#### `angles_to_coords(angles)`
315+
316+
- **Function** : Convert angles to coordinates.
317+
- **Parameters:**
318+
- `angles`: `list` List of floating points for all angles.
319+
- **Return value**: `list` List of floating points for all coordinates.
320+
321+
#### `solve_inv_kinematics(target_coords, current_angles)`
322+
323+
- **Function** : Convert coordinates to angles.
324+
- **Parameters:**
325+
- `target_coords`: `list` List of floating points for all coordinates.
326+
- `current_angles`: `list` List of floating points for all angles, current angles of the robot
327+
- **Return value**: `list` List of floating points for all angles.
328+
294329
### 4. JOG Mode and Operation
295330

296331
#### `jog_angle(joint_id, direction, speed)`
@@ -323,13 +358,25 @@ mc.send_angle(1, 40, 20)
323358
- **Return value:**
324359
- `1`: complete
325360

326-
#### `jog_increment(joint_id, increment, speed)`
361+
#### `jog_increment_angle(joint_id, increment, speed)`
327362

328-
- **function:** Single joint angle increment control
363+
- **function:** Angle step, single joint angle increment control
329364
- **Parameters**:
330365
- `joint_id`: 1-6
331366
- `increment`: Incremental movement based on the current position angle
332367
- `speed`: 1 ~ 100
368+
- **Return value:**
369+
- `1`: completed
370+
371+
#### `jog_increment_coord(id, increment, speed)`
372+
373+
- **function:** Coord step, single coord increment control
374+
- **Parameters**:
375+
- `id`: axis 1-6
376+
- `increment`: Incremental movement based on the current position coord
377+
- `speed`: 1 ~ 100
378+
- **Return value:**
379+
- `1`: completed
333380

334381
#### `set_encoder(joint_id, encoder, speed)`
335382

0 commit comments

Comments
 (0)