Skip to content

Commit 8479d33

Browse files
authored
Merge pull request petercorke#256 from jskinn/future
Add Puma560
2 parents 84f07b7 + 0b40253 commit 8479d33

16 files changed

+1567
-55
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env python
2+
"""
3+
@author John Skinner
4+
"""
5+
6+
import swift
7+
import roboticstoolbox as rp
8+
import spatialmath as sm
9+
import numpy as np
10+
11+
env = swift.Swift()
12+
env.launch(realtime=True)
13+
14+
# Create a puma in the default zero pose
15+
puma = rp.models.Puma560()
16+
puma.q = puma.qz
17+
env.add(puma, show_robot=True, show_collision=False)
18+
19+
dt = 0.05
20+
interp_time = 5
21+
wait_time = 2
22+
23+
# Pass through the reference poses one by one.
24+
# This ignores the robot collisions, and may pass through itself
25+
poses = [puma.qz, puma.rd, puma.ru, puma.lu, puma.ld]
26+
for previous, target in zip(poses[:-1], poses[1:]):
27+
for alpha in np.linspace(0.0, 1.0, int(interp_time / dt)):
28+
puma.q = previous + alpha * (target - previous)
29+
env.step(dt)
30+
for _ in range(int(wait_time / dt)):
31+
puma.q = target
32+
env.step(dt)
33+
34+
# Uncomment to stop the browser tab from closing
35+
env.hold()

roboticstoolbox/models/URDF/Puma560.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,21 @@ def __init__(self):
5353
self.manufacturer = "Unimation"
5454
# self.ee_link = self.ets[9]
5555

56-
# zero angles, L shaped pose
56+
# zero angles, upper arm horizontal, lower up straight up
5757
self.addconfiguration("qz", np.array([0, 0, 0, 0, 0, 0]))
5858

59+
# reference pose, arm to the right, elbow up
60+
self.addconfiguration("ru", np.array([-0.0000, 0.7854, 3.1416, -0.0000, 0.7854, 0.0000]))
61+
62+
# reference pose, arm to the right, elbow up
63+
self.addconfiguration("rd", np.array([-0.0000, -0.8335, 0.0940, -3.1416, 0.8312, 3.1416]))
64+
65+
# reference pose, arm to the left, elbow up
66+
self.addconfiguration("lu", np.array([2.6486, -3.9270, 0.0940, 2.5326, 0.9743, 0.3734]))
67+
68+
# reference pose, arm to the left, elbow down
69+
self.addconfiguration("ld", np.array([2.6486, -2.3081, 3.1416, 0.6743, 0.8604, 2.6611]))
70+
5971
# ready pose, arm up
6072
self.addconfiguration("qr", np.array([0, pi / 2, -pi / 2, 0, 0, 0]))
6173

rtb-data/rtbdata/xacro/puma560_description/meshes/puma560_collision1.dae

Lines changed: 101 additions & 0 deletions
Large diffs are not rendered by default.

rtb-data/rtbdata/xacro/puma560_description/meshes/puma560_collision2.dae

Lines changed: 104 additions & 0 deletions
Large diffs are not rendered by default.

rtb-data/rtbdata/xacro/puma560_description/meshes/puma560_collision3.dae

