Skip to content

Commit 745c93e

Browse files
author
Leonid Fedorenchik
committed
Pro630: elephantrobot: Add get_angle() and get_coord()
1 parent 99d450e commit 745c93e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pymycobot/elephantrobot.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,21 @@ def get_angles(self):
207207
res = self.send_command(command)
208208
return self.string_to_coords(res)
209209

210+
def get_angle(self, joint):
211+
command = "get_angle(" + str(joint) + ")\n"
212+
res = self.send_command(command)
213+
return self.string_to_double(res)
214+
210215
def get_coords(self):
211216
command = "get_coords()\n"
212217
res = self.send_command(command)
213218
return self.string_to_coords(res)
214219

220+
def get_coord(self, axis):
221+
command = "get_coord(" + str(axis) + ")\n"
222+
res = self.send_command(command)
223+
return self.string_to_double(res)
224+
215225
def get_speed(self):
216226
command = "get_speed()\n"
217227
res = self.send_command(command)

0 commit comments

Comments
 (0)