Skip to content

WAM Add #349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 54 additions & 26 deletions notebooks/kinematics.ipynb

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions roboticstoolbox/models/URDF/WAM.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/usr/bin/env python

import numpy as np
from roboticstoolbox.robot.ERobot import ERobot, ERobot2
from spatialmath import SE3


class WAM(ERobot):
"""
Class that imports a WAM URDF model

``WAM()`` is a class which imports a Barrett WAM robot definition
from a URDF file. The model describes its kinematic and graphical
characteristics.

.. runblock:: pycon

>>> import roboticstoolbox as rtb
>>> robot = rtb.models.URDF.WAM()
>>> print(robot)

Defined joint configurations are:

- qz, zero joint angle configuration, 'L' shaped configuration
- qr, vertical 'READY' configuration
- qs, arm is stretched out in the x-direction
- qn, arm is at a nominal non-singular configuration

.. codeauthor:: Longsen Gao
.. sectionauthor:: Peter Corke
"""

def __init__(self):

links, name, urdf_string, urdf_filepath = self.URDF_read(
"wam_description/urdf/wam7.urdf.xacro"
)

super().__init__(
links,
name=name,
manufacturer="Barrett Robtoics",
gripper_links=links[8],
urdf_string=urdf_string,
urdf_filepath=urdf_filepath,
)

self.grippers[0].tool = SE3(0, 0, 0)

self.qdlim = np.array(
[2.1750, 2.1750, 2.1750, 2.1750, 2.6100, 2.6100, 2.6100, 3.0, 3.0]
)

self.qr = np.array([0, 0, 0, 0, 0, 0, 0])
self.qz = np.zeros(7)

self.addconfiguration("qr", self.qr)
self.addconfiguration("qz", self.qz)


if __name__ == "__main__": # pragma nocover

r = WAM()

r.qz

for link in r.grippers[0].links:
print(link)
2 changes: 2 additions & 0 deletions roboticstoolbox/models/URDF/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from roboticstoolbox.models.URDF.FetchCamera import FetchCamera
from roboticstoolbox.models.URDF.Valkyrie import Valkyrie
from roboticstoolbox.models.URDF.AL5D import AL5D
from roboticstoolbox.models.URDF.WAM import WAM

__all__ = [
"Panda",
Expand Down Expand Up @@ -50,4 +51,5 @@
"FetchCamera",
"Valkyrie",
"AL5D",
"WAM",
]
Binary file not shown.
60 changes: 60 additions & 0 deletions rtb-data/rtbdata/xacro/wam_description/meshes/base_link_convex.dae

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.

Large diffs are not rendered by default.

Diff not rendered.
Diff not rendered.
Binary file not shown.

Large diffs are not rendered by default.

Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.