Lines changed: 101 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
<asset>
4+
<contributor>
5+
<author>Blender User</author>
6+
<authoring_tool>Blender 2.93.1 commit date:2021-06-22, commit time:05:57, hash:1b8d33b18c2f</authoring_tool>
7+
</contributor>
8+
<created>2021-07-26T14:56:50</created>
9+
<modified>2021-07-26T14:56:50</modified>
10+
<unit name="meter" meter="1"/>
11+
<up_axis>Z_UP</up_axis>
12+
</asset>
13+
<library_effects>
14+
<effect id="Material-effect">
15+
<profile_COMMON>
16+
<technique sid="common">
17+
<lambert>
18+
<emission>
19+
<color sid="emission">0 0 0 1</color>
20+
</emission>
21+
<diffuse>
22+
<color sid="diffuse">0.8 0.8 0.8 1</color>
23+
</diffuse>
24+
<index_of_refraction>
25+
<float sid="ior">1.45</float>
26+
</index_of_refraction>
27+
</lambert>
28+
</technique>
29+
</profile_COMMON>
30+
</effect>
31+
</library_effects>
32+
<library_images/>
33+
<library_materials>
34+
<material id="Material-material" name="Material">
35+
<instance_effect url="#Material-effect"/>
36+
</material>
37+
</library_materials>
38+
<library_geometries>
39+
<geometry id="Body1_014-mesh" name="Body1.014">
40+
<mesh>
41+
<source id="Body1_014-mesh-positions">
42+
<float_array id="Body1_014-mesh-positions-array" count="147">-0.05411982 0 0 -0.09332519 0 0.08613592 -0.1176518 0 0.04782313 0.35179 0 -0.04063999 0.35179 0.0762 0.04063993 0.35179 0.0762 -0.04063999 0.35179 0 0.04063993 -0.006799936 0.07619994 0 -0.09332519 0.07619994 0.08613592 -0.09332525 0.07619994 -0.08613586 -0.1068916 0.07619994 -0.06857973 -0.1126896 0.07619994 -0.05856651 -0.1176518 0.07619994 -0.04782313 -0.1216555 0.07619994 -0.03645431 -0.1245966 0.07619994 -0.02459031 -0.1263948 0.07619994 -0.01238304 -0.127 0.07619994 0 -0.1263948 0.07619994 0.01238304 -0.1245966 0.07619994 0.02459031 -0.1216555 0.07619994 0.03645431 -0.1176518 0.07619994 0.04782319 -0.1126896 0.07619994 0.05856651 -0.1068916 0.07619994 0.06857973 -0.09332525 0 -0.08613586 -0.1068916 0 -0.06857973 -0.1126896 0 -0.05856651 -0.1176518 0 -0.04782313 -0.1216555 0 -0.03645431 -0.1245966 0 -0.02459031 -0.1263948 0 -0.01238304 -0.127 0 0 -0.1263948 0 0.01238304 -0.1245966 0 0.02459031 -0.1216555 0 0.03645431 -0.1126896 0 0.05856651 -0.1068916 0 0.06857973 -0.1068916 0.03809994 -0.06857973 -0.1126896 0.03809994 -0.05856651 -0.1176518 0.03809994 -0.04782313 -0.1216555 0.03809994 -0.03645431 -0.1245966 0.03809994 -0.02459031 -0.1263948 0.03809994 -0.01238304 -0.127 0.03809994 0 -0.1263948 0.03809994 0.01238304 -0.1245966 0.03809994 0.02459031 -0.1216555 0.03809994 0.03645431 -0.1176518 0.03809994 0.04782313 -0.1126896 0.03809994 0.05856651 -0.1068916 0.03809994 0.06857973</float_array>
43+
<technique_common>
44+
<accessor source="#Body1_014-mesh-positions-array" count="49" stride="3">
45+
<param name="X" type="float"/>
46+
<param name="Y" type="float"/>
47+
<param name="Z" type="float"/>
48+
</accessor>
49+
</technique_common>
50+
</source>
51+
<source id="Body1_014-mesh-normals">
52+
<float_array id="Body1_014-mesh-normals-array" count="258">1 0 3.66662e-7 1 0 3.66662e-7 0 1 1.27814e-7 0 1 0 1.41448e-7 1 6.93051e-7 0 1 0 0 1 1.30417e-6 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 -1.30417e-6 0 1 6.65291e-7 -2.38786e-7 1 0 0 1 0 0.1016817 0 -0.994817 0.1016817 0 -0.994817 0 -1 0 -0.7912801 0 -0.6114538 -0.7912802 0 -0.6114537 -0.8653915 0 -0.5010964 -0.8653913 0 -0.5010969 -0.9078422 0 -0.419312 -0.9078422 0 -0.4193122 -0.9432175 0 -0.3321759 -0.9432175 0 -0.3321759 -0.9706214 0 -0.2406121 -0.9706214 0 -0.240612 -0.9893234 0 -0.1457366 -0.9893235 0 -0.1457366 -0.9988081 0 -0.04880982 -0.9988082 0 -0.04880982 -0.9988082 0 0.04880982 -0.9988081 0 0.04880982 -0.9893234 0 0.1457366 -0.9893235 0 0.1457366 -0.9706214 0 0.2406122 -0.9706213 0 0.2406122 -0.9432175 0 0.3321758 -0.9432175 0 0.332176 -0.9078422 0 0.4193121 -0.9078422 0 0.4193119 -0.8653915 0 0.5010964 -0.8653917 0 0.501096 -0.7912796 0 0.6114546 -0.7912799 0 0.6114543 -0.7912797 0 0.6114543 -0.8653918 0 0.501096 -0.9078423 0 0.4193119 -0.9432175 0 0.332176 -0.9432175 0 0.3321757 -0.9706214 0 0.2406123 -0.9706214 0 0.2406122 -0.9893234 0 0.1457366 -0.9893234 0 0.1457366 -0.9988081 0 -0.04880982 -0.9988082 0 -0.04880982 -0.9893234 0 -0.1457366 -0.9893234 0 -0.1457366 -0.9706214 0 -0.2406121 -0.9706215 0 -0.2406119 -0.9432174 0 -0.3321762 -0.9432176 0 -0.3321756 -0.9078422 0 -0.4193122 -0.8653916 5.28145e-7 -0.5010963 -0.7912801 0 -0.611454 0.1016818 0 0.994817 0.1016818 0 0.994817 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0</float_array>
53+
<technique_common>
54+
<accessor source="#Body1_014-mesh-normals-array" count="86" stride="3">
55+
<param name="X" type="float"/>
56+
<param name="Y" type="float"/>
57+
<param name="Z" type="float"/>
58+
</accessor>
59+
</technique_common>
60+
</source>
61+
<source id="Body1_014-mesh-map-0">
62+
<float_array id="Body1_014-mesh-map-0-array" count="564">8.128001 0 6.604 -3.81 8.128001 -7.62 0 0 4.064 -1.27 8.128001 0 3.236087 -33.70051 3.935455 -6.525074 0.8565855 -28.36458 -7.580505 -0.7748153 -7.580665 0.7732554 -8.613593 9.332526 -8.613593 9.332526 -4.454098 6.18267 -6.857976 10.68916 -6.857976 10.68916 -3.127474 6.948619 -5.856652 11.26897 -5.856652 11.26897 -3.127474 6.948619 -4.782318 11.76518 -4.782318 11.76518 -1.617169 7.44642 -3.645436 12.16556 -3.645436 12.16556 0 8.253877 -2.459036 12.45966 -2.459036 12.45966 0 8.253877 -1.238306 12.63949 -1.238306 12.63949 0 8.253877 0 12.7 0 12.7 0 8.253877 1.238306 12.63949 1.238306 12.63949 0 8.253877 2.459036 12.45966 2.459036 12.45966 0 8.253877 3.645436 12.16556 3.645436 12.16556 1.617169 7.44642 4.782318 11.76518 4.782318 11.76518 3.127474 6.948619 5.856652 11.26897 5.856652 11.26897 3.127474 6.948619 6.857976 10.68916 6.857976 10.68916 4.454098 6.18267 8.613593 9.332526 8.613593 9.332526 7.580665 0.7732554 7.580505 -0.7748153 7.62 44.74343 0 44.74343 3.81 22.37172 3.81 22.37172 0 44.74343 0 34.58343 0 5.411987 4.451908 10.29162 3.645436 12.16556 0 30.85716 -7.62 30.85716 -3.81 28.37464 -3.81 28.37464 -7.62 30.85716 -7.62 28.37464 -3.81 28.37464 -7.62 28.37464 -3.81 27.13337 -3.81 27.13337 -7.62 28.37464 -7.62 27.13337 -3.81 27.13337 -7.62 27.13337 -3.81 25.89211 -3.81 25.89211 -7.62 27.13337 -7.62 25.89211 -3.81 25.89211 -7.62 25.89211 -3.81 24.65085 -3.81 24.65085 -7.62 25.89211 -7.62 24.65085 -3.81 24.65085 -7.62 24.65085 -3.81 23.40958 -3.81 23.40958 -7.62 24.65085 -7.62 23.40958 -3.81 23.40958 -7.62 23.40958 -3.81 22.16832 -3.81 22.16832 -7.62 23.40958 -7.62 22.16832 -3.81 22.16832 -7.62 22.16832 -3.81 20.92706 -3.81 20.92706 -7.62 22.16832 -7.62 20.92706 -3.81 20.92706 -7.62 20.92706 -3.81 19.6858 -3.81 19.6858 -7.62 20.92706 -7.62 19.6858 -3.81 19.6858 -7.62 19.6858 -3.81 18.44453 -3.81 18.44453 -7.62 19.6858 -7.62 18.44453 -3.81 18.44453 -7.62 18.44453 -3.81 17.20327 -3.81 17.20327 -7.62 18.44453 -7.62 17.20327 -3.81 17.20327 -7.62 17.20327 -3.81 15.96201 -3.81 15.96201 -7.62 17.20327 -7.62 15.96201 -3.81 15.96201 -7.62 15.96201 -3.81 14.72074 -3.81 14.72074 -7.62 15.96201 -7.62 14.72074 -3.81 14.72074 -7.62 14.72074 -3.81 13.47948 -3.81 13.47948 -7.62 14.72074 -7.62 13.47948 -3.81 13.47948 -7.62 13.47948 -7.62 10.99695 -7.62 10.99695 0 10.99695 -3.81 13.47948 -3.81 13.47948 0 10.99695 0 13.47948 -3.81 13.47948 0 13.47948 -3.81 14.72074 -3.81 14.72074 0 13.47948 0 14.72074 -3.81 14.72074 0 14.72074 -3.81 15.96201 -3.81 15.96201 0 14.72074 0 15.96201 -3.81 15.96201 0 15.96201 -3.81 17.20327 -3.81 17.20327 0 15.96201 0 17.20327 -3.81 17.20327 0 17.20327 -3.81 18.44453 -3.81 18.44453 0 17.20327 0 18.44453 -3.81 18.44453 0 18.44453 -3.81 19.6858 -3.81 19.6858 0 18.44453 0 19.6858 -3.81 19.6858 0 19.6858 -3.81 20.92706 -3.81 20.92706 0 19.6858 0 20.92706 -3.81 20.92706 0 20.92706 -3.81 22.16832 -3.81 22.16832 0 20.92706 0 22.16832 -3.81 22.16832 0 22.16832 -3.81 23.40958 -3.81 23.40958 0 22.16832 0 23.40958 -3.81 23.40958 0 23.40958 -3.81 24.65085 -3.81 24.65085 0 23.40958 0 24.65085 -3.81 24.65085 0 24.65085 -3.81 25.89211 -3.81 25.89211 0 24.65085 0 25.89211 -3.81 25.89211 0 25.89211 -3.81 27.13337 -3.81 27.13337 0 25.89211 0 27.13337 -3.81 27.13337 0 27.13337 -3.81 28.37464 -3.81 28.37464 0 27.13337 0 28.37464 -3.81 28.37464 0 28.37464 0 30.85716 0 44.74343 -7.62 44.74343 -3.81 22.37172 -3.81 22.37172 -7.62 44.74343 -7.62 0 4.064 -35.179 0 -34.29 -4.064 -35.179 8.613593 9.332526 5.207547 -15.22857 4.064 -35.179 5.856652 11.26897 0 5.411987 6.857976 10.68916 2.459036 12.45966 0 5.411987 3.645436 12.16556 1.238306 12.63949 0 5.411987 2.459036 12.45966 0 5.411987 1.238306 12.63949 0 9.979953 0 9.979953 -1.238306 12.63949 0 5.411987 0 5.411987 -1.238306 12.63949 -2.459036 12.45966 -4.451908 10.29162 -2.459036 12.45966 -3.645436 12.16556 -4.507652 10.56944 -3.645436 12.16556 -4.782318 11.76518 -5.095955 10.63036 -4.782318 11.76518 -5.856652 11.26897 -6.656299 6.001474 -5.856652 11.26897 -6.857976 10.68916 -7.244602 6.062395 -6.857976 10.68916 -8.613593 9.332526 -7.349833 5.723659 -8.613593 9.332526 -6.338796 -12.92324 4.557139 10.09154 0 5.411987 5.856652 11.26897 0 5.411987 6.656299 6.001474 6.857976 10.68916</float_array>
63+
<technique_common>
64+
<accessor source="#Body1_014-mesh-map-0-array" count="282" stride="2">
65+
<param name="S" type="float"/>
66+
<param name="T" type="float"/>
67+
</accessor>
68+
</technique_common>
69+
</source>
70+
<vertices id="Body1_014-mesh-vertices">
71+
<input semantic="POSITION" source="#Body1_014-mesh-positions"/>
72+
</vertices>
73+
<triangles material="Material-material" count="94">
74+
<input semantic="VERTEX" source="#Body1_014-mesh-vertices" offset="0"/>
75+
<input semantic="NORMAL" source="#Body1_014-mesh-normals" offset="1"/>
76+
<input semantic="TEXCOORD" source="#Body1_014-mesh-map-0" offset="2" set="0"/>
77+
<p>5 0 0 6 0 1 3 0 2 4 1 3 6 1 4 5 1 5 5 2 6 7 2 7 4 2 8 4 3 9 7 3 10 8 3 11 8 4 12 7 4 13 22 4 14 22 5 15 7 5 16 21 5 17 21 6 18 7 6 19 20 6 20 20 7 21 7 7 22 19 7 23 19 8 24 7 8 25 18 8 26 18 9 27 7 9 28 17 9 29 17 10 30 7 10 31 16 10 32 16 11 33 7 11 34 15 11 35 15 12 36 7 12 37 14 12 38 14 8 39 7 8 40 13 8 41 13 7 42 7 7 43 12 7 44 12 13 45 7 13 46 11 13 47 11 14 48 7 14 49 10 14 50 10 15 51 7 15 52 9 15 53 9 16 54 7 16 55 5 16 56 23 17 57 9 17 58 3 17 59 3 18 60 9 18 61 5 18 62 0 19 63 2 19 64 33 19 65 9 20 66 23 20 67 36 20 68 36 21 69 23 21 70 24 21 71 36 22 72 24 22 73 37 22 74 37 23 75 24 23 76 25 23 77 37 24 78 25 24 79 38 24 80 38 25 81 25 25 82 26 25 83 38 26 84 26 26 85 39 26 86 39 27 87 26 27 88 27 27 89 39 28 90 27 28 91 40 28 92 40 29 93 27 29 94 28 29 95 40 30 96 28 30 97 41 30 98 41 31 99 28 31 100 29 31 101 41 32 102 29 32 103 42 32 104 42 33 105 29 33 106 30 33 107 42 34 108 30 34 109 43 34 110 43 35 111 30 35 112 31 35 113 43 36 114 31 36 115 44 36 116 44 37 117 31 37 118 32 37 119 44 38 120 32 38 121 45 38 122 45 39 123 32 39 124 33 39 125 45 40 126 33 40 127 46 40 128 46 41 129 33 41 130 2 41 131 46 42 132 2 42 133 47 42 134 47 43 135 2 43 136 34 43 137 47 44 138 34 44 139 48 44 140 48 45 141 34 45 142 35 45 143 48 46 144 35 46 145 1 46 146 1 47 147 8 47 148 48 47 149 48 48 150 8 48 151 22 48 152 48 49 153 22 49 154 47 49 155 47 44 156 22 44 157 21 44 158 47 50 159 21 50 160 46 50 161 46 42 162 21 42 163 20 42 164 46 51 165 20 51 166 45 51 167 45 52 168 20 52 169 19 52 170 45 53 171 19 53 172 44 53 173 44 54 174 19 54 175 18 54 176 44 55 177 18 55 178 43 55 179 43 56 180 18 56 181 17 56 182 43 34 183 17 34 184 42 34 185 42 35 186 17 35 187 16 35 188 42 57 189 16 57 190 41 57 191 41 58 192 16 58 193 15 58 194 41 59 195 15 59 196 40 59 197 40 60 198 15 60 199 14 60 200 40 61 201 14 61 202 39 61 203 39 62 204 14 62 205 13 62 206 39 63 207 13 63 208 38 63 209 38 64 210 13 64 211 12 64 212 38 25 213 12 25 214 37 25 215 37 65 216 12 65 217 11 65 218 37 66 219 11 66 220 36 66 221 36 22 222 11 22 223 10 22 224 36 67 225 10 67 226 9 67 227 8 68 228 1 68 229 4 68 230 4 69 231 1 69 232 6 69 233 6 70 234 0 70 235 3 70 236 1 71 237 0 71 238 6 71 239 34 72 240 0 72 241 35 72 242 32 73 243 0 73 244 33 73 245 31 74 246 0 74 247 32 74 248 0 75 249 31 75 250 30 75 251 30 76 252 29 76 253 0 76 254 0 77 255 29 77 256 28 77 257 0 78 258 28 78 259 27 78 260 0 79 261 27 79 262 26 79 263 0 80 264 26 80 265 25 80 266 0 81 267 25 81 268 24 81 269 0 82 270 24 82 271 23 82 272 0 83 273 23 83 274 3 83 275 2 84 276 0 84 277 34 84 278 0 85 279 1 85 280 35 85 281</p>
78+
</triangles>
79+
</mesh>
80+
</geometry>
81+
</library_geometries>
82+
<library_visual_scenes>
83+
<visual_scene id="Scene" name="Scene">
84+
<node id="Body4_collision" name="Body4_collision" type="NODE">
85+
<matrix sid="transform">1 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 1</matrix>
86+
<instance_geometry url="#Body1_014-mesh" name="Body4_collision">
87+
<bind_material>
88+
<technique_common>
89+
<instance_material symbol="Material-material" target="#Material-material">
90+
<bind_vertex_input semantic="UVMap" input_semantic="TEXCOORD" input_set="0"/>
91+
</instance_material>
92+
</technique_common>
93+
</bind_material>
94+
</instance_geometry>
95+
</node>
96+
</visual_scene>
97+
</library_visual_scenes>
98+
<scene>
99+
<instance_visual_scene url="#Scene"/>
100+
</scene>
101+
</COLLADA>

0 commit comments

Comments
 (0)