This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import ch.psi.pshell.imaging.MjpegSource as MjpegSource
|
||||
MjpegSource2 = get_context().pluginManager.getDynamicClass("MjpegSource2")
|
||||
add_device(MjpegSource("gripper_cam", "http://129.129.110.114/axis-cgi/mjpg/video.cgi"), True)
|
||||
add_device(MjpegSource("gripper_cam", "http://axis-accc8e9cc87b.psi.ch/axis-cgi/mjpg/video.cgi"), True)
|
||||
#gripper_cam.polling=1000
|
||||
gripper_cam.monitored = True
|
||||
show_panel(gripper_cam)
|
||||
23
script/test/TestEuclidean.py
Normal file
23
script/test/TestEuclidean.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import org.apache.commons.math3.geometry.euclidean.threed.Segment as Segment
|
||||
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D as Vector3D
|
||||
import org.apache.commons.math3.geometry.euclidean.threed.Line as Line
|
||||
|
||||
|
||||
p = Vector3D(0, 0, 3)
|
||||
|
||||
p1 = Vector3D(0,0,0)
|
||||
p2 = Vector3D(0,1,1 )
|
||||
tolerance = 0.001
|
||||
|
||||
l = Line(p1, p2, tolerance)
|
||||
|
||||
|
||||
print l.distance(p)
|
||||
print p1.distance(p)
|
||||
print p2.distance(p)
|
||||
print "---"
|
||||
|
||||
print l.getAbscissa(p)
|
||||
print l.pointAt(l.getAbscissa(p))
|
||||
|
||||
#print l.closestPoint(Line(p, p, 0.01))
|
||||
@@ -2,8 +2,8 @@ import ch.psi.pshell.serial.TcpDevice as TcpDevice
|
||||
import ch.psi.pshell.serial.UdpDevice as UdpDevice
|
||||
|
||||
|
||||
microscan = TcpDevice("microscan", "129.129.126.200:2001")
|
||||
#microscan = UdpDevice("microscan", "129.129.126.200:2001")
|
||||
microscan = TcpDevice("microscan", "MicroHAWK38C528:2001")
|
||||
#microscan = UdpDevice("microscan", "MicroHAWK38C528:2001")
|
||||
microscan.initialize()
|
||||
|
||||
|
||||
|
||||
15
script/test/TestRecover.py
Normal file
15
script/test/TestRecover.py
Normal file
@@ -0,0 +1,15 @@
|
||||
print "Pos=" + str(robot.get_cartesian_pos())
|
||||
for p in robot.get_known_points():
|
||||
print p + " = " + str(get_pnt(p))
|
||||
|
||||
print "-------------"
|
||||
|
||||
for segment in known_segments:
|
||||
is_on_segment(segment)
|
||||
|
||||
print "-------------"
|
||||
for segment in known_segments:
|
||||
try:
|
||||
move_to_segment(segment)
|
||||
except:
|
||||
print sys.exc_info()[1]
|
||||
Reference in New Issue
Block a user