Large diffs are not rendered by default.

Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.
54 changes: 54 additions & 0 deletions rtb-data/rtbdata/xacro/wam_description/meshes/wrist_palm_link.dae
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<author>Blender User</author>
<authoring_tool>Blender 2.71.0 commit date:2014-06-12, commit time:18:39, hash:169c95b</authoring_tool>
</contributor>
<created>2014-12-11T17:55:27</created>
<modified>2014-12-11T17:55:27</modified>
<unit name="meter" meter="1"/>
<up_axis>Y_UP</up_axis>
</asset>
<library_images/>
<library_geometries>
<geometry id="Wrist_Palm_Link-mesh" name="Wrist Palm Link">
<mesh>
<source id="Wrist_Palm_Link-mesh-positions">
<float_array id="Wrist_Palm_Link-mesh-positions-array" count="0"/>
<technique_common>
<accessor source="#Wrist_Palm_Link-mesh-positions-array" count="0" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="Wrist_Palm_Link-mesh-normals">
<float_array id="Wrist_Palm_Link-mesh-normals-array" count="0"/>
<technique_common>
<accessor source="#Wrist_Palm_Link-mesh-normals-array" count="0" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="Wrist_Palm_Link-mesh-vertices">
<input semantic="POSITION" source="#Wrist_Palm_Link-mesh-positions"/>
</vertices>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id="Scene" name="Scene">
<node id="Wrist_Palm_Link" name="Wrist_Palm_Link" type="NODE">
<matrix sid="transform">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix>
<instance_geometry url="#Wrist_Palm_Link-mesh"/>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url="#Scene"/>
</scene>
</COLLADA>
Diff not rendered.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<author>Blender User</author>
<authoring_tool>Blender 2.71.0 commit date:2014-06-12, commit time:18:39, hash:169c95b</authoring_tool>
</contributor>
<created>2014-12-11T17:59:15</created>
<modified>2014-12-11T17:59:15</modified>
<unit name="meter" meter="1"/>
<up_axis>Y_UP</up_axis>
</asset>
<library_images/>
<library_geometries>
<geometry id="Wrist_Palm_Link_Convex-mesh" name="Wrist Palm Link Convex">
<mesh>
<source id="Wrist_Palm_Link_Convex-mesh-positions">
<float_array id="Wrist_Palm_Link_Convex-mesh-positions-array" count="234">-0.04446387 -0.001791834 0.06490999 -0.0441755 0.005363881 0.04794996 -0.04446387 -0.001791834 0.04794996 -0.0441755 0.005363881 0.06490999 -0.02068012 0.03940278 0.06490999 -0.01409173 0.04220986 0.04794996 -0.02068012 0.03940278 0.04794996 -0.01409173 0.04220986 0.06490999 -0.04274302 0.01238065 0.06490999 -0.04274302 0.01238065 0.04794996 -0.04020351 0.01907682 0.04794996 -0.04020351 0.01907682 0.06490999 -0.03662276 0.02527886 0.06490999 -0.03209346 0.03082621 0.04794996 -0.03662276 0.02527886 0.04794996 -0.03209346 0.03082621 0.06490999 -0.03853809 -0.02224999 0.06490999 -0.04160821 -0.01577991 0.04794996 -0.03853809 -0.02224999 0.04794996 -0.04160821 -0.01577991 0.06490999 -0.02673298 0.03557515 0.06490999 -0.02673298 0.03557515 0.04794996 0.02950894 -0.03330868 0.06490999 0.02378368 -0.03761094 0.04794996 0.02950894 -0.03330868 0.04794996 0.02378368 -0.03761094 0.06490999 -0.04360067 -0.008901119 0.06490999 -0.04360067 -0.008901119 0.04794996 -0.0344699 -0.02814382 0.06490999 -0.0344699 -0.02814382 0.04794996 -0.02950894 -0.03330868 0.04794996 -0.02950894 -0.03330868 0.06490999 -0.02378368 -0.03761094 0.06490999 -0.02378368 -0.03761094 0.04794996 0.04274302 0.01238065 0.06490999 0.0441755 0.005363881 0.04794996 0.04274302 0.01238065 0.04794996 0.0441755 0.005363881 0.06490999 0.04020351 0.01907682 0.04794996 0.04020351 0.01907682 0.06490999 0.03662276 0.02527886 0.06490999 0.03662276 0.02527886 0.04794996 0.03209346 0.03082621 0.04794996 0.03209346 0.03082621 0.06490999 0.04446387 -0.001791834 0.06490999 0.04446387 -0.001791834 0.04794996 0.04360067 -0.008901119 0.04794996 0.04360067 -0.008901119 0.06490999 0.04160821 -0.01577991 0.06490999 0.03853809 -0.02224999 0.04794996 0.04160821 -0.01577991 0.04794996 0.03853809 -0.02224999 0.06490999 -0.007138252 0.04392373 0.04794996 -0.007138252 0.04392373 0.06490999 0 0.04449999 0.06490999 0 0.04449999 0.04794996 0.02673298 0.03557515 0.06490999 0.02673298 0.03557515 0.04794996 0.02068012 0.03940278 0.04794996 0.02068012 0.03940278 0.06490999 0.01409173 0.04220986 0.06490999 0.01409173 0.04220986 0.04794996 0.0344699 -0.02814382 0.06490999 0.0344699 -0.02814382 0.04794996 0.003580749 -0.04435569 0.06490999 -0.003580749 -0.04435569 0.04794996 0.003580749 -0.04435569 0.04794996 -0.003580749 -0.04435569 0.06490999 0.0106495 -0.04320687 0.04794996 0.0106495 -0.04320687 0.06490999 -0.01744246 -0.04093903 0.04794996 0.007138252 0.04392373 0.04794996 0.01744246 -0.04093903 0.04794996 -0.0106495 -0.04320687 0.04794996 -0.01744246 -0.04093903 0.06490999 -0.0106495 -0.04320687 0.06490999 0.007138252 0.04392373 0.06490999 0.01744246 -0.04093903 0.06490999</float_array>
<technique_common>
<accessor source="#Wrist_Palm_Link_Convex-mesh-positions-array" count="78" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="Wrist_Palm_Link_Convex-mesh-normals">
<float_array id="Wrist_Palm_Link_Convex-mesh-normals-array" count="234">-0.7237465 -0.02914518 0.6894131 -0.7190466 0.08728289 -0.6894131 -0.7237465 -0.02914518 -0.6894131 -0.7190466 0.08728289 0.6894131 -0.3366191 0.641377 0.6894131 -0.2293771 0.6870632 -0.6894131 -0.3366191 0.6413465 -0.6894131 -0.2293771 0.6870632 0.6894131 -0.6957305 0.2015137 0.6894131 -0.6957305 0.2015137 -0.6894131 -0.6544084 0.3104953 -0.6894131 -0.6544084 0.3104953 0.6894131 -0.596118 0.4114505 0.6894131 -0.5223853 0.5017548 -0.6894131 -0.596118 0.4114505 -0.6894131 -0.5223853 0.5017548 0.6894131 -0.6272774 -0.3621631 0.6894131 -0.6772668 -0.2568438 -0.6894131 -0.6272774 -0.3621631 -0.6894131 -0.6772668 -0.2568438 0.6894131 -0.4351329 0.5790582 0.6894131 -0.4351329 0.5790582 -0.6894131 0.4803003 -0.5421614 0.6894131 0.3871273 -0.6122013 -0.6894131 0.4803003 -0.5421614 -0.6894131 0.3871273 -0.6122013 0.6894131 -0.7096774 -0.1448714 0.6894131 -0.7097079 -0.1448714 -0.6894131 -0.5610523 -0.4580828 0.6894131 -0.5610523 -0.4580828 -0.6894131 -0.4803308 -0.5421614 -0.6894131 -0.4803003 -0.5421614 0.6894131 -0.3871273 -0.6122013 0.6894131 -0.3871273 -0.6122013 -0.6894131 0.6957305 0.2015137 0.6894131 0.7190466 0.08728289 -0.6894131 0.6957305 0.2015137 -0.6894131 0.7190466 0.08728289 0.6894131 0.6544084 0.3104953 -0.6894131 0.6544084 0.3104953 0.6894131 0.596118 0.4114505 0.6894131 0.596118 0.4114505 -0.6894131 0.5223853 0.5017548 -0.6894131 0.5223853 0.5017548 0.6894131 0.7237465 -0.02914518 0.6894131 0.7237465 -0.02914518 -0.6894131 0.7096774 -0.1448714 -0.6894131 0.7096774 -0.1448714 0.6894131 0.6772668 -0.2568438 0.6894131 0.6272774 -0.3621631 -0.6894131 0.6772668 -0.2568438 -0.6894131 0.6272774 -0.3621631 0.6894131 -0.1161839 0.7149571 -0.6894131 -0.1161839 0.7149571 0.6894131 0 0.7243263 0.6894131 0 0.7243263 -0.6894131 0.4351329 0.5790582 0.6894131 0.4351329 0.5790582 -0.6894131 0.3366191 0.6413465 -0.6894131 0.3366191 0.641377 0.6894131 0.2293771 0.6870632 0.6894131 0.2293466 0.6870632 -0.6894131 0.5610523 -0.4580828 0.6894131 0.5610523 -0.4580828 -0.6894131 0.05825978 -0.7219764 0.6894131 -0.05825978 -0.7219764 -0.6894131 0.05825978 -0.7219764 -0.6894131 -0.05825978 -0.7219764 0.6894131 0.1733451 -0.7032685 -0.6894131 0.1733451 -0.7032685 0.6894131 -0.2839137 -0.6663717 -0.6894131 0.1161839 0.7149571 -0.6894131 0.2839137 -0.6663717 -0.6894131 -0.1733451 -0.7032685 -0.6894131 -0.2839137 -0.6663717 0.6894131 -0.1733451 -0.7032685 0.6894131 0.1161839 0.7149571 0.6894131 0.2839137 -0.6663717 0.6894131</float_array>
<technique_common>
<accessor source="#Wrist_Palm_Link_Convex-mesh-normals-array" count="78" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="Wrist_Palm_Link_Convex-mesh-vertices">
<input semantic="POSITION" source="#Wrist_Palm_Link_Convex-mesh-positions"/>
</vertices>
<polylist count="152">
<input semantic="VERTEX" source="#Wrist_Palm_Link_Convex-mesh-vertices" offset="0"/>
<input semantic="NORMAL" source="#Wrist_Palm_Link_Convex-mesh-normals" offset="1"/>
<vcount>3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 </vcount>
<p>0 0 1 1 2 2 1 1 0 0 3 3 4 4 5 5 6 6 7 7 5 5 4 4 1 1 8 8 9 9 8 8 1 1 3 3 8 8 10 10 9 9 8 8 11 11 10 10 12 12 13 13 14 14 15 15 13 13 12 12 12 12 14 14 10 10 11 11 12 12 10 10 16 16 17 17 18 18 16 16 19 19 17 17 20 20 21 21 13 13 20 20 13 13 15 15 20 20 6 6 21 21 20 20 4 4 6 6 22 22 23 23 24 24 22 22 25 25 23 23 26 26 27 27 17 17 26 26 17 17 19 19 26 26 0 0 2 2 2 2 27 27 26 26 28 28 29 29 30 30 28 28 30 30 31 31 28 28 18 18 29 29 28 28 16 16 18 18 32 32 30 30 33 33 31 31 30 30 32 32 34 34 35 35 36 36 37 37 35 35 34 34 34 34 36 36 38 38 39 39 34 34 38 38 40 40 41 41 42 42 40 40 42 42 43 43 40 40 38 38 41 41 40 40 39 39 38 38 44 44 45 45 35 35 44 44 35 35 37 37 46 46 44 44 47 47 45 45 44 44 46 46 48 48 49 49 50 50 51 51 49 49 48 48 48 48 50 50 46 46 48 48 46 46 47 47 52 52 53 53 54 54 52 52 54 54 55 55 52 52 5 5 7 7 52 52 7 7 53 53 56 56 42 42 57 57 43 43 42 42 56 56 56 56 57 57 58 58 59 59 56 56 58 58 60 60 58 58 61 61 60 60 59 59 58 58 62 62 63 63 49 49 62 62 49 49 51 51 62 62 24 24 63 63 62 62 22 22 24 24 64 64 65 65 66 66 67 67 65 65 64 64 64 64 66 66 68 68 69 69 64 64 68 68 70 70 18 18 17 17 6 6 5 5 70 70 9 9 10 10 70 70 70 70 17 17 27 27 68 68 66 66 70 70 10 10 14 14 70 70 70 70 38 38 36 36 70 70 21 21 6 6 70 70 1 1 9 9 36 36 35 35 70 70 70 70 50 50 49 49 13 13 21 21 70 70 49 49 63 63 70 70 70 70 41 41 38 38 58 58 57 57 70 70 70 70 66 66 65 65 70 70 71 71 61 61 70 70 14 14 13 13 70 70 2 2 1 1 29 29 18 18 70 70 70 70 61 61 58 58 33 33 30 30 70 70 70 70 46 46 50 50 24 24 23 23 70 70 70 70 23 23 72 72 70 70 63 63 24 24 70 70 27 27 2 2 70 70 30 30 29 29 42 42 41 41 70 70 70 70 35 35 45 45 70 70 57 57 42 42 5 5 52 52 70 70 65 65 73 73 70 70 45 45 46 46 70 70 70 70 52 52 55 55 55 55 71 71 70 70 70 70 72 72 68 68 70 70 74 74 32 32 70 70 32 32 33 33 75 75 73 73 65 65 75 75 65 65 67 67 75 75 70 70 73 73 74 74 70 70 75 75 54 54 76 76 55 55 76 76 71 71 55 55 76 76 61 61 71 71 76 76 60 60 61 61 3 3 0 0 77 77 4 4 20 20 77 77 7 7 4 4 77 77 77 77 12 12 11 11 77 77 56 56 59 59 39 39 40 40 77 77 77 77 0 0 26 26 77 77 32 32 74 74 11 11 8 8 77 77 60 60 76 76 77 77 16 16 28 28 77 77 77 77 53 53 7 7 77 77 48 48 47 47 25 25 22 22 77 77 77 77 8 8 3 3 15 15 12 12 77 77 19 19 16 16 77 77 77 77 64 64 69 69 77 77 34 34 39 39 47 47 44 44 77 77 54 54 53 53 77 77 77 77 20 20 15 15 59 59 60 60 77 77 22 22 62 62 77 77 77 77 26 26 19 19 77 77 28 28 31 31 31 31 32 32 77 77 37 37 34 34 77 77 77 77 40 40 43 43 77 77 44 44 37 37 51 51 48 48 77 77 43 43 56 56 77 77 74 74 75 75 77 77 77 77 62 62 51 51 67 67 64 64 77 77 77 77 75 75 67 67 77 77 76 76 54 54 23 23 25 25 77 77 77 77 72 72 23 23 77 77 69 69 68 68 68 68 72 72 77 77</p>
</polylist>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id="Scene" name="Scene">
<node id="Wrist_Palm_Link_Convex" name="Wrist_Palm_Link_Convex" type="NODE">
<matrix sid="transform">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix>
<instance_geometry url="#Wrist_Palm_Link_Convex-mesh"/>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url="#Scene"/>
</scene>
</COLLADA>
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.
Loading