Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
|
||||
name: d455_top
|
||||
# Положение в сцене (x y z)
|
||||
translation: "0 0 2.49"
|
||||
translation: "0.25 0 2.49"
|
||||
# Ориентация (ось_x ось_y ось_z угол_рад)
|
||||
rotation: "0 0 1 0"
|
||||
rotation: "0 1 0 1.5708"
|
||||
|
||||
# Блок camera
|
||||
# Если блок отсутствует — Camera-девайс не создаётся
|
||||
@@ -37,16 +37,16 @@ camera:
|
||||
# Если блок отсутствует - RangeFinder-девайс не создаётся
|
||||
# Поля соответствуют документации Webots:
|
||||
# https://cyberbotics.com/doc/reference/rangefinder
|
||||
# range_finder:
|
||||
# width: 640
|
||||
# height: 480
|
||||
# fieldOfView: 1.047
|
||||
# minRange: 0.1
|
||||
# maxRange: 5.0
|
||||
# resolution: -1.0 # -1 = без ограничений по дискретизации
|
||||
# noise: 0.0
|
||||
range_finder:
|
||||
width: 640
|
||||
height: 480
|
||||
fieldOfView: 1.047
|
||||
minRange: 0.1
|
||||
maxRange: 5.0
|
||||
resolution: -1.0 # -1 = без ограничений по дискретизации
|
||||
noise: 0.0
|
||||
|
||||
# # Параметры публикации в ROS2
|
||||
# ros:
|
||||
# topic: /d455_top/depth/image_raw
|
||||
# update_rate: 15
|
||||
# Параметры публикации в ROS2
|
||||
ros:
|
||||
topic: /d455_top/depth/image_raw
|
||||
update_rate: 15
|
||||
@@ -20,8 +20,10 @@
|
||||
<joint name="joint7"/>
|
||||
<joint name="tools_joint"/>
|
||||
<joint name="tool"/>
|
||||
<joint name="cameraHolder_patron"/>
|
||||
<joint name="cameraHolder_cameraD455"/>
|
||||
<joint name="camera_holder_patron"/>
|
||||
<joint name="camera_holder_corner"/>
|
||||
<joint name="camera_corner_camera"/>
|
||||
<joint name="camera_hand_to_optical"/>
|
||||
</group>
|
||||
<!--GROUP STATES: Purpose: Define a named state for a particular group, in terms of joint values. This is useful to define states like 'folded arms'-->
|
||||
<group_state name="home" group="iiwa_arm">
|
||||
@@ -86,7 +88,18 @@
|
||||
<disable_collisions link1="link1" link2="camera_holder" reason="Never"/>
|
||||
<disable_collisions link1="base_link" link2="camera_holder" reason="Never"/>
|
||||
<disable_collisions link1="camera_holder" link2="patron" reason="Adjacent"/>
|
||||
<disable_collisions link1="camera_hand" link2="camera_holder" reason="Adjacent"/>
|
||||
<disable_collisions link1="camera_holder" link2="camera_corner" reason="Adjacent"/>
|
||||
<disable_collisions link1="camera_corner" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="camera_corner" link2="link7" reason="Never"/>
|
||||
<disable_collisions link1="camera_corner" link2="link6" reason="Never"/>
|
||||
<disable_collisions link1="camera_corner" link2="link5" reason="Never"/>
|
||||
<disable_collisions link1="camera_corner" link2="link4" reason="Never"/>
|
||||
<disable_collisions link1="camera_corner" link2="link3" reason="Never"/>
|
||||
<disable_collisions link1="camera_corner" link2="link2" reason="Never"/>
|
||||
<disable_collisions link1="camera_corner" link2="link1" reason="Never"/>
|
||||
<disable_collisions link1="camera_corner" link2="base_link" reason="Never"/>
|
||||
<disable_collisions link1="camera_corner" link2="camera_hand" reason="Adjacent"/>
|
||||
<disable_collisions link1="camera_hand" link2="camera_holder" reason="Never"/>
|
||||
<disable_collisions link1="camera_hand" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="camera_hand" link2="link7" reason="Never"/>
|
||||
<disable_collisions link1="camera_hand" link2="link6" reason="Never"/>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -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
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user