Skip to content

Commit

Permalink
1. Fix the issue of Mercury API: drag_teach_clean not being able to b…
Browse files Browse the repository at this point in the history
…e used

2. Unified naming convention for Mercury drag teaching API
3. Clean up excess files
  • Loading branch information
anla-xu committed Apr 23, 2024
1 parent 99d5324 commit 9216ab5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 77 deletions.
6 changes: 3 additions & 3 deletions docs/Mercury_API.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,16 +470,16 @@ print(mc.get_angles())

### 11. Drag Teaching

#### `drag_tech_save()`
#### `drag_teach_save()`

- **function:** Start recording and dragging teaching points.
- Note: In order to display the best sports effect, the recording time should not exceed 90 seconds

#### `drag_tech_pause()`
#### `drag_teach_pause()`

- **function:** Pause sampling

#### `drag_tech_execute()`
#### `drag_teach_execute()`

- **function:** Start dragging the teach-in point, executing it only once.

Expand Down
2 changes: 1 addition & 1 deletion pymycobot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
from pymycobot.mybuddyemoticon import MyBuddyEmoticon
__all__.append("MyBuddyEmoticon")

__version__ = "3.4.6b1"
__version__ = "3.4.6"
__author__ = "Elephantrobotics"
__email__ = "[email protected]"
__git_url__ = "https://github.com/elephantrobotics/pymycobot"
Expand Down
2 changes: 1 addition & 1 deletion pymycobot/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def _mesg(self, genre, *args, **kwargs):

elif genre in [76, 77]:
command_data = [command_data[0]] + self._encode_int16(command_data[1]*10)
elif genre == 115 and self.__class__.__name__ not in ["MyArmC", "MyArmM"]:
elif genre == 115 and self.__class__.__name__ not in ["MyArmC", "MyArmM", "Mercury"]:
command_data = [command_data[1],command_data[3]]
LEN = len(command_data) + 2

Expand Down
6 changes: 3 additions & 3 deletions pymycobot/mercury_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ def jog_base_coord(self, axis, direction, speed):
"""
return self._mesg(ProtocolCode.MERCURY_JOG_BASE_COORD, axis, direction, speed)

def drag_tech_save(self):
def drag_teach_save(self):
"""Start recording the dragging teaching point. In order to show the best sports effect, the recording time should not exceed 90 seconds."""
return self._mesg(ProtocolCode.MERCURY_DRAG_TECH_SAVE)

def drag_tech_execute(self):
def drag_teach_execute(self):
"""Start dragging the teaching point and only execute it once."""
return self._mesg(ProtocolCode.MERCURY_DRAG_TECH_EXECUTE)

def drag_tech_pause(self):
def drag_teach_pause(self):
"""Pause recording of dragging teaching point"""
self._mesg(ProtocolCode.MERCURY_DRAG_TECH_PAUSE)

Expand Down
3 changes: 3 additions & 0 deletions pymycobot/mercurychassis.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class MercuryChassisError(Exception):
pass

class MercuryChassis:
"""
Mercury X1 mobile chassis car socket class
"""
def __init__(self, ip=None):
self.ifname = b"wlan0"
self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Expand Down
69 changes: 0 additions & 69 deletions pymycobot/mercurychassisocket.py

This file was deleted.

0 comments on commit 9216ab5

Please sign in to comment.