Skip to content

Commit 8f5e6ac

Browse files
authored
Merge pull request #2 from macmacal/feature/repo_utils
Pre-commit & Github templates
2 parents 27a1132 + 5cad9ca commit 8f5e6ac

File tree

10 files changed

+114
-53
lines changed

10 files changed

+114
-53
lines changed

.github/issue_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
3+
name: "Issue template"
4+
about: "Minimal information about an issue"
5+
title: ""
6+
ref: "devel"
7+
8+
---
9+
10+
## Description
11+
12+
13+
<!--- ## Screenshots (if appropriate): -->
14+
15+
## References
16+
<!--- Create a list of references, (in a bullet style) -->

.github/pull_request_template.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
## Description
3+
4+
5+
## Motivation and context
6+
<!--- Why is this change required? What problem does it solve? -->
7+
<!--- If it fixes an open issue, please link to the issue here. -->
8+
9+
10+
<!--- ## Screenshots (if appropriate): -->
11+
12+
## How has this been tested?
13+
<!--- Please describe in detail how you tested your changes. -->
14+
<!--- Include details of your testing environment, and the tests you ran to -->
15+
<!--- see how your change affects other areas of the code, etc. -->
16+
17+
18+
## Checklist
19+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
20+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
21+
- [ ] All TODOs in the code have been resolved or linked to a proper issue.
22+
- [ ] Code has been (auto)formatted.
23+
- [ ] Documentation (e.g., README, CHANGELOG, Wiki) has been updated.
24+
- [ ] All automated checks have passed.
25+
26+
---
27+
Clickup task: [hash](link)

.github/workflows/pre-commit.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Pre-Commit
3+
4+
on:
5+
push:
6+
7+
jobs:
8+
pre-commit:
9+
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-pre-commit.yml@master
10+
with:
11+
ros_distro: humble

.pre-commit-config.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-json
8+
- id: check-merge-conflict
9+
- id: check-symlinks
10+
- id: check-toml
11+
- id: check-xml
12+
- id: debug-statements
13+
- id: destroyed-symlinks
14+
- id: detect-private-key
15+
- id: end-of-file-fixer
16+
- id: mixed-line-ending
17+
- id: pretty-format-json
18+
- id: trailing-whitespace
19+
- id: check-yaml
20+
21+
- repo: https://github.com/codespell-project/codespell
22+
rev: v2.2.6
23+
hooks:
24+
- id: codespell
25+
args: [-L, hande, -w]
26+
27+
- repo: https://github.com/tier4/pre-commit-hooks-ros
28+
rev: v0.10.0
29+
hooks:
30+
- id: prettier-xacro
31+
- id: prettier-package-xml
32+
- id: ros-include-guard
33+
- id: sort-package-xml

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ install(
99
DESTINATION share/${PROJECT_NAME}
1010
)
1111

12-
ament_package()
12+
ament_package()

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# robotiq_hande_description
22

