Skip to content

Commit 753eead

Browse files
authored
Merge pull request #688 from JdeRobot/machine-vision-gz
Migrate machine vision to gazebo harmonic
2 parents 41945ec + 2ec7e48 commit 753eead

20 files changed

Lines changed: 2471 additions & 193 deletions

File tree

Industrial/robotiq_description/urdf/robotiq_85_gripper.ros2_control.xacro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,5 @@
9191
</joint>
9292

9393
</ros2_control>
94-
9594
</xacro:macro>
96-
97-
</robot>
95+
</robot>

Industrial/robotiq_description/urdf/robotiq_85_gripper.urdf.xacro

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -271,39 +271,6 @@
271271
<mu2>1.0</mu2>
272272
<minDepth>0.001</minDepth>
273273
</gazebo>
274-
275-
<gazebo>
276-
<plugin filename="gz-sim-mimic-joint-system" name="gz::sim::systems::MimicJoint">
277-
<joint>${prefix}robotiq_85_right_knuckle_joint</joint>
278-
<mimic_joint>${prefix}robotiq_85_left_knuckle_joint</mimic_joint>
279-
<multiplier>1.0</multiplier>
280-
<offset>0.0</offset>
281-
</plugin>
282-
<plugin filename="gz-sim-mimic-joint-system" name="gz::sim::systems::MimicJoint">
283-
<joint>${prefix}robotiq_85_left_inner_knuckle_joint</joint>
284-
<mimic_joint>${prefix}robotiq_85_left_knuckle_joint</mimic_joint>
285-
<multiplier>1.0</multiplier>
286-
<offset>0.0</offset>
287-
</plugin>
288-
<plugin filename="gz-sim-mimic-joint-system" name="gz::sim::systems::MimicJoint">
289-
<joint>${prefix}robotiq_85_right_inner_knuckle_joint</joint>
290-
<mimic_joint>${prefix}robotiq_85_left_knuckle_joint</mimic_joint>
291-
<multiplier>1.0</multiplier>
292-
<offset>0.0</offset>
293-
</plugin>
294-
<plugin filename="gz-sim-mimic-joint-system" name="gz::sim::systems::MimicJoint">
295-
<joint>${prefix}robotiq_85_left_finger_tip_joint</joint>
296-
<mimic_joint>${prefix}robotiq_85_left_knuckle_joint</mimic_joint>
297-
<multiplier>-1.0</multiplier>
298-
<offset>0.0</offset>
299-
</plugin>
300-
<plugin filename="gz-sim-mimic-joint-system" name="gz::sim::systems::MimicJoint">
301-
<joint>${prefix}robotiq_85_right_finger_tip_joint</joint>
302-
<mimic_joint>${prefix}robotiq_85_left_knuckle_joint</mimic_joint>
303-
<multiplier>-1.0</multiplier>
304-
<offset>0.0</offset>
305-
</plugin>
306-
</gazebo>
307274

