Merge branch 'master' into terminalControl-with-RobotLib
This commit is contained in:
@@ -2,3 +2,5 @@
|
||||
Controlling the joy-it robotarm using a raspberry pi.
|
||||
terminalControl.py: used for communiction with robotarm for example over SSH. Documentation following
|
||||
databaseCreator.py: used for creating a database with all the possible communications of the angles of the servos
|
||||
|
||||
RobotLib is a selfmade python library, to describe any 2D RobotArm, with 3 Servos but especially for the joy-it Robotarm
|
||||
|
||||
+4
-3
@@ -42,7 +42,8 @@ class Robot:
|
||||
else:
|
||||
self.delta = self.deg
|
||||
self.total_angle_deg = self.deg
|
||||
self.total_angle_rad = self._get_rad(self.total_angle_deg)
|
||||
if self.delta < 0:
|
||||
self.delta *= -1
|
||||
|
||||
def set_angle(self, angle):
|
||||
self.deg = angle
|
||||
@@ -143,8 +144,8 @@ class Robot:
|
||||
def serialize(self):
|
||||
string = ""
|
||||
for entry in self.database:
|
||||
string += "{},{}:{},{},{}\n".format(str(entry.x), str(entry.y), str(entry.s1.deg), str(entry.s2.deg),
|
||||
str(entry.s3.deg))
|
||||
string += "{},{}:{},{},{}\n".format(str(entry.x), str(entry.y), str(entry.s1), str(entry.s2),
|
||||
str(entry.s3))
|
||||
return string
|
||||
|
||||
def deserialize(self, string):
|
||||
|
||||
+1238
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ from RobotLib import *
|
||||
|
||||
class Looper:
|
||||
def __init__(self, Robot):
|
||||
self.stepsize = 0.3
|
||||
self.stepsize = 1
|
||||
self.robot = Robot
|
||||
|
||||
def run(self):
|
||||
|
||||
Reference in New Issue
Block a user