Refactor code structure for improved readability and maintainability

This commit is contained in:
Даниил Грабарь
2026-04-14 18:06:58 +10:00
parent a913d512b9
commit 1156c768bb
13 changed files with 220 additions and 6765 deletions
File diff suppressed because it is too large Load Diff
@@ -1,8 +1,8 @@
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor/>
<created>2026-04-10T13:27:38.363305</created>
<modified>2026-04-10T13:27:38.363309</modified>
<created>2026-04-14T16:59:02.416745</created>
<modified>2026-04-14T16:59:02.416750</modified>
<unit name="meter" meter="1.0"/>
<up_axis>Z_UP</up_axis>
</asset>
@@ -18,7 +18,7 @@
<color>0.0 0.0 0.0 1.0</color>
</ambient>
<diffuse>
<color>0.6941176652908325 0.572549045085907 0.6196078658103943 1.0</color>
<color>0.6941176652908325 0.3921568691730499 0.1725490242242813 1.0</color>
</diffuse>
<specular>
<color>1 1 1 1.0</color>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -10
View File
@@ -16,7 +16,7 @@
<xacro:include filename="$(find iiwa_description)/urdf/links.xacro"/>
<xacro:include filename="$(find iiwa_description)/urdf/joints.xacro"/>
<xacro:include filename="$(find iiwa_description)/urdf/tools/patron.xacro"/>
<xacro:include filename="$(find iiwa_description)/urdf/tools/patronv2.xacro"/>
<xacro:if value="$(arg simulate)">
@@ -32,15 +32,6 @@
</ros>
</device>
<device reference="example_camera" type="Camera">
<ros>
<topicName>/camera_example/color</topicName>
<updateRate>30</updateRate>
<alwaysOn>True</alwaysOn>
<frameName>example_camera</frameName>
</ros>
</device>
<device reference="camera_depth" type="RangeFinder">
<ros>
<topicName>/camera/depth</topicName>
+65 -41
View File
@@ -4,15 +4,14 @@
<link name="camera_holder">
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="0.09"/>
<inertia ixx="0.0" ixy="0.0" ixz="0.0"
iyy="0.0" iyz="0.0" izz="0.0"/>
<mass value="0.15"/>
<inertia ixx="0.000073" ixy="0.0" ixz="0.0"
iyy="0.000136" iyz="0.0" izz="0.000186"/>
</inertial>
<visual name="">
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<!-- <mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/tools/CameraHolder.dae" /> -->
<mesh filename="package://iiwa_description/resource/meshes/tools/CameraHolder.dae"/>
<mesh filename="package://iiwa_description/resource/meshes/tools/CameraHolder.dae" />
</geometry>
</visual>
<collision>
@@ -29,39 +28,17 @@
</collision>
</link>
<link name="camera_hand">
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="0.0"/>
<inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
</inertial>
<visual>
<origin xyz="-0.06 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<!-- <mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/tools/cameraD455.dae" /> -->
<mesh filename="package://iiwa_description/resource/meshes/tools/cameraD455.dae"/>
</geometry>
</visual>
<collision>
<origin xyz="0.0 0.014 0.0125" rpy="0.0 0.0 0.0"/>
<geometry>
<box size="0.12 0.025 0.025"/>
</geometry>
</collision>
</link>
<link name="patron">
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="0.03"/>
<inertia ixx="0.0" ixy="0.0" ixz="0.0"
iyy="0.0" iyz="0.0" izz="0.0"/>
<mass value="0.35"/>
<inertia ixx="0.000127" ixy="0.0" ixz="0.0"
iyy="0.000127" iyz="0.0" izz="0.000077"/>
</inertial>
<visual name="">
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<!-- <mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/tools/patron.dae" /> -->
<mesh filename="package://iiwa_description/resource/meshes/tools/patron.dae"/>
<mesh filename="package://iiwa_description/resource/meshes/tools/patron.dae" />
</geometry>
</visual>
<collision>
@@ -72,36 +49,84 @@
</collision>
</link>
<link name="camera_corner">
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="0.1"/>
<inertia ixx="0.0000094" ixy="0.0" ixz="0.0"
iyy="0.000131" iyz="0.0" izz="0.000135"/>
</inertial>
<visual name="">
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<mesh filename="package://iiwa_description/resource/meshes/tools/camera_corner.dae" />
</geometry>
</visual>
<collision>
<origin xyz="0 0.116 0.022" rpy="0.0 0.0 0.0"/>
<geometry>
<box size="0.124 0.029 0.017"/>
</geometry>
</collision>
</link>
<link name="camera_hand">
<inertial>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<mass value="0.2"/>
<inertia ixx="0.000021" ixy="0.0" ixz="0.0"
iyy="0.000250" iyz="0.0" izz="0.000250"/>
</inertial>
<visual>
<origin xyz="-0.06 0.0 0.0" rpy="0.0 0.0 0.0"/>
<geometry>
<mesh filename="package://iiwa_description/resource/meshes/tools/cameraD455.dae" />
</geometry>
</visual>
<collision>
<origin xyz="0.0 0.014 0.0125" rpy="0.0 0.0 0.0"/>
<geometry>
<box size="0.12 0.025 0.025"/>
</geometry>
</collision>
</link>
<link name="camera_optical_frame"/>
<joint name="tool" type="fixed">
<parent link="link_ee"/>
<child link="camera_holder"/>
<origin xyz="0 0 0" rpy="0 0 1.5708"/>
</joint>
<joint name="cameraHolder_patron" type="fixed">
<origin xyz="0.0 0.0 0.03" rpy="0.0 0.0 0.0"/>
<joint name="camera_holder_patron" type="fixed">
<origin xyz="0.0 0.0 0.032" rpy="0.0 0.0 0.0"/>
<parent link="camera_holder"/>
<child link="patron"/>
</joint>
<joint name="cameraHolder_cameraD455" type="fixed">
<origin xyz="0.0 0.1 0.014" rpy="0.0 0.0 0.0"/>
<joint name="camera_holder_corner" type="fixed">
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<parent link="camera_holder"/>
<child link="camera_corner"/>
</joint>
<joint name="camera_corner_camera" type="fixed">
<origin xyz="0.0 0.1 0.014" rpy="0.61 0.0 0.0"/>
<parent link="camera_corner"/>
<child link="camera_hand"/>
</joint>
<link name="camera_optical_frame"/>
<joint name="camera_hand_to_optical" type="fixed">
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 3.14159"/>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<parent link="camera_hand"/>
<child link="camera_optical_frame"/>
</joint>
<gazebo reference="camera_optical_frame">
<sensor type="camera" name="camera_rgb">
<camera>
<horizontal_fov>1.5708</horizontal_fov>
<horizontal_fov>1.3089969</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
@@ -120,7 +145,7 @@
<sensor type="depth" name="camera_depth">
<camera>
<horizontal_fov>1.5184</horizontal_fov>
<horizontal_fov>1.3089969</horizontal_fov>
<image>
<width>640</width>
<height>480</height>
@@ -140,7 +165,6 @@
<stddev>0.02</stddev>
</noise>
</sensor>
</gazebo>
</robot>