Merge branch 'master' into terminalControl-with-RobotLib

This commit is contained in:
lade043
2019-05-19 10:02:20 +02:00
committed by GitHub
4 changed files with 1245 additions and 4 deletions
+2
View File
@@ -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
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -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):