3+
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
4+
35
This package contains meshes and URDF description of [Robotiq Hand-E gripper](https://robotiq.com/products/hand-e-adaptive-robot-gripper) dedicated for Universal Robots e-series.
46

57
- The gripper comes with coupler model (but without flange).
68
- This repository comes with CAD models imported from STEP files to FreeCAD format (FCStd).
79
- Package has been developed and tested in ROS 2 Humble.
810

911

10-
> [!IMPORTANT]
11-
> The fingers' joints can be set from **0 to 25 mm** (which correspondes to the maximal grasp with from **0 to 50 mm**).
12+
> [!IMPORTANT]
13+
> The fingers' joints can be set from **0 to 25 mm** (which corresponds to the maximal grasp with from **0 to 50 mm**).
1214
1315
![hande_model](docs/hande_rviz.gif)
1416

@@ -27,7 +29,7 @@ In your URDF (Xacro) file include the Hand-E definition. Provide a parent link (
2729
An example usage can be find in the [urdf/hande_preview.urdf.xacro](./urdf/robotiq_hande_gripper.urdf.xacro) file.
2830

2931
> [!NOTE]
30-
> The TF frame of the end tip of the gripper is called `${prefix}hande_end`, where `${prefix}` evaluates as the second macro paramater.
32+
> The TF frame of the end tip of the gripper is called `${prefix}hande_end`, where `${prefix}` evaluates as the second macro parameter.
3133
3234

3335
## Preview
@@ -43,6 +45,6 @@ ros2 launch robotiq_hande_description display.launch.py
4345
```
4446

4547
## Credits
46-
- The orignal files of the gripper model were taken from the [Robotiq website](https://robotiq.com/products/hand-e-adaptive-robot-gripper).
48+
- The original files of the gripper model were taken from the [Robotiq website](https://robotiq.com/products/hand-e-adaptive-robot-gripper).
4749
- The URDF files are based on work of @cambel [repository](https://github.com/cambel/robotiq.git).
48-
- Preview in Rviz is based on [ROS 2 URDF Tutorial](https://github.com/ros/urdf_tutorial/tree/ros2/).
50+
- Preview in Rviz is based on [ROS 2 URDF Tutorial](https://github.com/ros/urdf_tutorial/tree/ros2/).

launch/display.launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ def generate_launch_description():
2121
'jsp_gui': run_joint_state_publisher_gui}.items()
2222
))
2323

24-
return ld
24+
return ld

urdf/materials.xacro

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
<?xml version="1.0" ?>
1+
<?xml version="1.0"?>
22
<robot name="xacro_properties" xmlns:xacro="http://ros.org/wiki/xacro">
3-
43
<material name="Grey">
54
<color rgba="0.5 0.5 0.5 1.0"/>
65
</material>
76

87
<material name="DarkGrey">
98
<color rgba="0.04 0.04 0.04 1.0"/>
109
</material>
11-
12-
</robot>
10+
</robot>
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<?xml version="1.0"?>
2-
<robot xmlns:xacro="http://ros.org/wiki/xacro"
3-
name="robotiq_hande_gripper" >
2+
<robot xmlns:xacro="http://ros.org/wiki/xacro" name="robotiq_hande_gripper">
3+
<xacro:include filename="$(find robotiq_hande_description)/urdf/robotiq_hande_gripper.xacro"/>
44

5-
<xacro:include filename="$(find robotiq_hande_description)/urdf/robotiq_hande_gripper.xacro" />
6-
7-
<link name="tool0" />
8-
<xacro:robotiq_hande_gripper parent="tool0" prefix="" />
9-
5+
<link name="tool0"/>
6+
<xacro:robotiq_hande_gripper parent="tool0" prefix=""/>
107
</robot>

urdf/robotiq_hande_gripper.xacro

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
11
<?xml version="1.0"?>
22
<robot xmlns:xacro="http://ros.org/wiki/xacro">
3-
43
<!--
54
Based on the URDF file by Cristian C Beltran-Hernandez
6-
-->
5+
-->
76

8-
<xacro:include filename="$(find robotiq_hande_description)/urdf/materials.xacro" />
7+
<xacro:include filename="$(find robotiq_hande_description)/urdf/materials.xacro"/>
98

109
<xacro:macro name="robotiq_hande_gripper" params="prefix parent">
11-
1210
<!-- Robotiq Coupler -->
1311
<!-- + Height added by the coupler: 13.9mm -->
1412
<!-- + Reference frame: at the middle (6.95mm) -->
1513

1614
<joint name="robotiq_coupler_joint" type="fixed">
17-
<origin xyz="0 0 0.00695" rpy="0 0 ${-pi/2.0}" />
15+
<origin xyz="0 0 0.00695" rpy="0 0 ${-pi/2.0}"/>
1816
<parent link="${parent}"/>
1917
<child link="${prefix}robotiq_coupler"/>
2018
</joint>
2119

2220
<link name="${prefix}robotiq_coupler">
2321
<inertial>
24-
<mass value="0.168" />
25-
<inertia
26-
ixx="6.17674E-05" ixy="0.0" ixz="0.0"
27-
iyy="6.17674E-05" iyz="0.0"
28-
izz="1.18125E-04"
29-
/>
22+
<mass value="0.168"/>
23+
<inertia ixx="6.17674E-05" ixy="0.0" ixz="0.0" iyy="6.17674E-05" iyz="0.0" izz="1.18125E-04"/>
3024
</inertial>
3125

3226
<collision>
@@ -37,13 +31,12 @@
3731

3832
<visual>
3933
<geometry>
40-
<mesh filename="package://robotiq_hande_description/meshes/coupler.dae" />
34+
<mesh filename="package://robotiq_hande_description/meshes/coupler.dae"/>
4135
</geometry>
42-
<material name="DarkGrey" />
36+
<material name="DarkGrey"/>
4337
</visual>
4438
</link>
4539

46-
4740
<joint name="${prefix}robotiq_hande_base_joint" type="fixed">
4841
<origin rpy="0 0 0" xyz="0 0 0.055"/>
4942
<parent link="${prefix}robotiq_coupler"/>
@@ -53,11 +46,7 @@
5346
<link name="${prefix}hande_link">
5447
<inertial>
5548
<mass value="0.86387"/>
56-
<inertia
57-
ixx="0.001" ixy="0.0" ixz="0.0"
58-
iyy="0.001" iyz="0.0"
59-
izz="0.0006"
60-
/>
49+
<inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.0006"/>
6150
</inertial>
6251

6352
<collision>
@@ -75,7 +64,6 @@
7564
</visual>
7665
</link>
7766

78-
7967
<joint name="${prefix}hande_left_finger_joint" type="prismatic">
8068
<origin rpy="0 0 0" xyz="0 -0.025 0.0345"/>
8169
<parent link="${prefix}hande_link"/>
@@ -88,11 +76,7 @@
8876
<inertial>
8977
<origin rpy="0 0 0" xyz="0 0 0"/>
9078
<mass value="0.03804"/>
91-
<inertia
92-
ixx="1E-9" ixy="0.0" ixz="0.0"
93-
iyy="1E-9" iyz="0.0"
94-
izz="1E-9"
95-
/>
79+
<inertia ixx="1E-9" ixy="0.0" ixz="0.0" iyy="1E-9" iyz="0.0" izz="1E-9"/>
9680
</inertial>
9781

9882
<collision>
@@ -111,7 +95,6 @@
11195
</visual>
11296
</link>
11397

114-
11598
<joint name="${prefix}hande_right_finger_joint" type="prismatic">
11699
<origin rpy="0 0 0" xyz="0 0.025 0.0345"/>
117100
<parent link="${prefix}hande_link"/>
@@ -125,11 +108,7 @@
125108
<inertial>
126109
<origin rpy="0 0 0" xyz="0 0 0"/>
127110
<mass value="0.03804"/>
128-
<inertia
129-
ixx="1E-9" ixy="0.0" ixz="0.0"
130-
iyy="1E-9" iyz="0.0"
131-
izz="1E-9"
132-
/>
111+
<inertia ixx="1E-9" ixy="0.0" ixz="0.0" iyy="1E-9" iyz="0.0" izz="1E-9"/>
133112
</inertial>
134113

135114
<collision>
@@ -144,18 +123,16 @@
144123
<geometry>
145124
<mesh filename="package://robotiq_hande_description/meshes/finger.dae" scale="1.0 1.0 1.0"/>
146125
</geometry>
147-
<material name="Grey" />
126+
<material name="Grey"/>
148127
</visual>
149128
</link>
150129

151-
152130
<joint name="${prefix}robotiq_hande_end_joint" type="fixed">
153131
<origin rpy="0 0 0" xyz="0 0 0.095"/>
154132
<parent link="${prefix}hande_link"/>
155133
<child link="${prefix}hande_end"/>
156134
</joint>
157135

158-
<link name="${prefix}hande_end" />
159-
136+
<link name="${prefix}hande_end"/>
160137
</xacro:macro>
161138
</robot>

0 commit comments

Comments
 (0)