-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7be8da7
commit cb05553
Showing
6 changed files
with
116 additions
and
722 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 54 additions & 3 deletions
57
src/robot_description/models/master_ASM/urdf/macros.urdf.xacro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,60 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<robot name="macros" xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
|
||
<xacro:macro name="wheel" params="name"> | ||
<xacro:macro name="wheel_link" params="name pretty:=^|true wheelRadius:=^ wheelWidth:=^ wheelMass:=^ *origin"> | ||
|
||
<link name="${name}"> | ||
<inertial> | ||
<xacro:insert_block name="origin" /> | ||
<mass value="${wheelMass}" /> | ||
<inertia | ||
ixx="0.0059462" | ||
ixy="0" | ||
ixz="0" | ||
iyy="0.0059468" | ||
iyz="0" | ||
izz="0.0072591" /> | ||
</inertial> | ||
|
||
<visual> | ||
<xacro:insert_block name="origin" /> | ||
|
||
</xacro:macro> | ||
<geometry> | ||
<xacro:if value="${pretty}"> | ||
<mesh | ||
filename="$(find robot_description)/models/master_ASM/meshes/wheel_Link.STL" /> | ||
</xacro:if> | ||
<xacro:unless value="${pretty}"> | ||
<cylinder radius="${wheelRadius}" length="${wheelWidth}" /> | ||
</xacro:unless> | ||
</geometry> | ||
<material name="grey" /> | ||
</visual> | ||
|
||
<collision> | ||
<xacro:insert_block name="origin" /> | ||
<geometry> | ||
<cylinder radius="${wheelRadius}" length="${wheelWidth}" /> | ||
</geometry> | ||
</collision> | ||
</link> | ||
|
||
|
||
</xacro:macro> | ||
|
||
<xacro:macro name="wheel_joint" params="wheel x y z"> | ||
<joint | ||
name="${str(wheel) + '_joint'}" | ||
type="continuous"> | ||
<origin | ||
xyz="${x} ${y} -${z}" | ||
rpy="${pi/2} 0 ${pi/2}" /> | ||
<parent link="frame_link" /> | ||
<child link="${str(wheel) + '_link'}" /> | ||
<axis | ||
xyz="0 0 -1" /> | ||
</joint> | ||
</xacro:macro> | ||
|
||
</robot> |
Oops, something went wrong.