308275
<xacro:robotiq_85_gripper_transmission prefix="${prefix}" />
309276

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
objects:
2+
blue_sphere:
3+
shape: sphere
4+
size: 0.03
5+
pose: {x: 0.45, y: 0.25, z: 0.28, roll: 0, pitch: 0, yaw: 0}
6+
color: blue
7+
8+
red_sphere:
9+
shape: sphere
10+
size: 0.03
11+
pose: {x: 0.45, y: -0.25, z: 0.28, roll: 0, pitch: 0, yaw: 0}
12+
color: red
13+
14+
green_sphere:
15+
shape: sphere
16+
size: 0.03
17+
pose: {x: 0.45, y: 0.09, z: 0.28, roll: 0, pitch: 0, yaw: 0}
18+
color: green
19+
20+
purple_sphere:
21+
shape: sphere
22+
size: 0.03
23+
pose: {x: 0.45, y: -0.09, z: 0.28, roll: 0, pitch: 0, yaw: 0}
24+
color: purple
25+
26+
green_cylinder:
27+
shape: cylinder
28+
size: {radius: 0.03, height: 0.05}
29+
pose: {x: 0.65, y: -0.09, z: 0.28, roll: 0, pitch: 0, yaw: 0}
30+
color: green
31+
32+
purple_cylinder:
33+
shape: cylinder
34+
size: {radius: 0.02, height: 0.06}
35+
pose: {x: 0.65, y: 0.25, z: 0.28, roll: 0, pitch: 0, yaw: 0}
36+
color: purple
37+
38+
red_cylinder:
39+
shape: cylinder
40+
size: {radius: 0.02, height: 0.06}
41+
pose: {x: 0.65, y: 0.09, z: 0.28, roll: 0, pitch: 0, yaw: 0}
42+
color: red
43+
44+
blue_cylinder:
45+
shape: cylinder
46+
size: {radius: 0.03, height: 0.07}
47+
pose: {x: 0.65, y: -0.25, z: 0.28, roll: 0, pitch: 0, yaw: 0}
48+
color: blue
49+
50+
51+
obstacles:
52+
conveyor:
53+
shape: box
54+
size: {x: 0.8, y: 2.4, z: 0.1}
55+
pose: {x: 0.6, y: 0, z: 0.95, roll: 0, pitch: 0, yaw: 0}
56+
57+
# target:
58+
# shape: box
59+
# size: {x: 0.5, y: 0.5, z: 0.35}
60+
# pose: {x: -0.5, y: 0.0, z: 0.76, roll: 0, pitch: 0, yaw: 0}
61+
62+
targets:
63+
target1: {x: -0.68, y: -0.18, z: 0.25}
64+
target2: {x: -0.68, y: -0.06, z: 0.25}
65+
target3: {x: -0.68, y: 0.06, z: 0.25}
66+
target4: {x: -0.68, y: 0.18, z: 0.25}
67+
target5: {x: -0.56, y: -0.18, z: 0.25}
68+
target6: {x: -0.56, y: -0.06, z: 0.25}
69+
target7: {x: -0.56, y: 0.06, z: 0.25}
70+
target8: {x: -0.56, y: 0.18, z: 0.25}
71+
target9: {x: -0.44, y: -0.18, z: 0.25}
72+
target10: {x: -0.44, y: -0.06, z: 0.25}
73+
target11: {x: -0.44, y: 0.06, z: 0.25}
74+
target12: {x: -0.44, y: 0.18, z: 0.25}
75+
target13: {x: -0.32, y: -0.18, z: 0.25}
76+
target14: {x: -0.32, y: -0.06, z: 0.25}
77+
target15: {x: -0.32, y: 0.06, z: 0.25}
78+
target16: {x: -0.32, y: 0.18, z: 0.25}
79+
80+
robot:
81+
pose: {x: 0, y: 0, z: 0.0, roll: 0, pitch: 0, yaw: 0}
Binary file not shown.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0"?>
2+
<robot xmlns:xacro="http://ros.org/wiki/xacro">
3+
4+
<link name="base_camera_link">
5+
6+
<inertial>
7+
<origin xyz="-0.00936 -0.00003 -0.00273" rpy="0 0 0"/>
8+
<mass value="0.2197"/>
9+
<inertia ixx="4.29247e-06" ixy="0" ixz="2.565e-08"
10+
iyy="8.027e-08" iyz="0"
11+
izz="4.27339e-06"/>
12+
</inertial>
13+
14+
<visual>
15+
<geometry>
16+
<mesh filename="file://$(find ros2srrc_ur5_gazebo)/meshes/kinetic.glb"/>
17+
</geometry>
18+
</visual>
19+
20+
<collision>
21+
<geometry>
22+
<mesh filename="file://$(find ros2srrc_ur5_gazebo)/meshes/kinetic.stl"/>
23+
</geometry>
24+
</collision>
25+
26+
</link>
27+
28+
29+
<joint name="base_camera_joint" type="fixed">
30+
<parent link="base_link"/>
31+
<child link="base_camera_link"/>
32+
<origin xyz="${cam_base_px} ${cam_base_py} ${cam_base_pz}"
33+
rpy="${cam_base_or} ${cam_base_op} ${cam_base_oy}"/>
34+
</joint>
35+
36+
<link name="base_camera_optical_link"/>
37+
38+
<joint name="base_camera_optical_joint" type="fixed">
39+
<parent link="base_camera_link"/>
40+
<child link="base_camera_optical_link"/>
41+
<origin xyz="0 0 0" rpy="-1.57 0 -1.57"/>
42+
</joint>
43+
44+
<gazebo reference="base_camera_link">
45+
46+
<sensor name="base_camera" type="rgbd_camera">
47+
48+
<always_on>true</always_on>
49+
<visualize>true</visualize>
50+
<update_rate>30</update_rate>
51+
52+
<topic>/base_camera</topic>
53+
54+
<camera>
55+
56+
<horizontal_fov>1.047</horizontal_fov>
57+
58+
<image>
59+
<width>640</width>
60+
<height>480</height>
61+
<format>R8G8B8</format>
62+
</image>
63+
64+
<clip>
65+
<near>0.05</near>
66+
<far>8.0</far>
67+
</clip>
68+
69+
</camera>
70+
71+
</sensor>
72+
73+
</gazebo>
74+
75+
</robot>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
<robot xmlns:xacro="http://ros.org/wiki/xacro">
3+
<xacro:property name="cam_base_px" value="1.0" />
4+
<xacro:property name="cam_base_py" value="0.0" />
5+
<xacro:property name="cam_base_pz" value="1.4" />
6+
<xacro:property name="cam_base_or" value="1.57" />
7+
<xacro:property name="cam_base_op" value="0.4" />
8+
<xacro:property name="cam_base_oy" value="3.14" />
9+
<xacro:property name="parent_base" value="world" />
10+
</robot>
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0"?>
2+
<robot xmlns:xacro="http://ros.org/wiki/xacro">
3+
4+
<link name="hand_camera_link">
5+
6+
<inertial>
7+
<origin xyz="-0.00936 -0.00003 -0.00273" rpy="0 0 0"/>
8+
<mass value="0.2197"/>
9+
<inertia ixx="4.29247e-06" ixy="0" ixz="2.565e-08"
10+
iyy="8.027e-08" iyz="0"
11+
izz="4.27339e-06"/>
12+
</inertial>
13+
14+
<visual>
15+
<geometry>
16+
<mesh filename="file://$(find ros2srrc_ur5_gazebo)/meshes/kinetic.glb"/>
17+
</geometry>
18+
</visual>
19+
20+
<collision>
21+
<geometry>
22+
<mesh filename="file://$(find ros2srrc_ur5_gazebo)/meshes/kinetic.stl"/>
23+
</geometry>
24+
</collision>
25+
26+
</link>
27+
28+
<joint name="hand_camera_joint" type="fixed">
29+
<parent link="tool0"/>
30+
<child link="hand_camera_link"/>
31+
<origin xyz="${cam_hand_px} ${cam_hand_py} ${cam_hand_pz}"
32+
rpy="${cam_hand_or} ${cam_hand_op} ${cam_hand_oy}"/>
33+
</joint>
34+
35+
<link name="hand_camera_optical_link"/>
36+
37+
<joint name="hand_camera_optical_joint" type="fixed">
38+
<parent link="hand_camera_link"/>
39+
<child link="hand_camera_optical_link"/>
40+
<origin xyz="0 0 0" rpy="-1.57 0 -1.57"/>
41+
</joint>
42+
43+
<gazebo reference="hand_camera_link">
44+
45+
<sensor name="hand_camera" type="rgbd_camera">
46+
47+
<always_on>true</always_on>
48+
<visualize>true</visualize>
49+
<update_rate>30</update_rate>
50+
51+
<topic>/hand_camera</topic>
52+
53+
<camera>
54+
55+
<horizontal_fov>1.047</horizontal_fov>
56+
57+
<image>
58+
<width>640</width>
59+
<height>480</height>
60+
<format>R8G8B8</format>
61+
</image>
62+
63+
<clip>
64+
<near>0.05</near>
65+
<far>8.0</far>
66+
</clip>
67+
68+
</camera>
69+
70+
</sensor>
71+
72+
</gazebo>
73+
74+
</robot>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
<robot xmlns:xacro="http://ros.org/wiki/xacro">
3+
<xacro:property name="cam_hand_px" value="0.0" />
4+
<xacro:property name="cam_hand_py" value="-0.067" />
5+
<xacro:property name="cam_hand_pz" value="0.03" />
6+
<xacro:property name="cam_hand_or" value="3.14" />
7+
<xacro:property name="cam_hand_op" value="-1.57" />
8+
<xacro:property name="cam_hand_oy" value="0" />
9+
<xacro:property name="parent_hand" value="tool0" />
10+
</robot>

0 commit comments

Comments
 (0)