Skip to content

Commit 2edd73c

Browse files
slimasziommacmacal
andauthored
FIX: change inertial macro name to avoid namespace collisions (#6)
* FIX: change inertial macro name to avoid namespace collisions * CHG: docs * CHG: pre-commit * Update urdf/robotiq_hande_gripper.xacro Co-authored-by: Maciej Aleksandrowicz <mac.aleksandrowicz@gmail.com> * REV: cylinder_inertial filename --------- Co-authored-by: Maciej Aleksandrowicz <mac.aleksandrowicz@gmail.com>
1 parent 0206a1f commit 2edd73c

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Deprecated
1313
### Removed
1414
### Fixed
15+
16+
* [PR-6](https://github.com/AGH-CEAI/robotiq_hande_description/pull/6) - Added prefix to inertial macro name. Added descriptive names for params.
17+
1518
### Security
1619

1720
## [0.1.0] - 2025-03-13

urdf/cylinder_inertial.xacro

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<?xml version="1.0"?>
22
<robot xmlns:xacro="http://ros.org/wiki/xacro">
3-
<xacro:macro name="cylinder_inertial" params="r h m *origin">
3+
<xacro:macro name="__robotiq_hande_cylinder_inertial" params="radius height mass *origin">
44
<inertial>
5-
<mass value="${m}"/>
5+
<mass value="${mass}"/>
66
<xacro:insert_block name="origin"/>
7-
<inertia ixx="${0.0833333 * m * (3 * (r * r) + h * h)}" ixy="0.0" ixz="0.0" iyy="${0.0833333 * m * (3 * (r * r) + h * h)}" iyz="0.0" izz="${0.5 * m * (r * r)}"/>
7+
<inertia
8+
ixx="${0.0833333 * mass * (3 * (radius * radius) + height * height)}"
9+
ixy="0.0"
10+
ixz="0.0"
11+
iyy="${0.0833333 * mass * (3 * (radius * radius) + height * height)}"
12+
iyz="0.0"
13+
izz="${0.5 * mass * (radius * radius)}"
14+
/>
815
</inertial>
916
</xacro:macro>
1017
</robot>

urdf/robotiq_hande_gripper.xacro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
</geometry>
5656
</collision>
5757

58-
<xacro:cylinder_inertial r="$(arg hande_radius)" h="$(arg coupler_shell_height)" m="${coupler_mass}">
58+
<xacro:__robotiq_hande_cylinder_inertial radius="$(arg hande_radius)" height="$(arg coupler_shell_height)" mass="${coupler_mass}">
5959
<origin xyz="0 0 ${$(arg coupler_shell_height) / 2 - $(arg coupler_parent_cutoff)}" rpy="0 0 0"/>
60-
</xacro:cylinder_inertial>
60+
</xacro:__robotiq_hande_cylinder_inertial>
6161
</link>
6262

6363
<joint name="${prefix}robotiq_hande_base_joint" type="fixed">
@@ -81,9 +81,9 @@
8181
</geometry>
8282
</collision>
8383

84-
<xacro:cylinder_inertial r="$(arg hande_radius)" h="$(arg hande_height)" m="0.86387">
84+
<xacro:__robotiq_hande_cylinder_inertial radius="$(arg hande_radius)" height="$(arg hande_height)" mass="0.86387">
8585
<origin xyz="0 0 ${$(arg hande_height) / 2}" rpy="0 0 0"/>
86-
</xacro:cylinder_inertial>
86+
</xacro:__robotiq_hande_cylinder_inertial>
8787
</link>
8888

8989
<joint name="${prefix}robotiq_hande_left_finger_joint" type="prismatic">

0 commit comments

Comments
 (0)