Skip to content

Commit 4816090

Browse files
legubiaoxsnan24
andcommitted
Feature/spriti moz1 (#5)
* add moz1 omniwheel * add ptc tabs * add inspire hand * modified camera direction * add new camera * add usb camera and ultrasonic * add eef frame for eg2 4c2 * modified realsense glb path * modified d405 direction --------- Co-authored-by: Xu Shengnan <k2571675874@163.com> Made-with: Cursor
1 parent 16afc16 commit 4816090

58 files changed

Lines changed: 1454 additions & 11 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ Each gripper package includes:
2828

2929
### Dexterous Hands
3030

31-
Located in `dexhands/` directory:
31+
Mainly located in `dexhands/` directory (Inspire RH56E2 is provided by `gripper/inspire_description`):
3232

3333
| Brand | Model | Repaint | Images |
3434
|--------------------------------------------|-----------------------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
3535
| [BrainCo](dexhands/brainco_description) | REVO1<br>REVO2 | Yes | <img src="dexhands/.images/brainco_revo1.png" width="150"> <img src="dexhands/.images/brainco_revo2_left.png" width="150"> <img src="dexhands/.images/brainco_revo2_right.png" width="150"> |
3636
| [LinkerHand](dexhands/linkerhand_description) | O6<br>O7<br>L6<br>L10 | Yes | <img src="dexhands/.images/linkerhand_o6.png" width="150"> <img src="dexhands/.images/linkerhand_o7.png" width="150"> <img src="dexhands/.images/linkerhand_l6.png" width="150"> <img src="dexhands/.images/linkerhand_l10.png" width="150"> |
37+
| [Inspire](gripper/inspire_description) | RH56E2 | Yes | <img src="dexhands/.images/inspire_rh56e2.png" width="150"> |
3738
| [OyMotion](dexhands/oymotion_description) | RoHand Gen2 | Yes | <img src="dexhands/.images/rohand_gen2.png" width="150"> |
3839

3940
Features:
10.5 MB
Binary file not shown.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
3+
<xacro:property name="PI" value="3.1415926535897931"/>
4+
5+
<!-- 被动轮宏定义 -->
6+
<xacro:macro name="passive_wheel" params="parent_link passive_wheel_name radius angle sphere_radius:='0.08'">
7+
<!-- 被动轮链接 -->
8+
<link name="${passive_wheel_name}">
9+
<inertial>
10+
<origin xyz="0 0 0"/>
11+
<mass value="0.1"/>
12+
<inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/>
13+
</inertial>
14+
<collision>
15+
<geometry>
16+
<sphere radius="${float(sphere_radius)}"/>
17+
</geometry>
18+
</collision>
19+
</link>
20+
21+
<!-- 被动轮关节 - 绕x轴旋转,在yz平面上分布,y轴负方向指向圆心 -->
22+
<joint name="${passive_wheel_name}_joint" type="continuous">
23+
<!-- 让y轴负方向指向圆心:被动轮在角度angle位置,需要绕x轴旋转angle角度使y轴负方向指向圆心 -->
24+
<origin xyz="0 ${float(radius) * cos(float(angle))} ${float(radius) * sin(float(angle))}" rpy="${float(angle)} 0 0"/>
25+
<parent link="${parent_link}"/>
26+
<child link="${passive_wheel_name}"/>
27+
<axis xyz="0 0 1"/>
28+
</joint>
29+
</xacro:macro>
30+
31+
<!-- 递归宏:创建被动轮循环 -->
32+
<xacro:macro name="create_passive_wheels" params="parent_link wheel_name indices:=^ angle_step passive_wheel_radius_actual">
33+
<xacro:if value="${indices}">
34+
<!-- 弹出第一个索引 -->
35+
<xacro:property name="index" value="${indices.pop(0)}"/>
36+
<!-- 计算角度 -->
37+
<xacro:property name="angle" value="${float(index) * float(angle_step)}"/>
38+
<!-- 创建被动轮 -->
39+
<xacro:passive_wheel
40+
parent_link="${parent_link}"
41+
passive_wheel_name="${wheel_name}_passive_${index}"
42+
radius="${passive_wheel_radius_actual}"
43+
angle="${angle}"/>
44+
<!-- 递归调用自己 -->
45+
<xacro:create_passive_wheels
46+
parent_link="${parent_link}"
47+
wheel_name="${wheel_name}"
48+
indices="${indices}"
49+
angle_step="${angle_step}"
50+
passive_wheel_radius_actual="${passive_wheel_radius_actual}"/>
51+
</xacro:if>
52+
</xacro:macro>
53+
54+
<!-- 轮子宏定义 - 只包含轮子的link -->
55+
<xacro:macro name="wheel" params="wheel_name
56+
inertial_origin_xyz:='0.0026089441594678298 -1.3189703553351252e-07 2.8695680726054107e-07'
57+
ixx:='0.012235' ixy:='-0.0' ixz:='0.0' iyy:='0.006629' iyz:='0.0' izz:='0.006629'
58+
passive_wheel_radius:='0.02' wheel_radius:='0.15' num_passive_wheels:='10'
59+
enable_passive_wheels:='false'">
60+
<!-- 轮子链接 -->
61+
<link name="${wheel_name}">
62+
<inertial>
63+
<origin xyz="${inertial_origin_xyz}"/>
64+
<mass value="4.24803000494366"/>
65+
<inertia ixx="${ixx}" ixy="${ixy}" ixz="${ixz}" iyy="${iyy}" iyz="${iyz}" izz="${izz}"/>
66+
</inertial>
67+
<visual>
68+
<geometry>
69+
<mesh filename="file://$(find component_models)/meshes/omniwheel_10.glb"/>
70+
</geometry>
71+
</visual>
72+
</link>
73+
74+
<!-- 根据参数决定是否创建被动轮 -->
75+
<xacro:if value="${enable_passive_wheels}">
76+
<!-- 创建10个绕一圈的被动轮 -->
77+
<xacro:property name="num_passive_wheels_float" value="${float(num_passive_wheels)}"/>
78+
<xacro:property name="angle_step" value="${2*PI / num_passive_wheels_float}"/>
79+
<xacro:property name="passive_wheel_radius_actual" value="0.025"/>
80+
<xacro:property name="indices" value="${[0,1,2,3,4,5,6,7,8,9]}"/>
81+
<xacro:create_passive_wheels
82+
parent_link="${wheel_name}"
83+
wheel_name="${wheel_name}"
84+
indices="${list(indices)}"
85+
angle_step="${angle_step}"
86+
passive_wheel_radius_actual="${passive_wheel_radius_actual}"/>
87+
</xacro:if>
88+
</xacro:macro>
89+
</robot>
90+
146 KB
Loading
156 KB
Loading

gripper/inspire_description/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ project(inspire_description)
44
find_package(ament_cmake REQUIRED)
55

66
install(
7-
DIRECTORY meshes xacro
8-
DESTINATION share/${PROJECT_NAME}/
7+
DIRECTORY meshes xacro config
8+
DESTINATION share/${PROJECT_NAME}/
99
)
1010

1111
ament_package()

gripper/inspire_description/README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Inspire Description
22

3-
This package contains the URDF and related files for the Inspire Grippers.
3+
This package contains the URDF and related files for Inspire grippers and dexterous hands.
44

55
## Build
66

@@ -17,4 +17,29 @@ colcon build --packages-up-to inspire_description --symlink-install
1717
ros2 launch robot_common_launch gripper.launch.py gripper:=inspire
1818
```
1919

20-
![EG2](../.images/inspire_eg2.png)
20+
![EG2](../.images/inspire_eg2.png)
21+
22+
## Visualize the Dexterous Hand
23+
24+
### RH56E2 Hand
25+
Direction convention: `1` = left hand, `-1` = right hand.
26+
* Left
27+
```bash
28+
source ~/ros2_ws/install/setup.bash
29+
ros2 launch robot_common_launch hand.launch.py hand:=inspire type:=RH56E2
30+
```
31+
![RH56E2](../../dexhands/.images/inspire_rh56e2.png)
32+
* Right
33+
```bash
34+
source ~/ros2_ws/install/setup.bash
35+
ros2 launch robot_common_launch hand.launch.py hand:=inspire type:=RH56E2 direction:=-1
36+
```
37+
![RH56E2_Right](../../dexhands/.images/inspire_rh56e2_right.png)
38+
39+
## ROS2 Control Demo (Dexterous Hand)
40+
41+
### RH56E2 Hand
42+
```bash
43+
source ~/ros2_ws/install/setup.bash
44+
ros2 launch basic_joint_controller hand.launch.py hand:=inspire type:=RH56E2
45+
```
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Type-specific controller config for Inspire dexterous hand (RH56E2).
2+
controller_manager:
3+
ros__parameters:
4+
update_rate: 100
5+
6+
joint_state_broadcaster:
7+
type: joint_state_broadcaster/JointStateBroadcaster
8+
9+
hand_joint_controller:
10+
type: basic_joint_controller/BasicJointController
11+
12+
joint_state_broadcaster:
13+
ros__parameters:
14+
joints:
15+
- thumb_joint1
16+
- thumb_joint2
17+
- index_joint
18+
- middle_joint
19+
- ring_joint
20+
- pinky_joint
21+
interfaces:
22+
- position
23+
- velocity
24+
- effort
25+
26+
hand_joint_controller:
27+
ros__parameters:
28+
update_rate: 100
29+
joints:
30+
- thumb_joint1
31+
- thumb_joint2
32+
- index_joint
33+
- middle_joint
34+
- ring_joint
35+
- pinky_joint
36+
command_interfaces:
37+
- position
38+
state_interfaces:
39+
- position
40+
- velocity
41+
home_1: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
42+
home_2: [0.3, 0.3, 0.3, 0.3, 0.3, 0.3]
43+
home_3: [0.6, 0.6, 0.6, 0.6, 0.6, 0.6]
44+
home_duration: 3.0
45+
movej_duration: 3.0
46+
hold_position_threshold: 0.1
4.09 MB
Binary file not shown.
1 MB
Binary file not shown.

0 commit comments

Comments
 (0)