Source

puma / Joint.py

#!/usr/bin/python
# DH parameters for a robot joint.
# Used by the FK and IK libraries.

from math import pi

class Joint(object):
	def __init__(self, d, a, theta, scale, coupling):
		if scale == 0:
			raise Exception("Invalid scale")
		self.d = d
		self.a = a
		self.theta = theta * pi / 180
		self.scale = scale / pi
		self.coupling = coupling