Создана базовая конфигурация робота

This commit is contained in:
Даниил Грабарь
2025-11-20 14:23:10 +10:00
commit a24cc16e0a
33 changed files with 6802 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
log/
install/
build/
.vscode
.idea
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+209
View File
@@ -0,0 +1,209 @@
Panels:
- Class: rviz_common/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
- /RobotModel1
- /RobotModel1/Mass Properties1
Splitter Ratio: 0.5
Tree Height: 834
- Class: rviz_common/Selection
Name: Selection
- Class: rviz_common/Tool Properties
Expanded:
- /2D Goal Pose1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.5886790156364441
- Class: rviz_common/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz_common/Time
Experimental: false
Name: Time
SyncMode: 0
SyncSource: ""
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz_default_plugins/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.029999999329447746
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 1
Class: rviz_default_plugins/RobotModel
Collision Enabled: false
Description File: ""
Description Source: Topic
Description Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /robot_description
Enabled: true
Links:
All Links Enabled: true
Expand Joint Details: false
Expand Link Details: false
Expand Tree: false
Link Tree Style: Links in Alphabetic Order
base_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link1:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link2:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link3:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link4:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link5:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link6:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link7:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
link7_ee:
Alpha: 1
Show Axes: false
Show Trail: false
world:
Alpha: 1
Show Axes: false
Show Trail: false
Mass Properties:
Inertia: false
Mass: false
Name: RobotModel
TF Prefix: ""
Update Interval: 0
Value: true
Visual Enabled: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Fixed Frame: base_link
Frame Rate: 30
Name: root
Tools:
- Class: rviz_default_plugins/Interact
Hide Inactive Objects: true
- Class: rviz_default_plugins/MoveCamera
- Class: rviz_default_plugins/Select
- Class: rviz_default_plugins/FocusCamera
- Class: rviz_default_plugins/Measure
Line color: 128; 128; 0
- Class: rviz_default_plugins/SetInitialPose
Covariance x: 0.25
Covariance y: 0.25
Covariance yaw: 0.06853891909122467
Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /initialpose
- Class: rviz_default_plugins/SetGoal
Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /goal_pose
- Class: rviz_default_plugins/PublishPoint
Single click: true
Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /clicked_point
Transformation:
Current:
Class: rviz_default_plugins/TF
Value: true
Views:
Current:
Class: rviz_default_plugins/Orbit
Distance: 3.324988842010498
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: 0
Y: 0
Z: 0
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.7203982472419739
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 5.598599910736084
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 1128
Hide Left Dock: false
Hide Right Dock: false
QMainWindow State: 000000ff00000000fd000000040000000000000156000003ccfc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003c000003cc000000c800fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000003ccfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003c000003cc000000a200fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007800000003efc0100000002fb0000000800540069006d00650100000000000007800000023200fffffffb0000000800540069006d006501000000000000045000000000000000000000050f000003cc00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 1920
X: 0
Y: 0
@@ -0,0 +1,71 @@
from launch_ros.actions import Node
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch_ros.substitutions import FindPackageShare
from launch.substitutions import Command, LaunchConfiguration, PathJoinSubstitution
def generate_launch_description():
package_name="iiwa_bringup"
description_package_name = "iiwa_description"
declare_model_arg = DeclareLaunchArgument(
name="model",
default_value=PathJoinSubstitution([
FindPackageShare(description_package_name),
"urdf",
"iiwa7.urdf.xacro"
]),
description="Path to the robot URDF/Xacro file"
)
declare_robot_name_arg = DeclareLaunchArgument(
name="robot_name",
default_value="iiwa7",
description="Robot name fro the TF tree"
)
robot_description = Command([
"xacro ", LaunchConfiguration('model'),
" robot_name:=", LaunchConfiguration("robot_name")
])
robot_state_publisher = Node(
package="robot_state_publisher",
executable="robot_state_publisher",
name="robot_state_publisher",
output="both",
parameters=[{
"robot_description": robot_description,
"use_sim_time": False,
}]
)
joint_state_publisher_gui = Node(
package='joint_state_publisher_gui',
executable='joint_state_publisher_gui',
name='joint_state_publisher_gui',
parameters=[{"use_sim_time": False}]
)
rviz_config = PathJoinSubstitution([
FindPackageShare(package_name),
'config',
'rviz_iiwa.rviz'
])
rviz = Node(
package='rviz2',
executable='rviz2',
name='rviz2',
arguments=['-d', rviz_config],
output='log'
)
return LaunchDescription([
declare_model_arg,
declare_robot_name_arg,
robot_state_publisher,
joint_state_publisher_gui,
rviz
])
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>iiwa_bringup</name>
<version>0.0.1</version>
<description>TODO: Package description</description>
<maintainer email="grabardm@ml-dev.ru">Grabar Daniil</maintainer>
<license>Apache-2.0</license>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>ament_xmllint</test_depend>
<test_depend>python3-pytest</test_depend>
<export>
<build_type>ament_python</build_type>
</export>
</package>
+4
View File
@@ -0,0 +1,4 @@
[develop]
script_dir=$base/lib/iiwa_bringup
[install]
install_scripts=$base/lib/iiwa_bringup
+63
View File
@@ -0,0 +1,63 @@
import os
from setuptools import find_packages, setup
EXCLUDES = {'.DS_Store', 'Thumbs.db'}
EXCLUDE_DIRS = {'__pycache__', '.pytest_cache', '.git', '.idea'}
def data_files_from_tree(src_dir: str, dst_root: str) -> list:
"""
Собирает data_files в формате, подходящем для setuptools.
Возвращает список пар (dst_path, [file1, file2, ...]).
"""
entries = []
for root, dirs, files in os.walk(src_dir):
# исключаем служебные директории
dirs[:] = [d for d in dirs if d not in EXCLUDE_DIRS]
file_list = [os.path.join(root, f) for f in files if f not in EXCLUDES]
if not file_list:
continue
rel = os.path.relpath(root, src_dir)
dst_dir = os.path.join(dst_root, rel) if rel != '.' else dst_root
entries.append((dst_dir, file_list))
return entries
package_name = 'iiwa_bringup'
launch_intsall_root = f"share/{package_name}/launch"
config_intsall_root = f"share/{package_name}/config"
data_files = [
('share/' + package_name, ['package.xml']),
]
data_files += data_files_from_tree('launch', launch_intsall_root)
data_files += data_files_from_tree('config', config_intsall_root)
setup(
name=package_name,
version='0.0.1',
packages=find_packages(exclude=['test']),
data_files=data_files,
install_requires=['setuptools'],
zip_safe=True,
maintainer='Grabar Daniil',
maintainer_email='grabardm@ml-dev.ru',
description='TODO: Package description',
license='Apache-2.0',
extras_require={
'test': [
'pytest',
],
},
entry_points={
'console_scripts': [
],
},
)
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>iiwa_description</name>
<version>0.0.1</version>
<description>TODO: Package description</description>
<maintainer email="grabardm@ml-dev.ru">Grabar Daniil</maintainer>
<license>Apache-2.0</license>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>ament_xmllint</test_depend>
<test_depend>python3-pytest</test_depend>
<export>
<build_type>ament_python</build_type>
</export>
</package>
+4
View File
@@ -0,0 +1,4 @@
[develop]
script_dir=$base/lib/iiwa_description
[install]
install_scripts=$base/lib/iiwa_description
+61
View File
@@ -0,0 +1,61 @@
import os
from setuptools import find_packages, setup
EXCLUDES = {'.DS_Store', 'Thumbs.db'}
EXCLUDE_DIRS = {'__pycache__', '.pytest_cache', '.git', '.idea'}
def data_files_from_tree(src_dir: str, dst_root: str) -> list:
"""
Собирает data_files в формате, подходящем для setuptools.
Возвращает список пар (dst_path, [file1, file2, ...]).
"""
entries = []
for root, dirs, files in os.walk(src_dir):
# исключаем служебные директории
dirs[:] = [d for d in dirs if d not in EXCLUDE_DIRS]
file_list = [os.path.join(root, f) for f in files if f not in EXCLUDES]
if not file_list:
continue
rel = os.path.relpath(root, src_dir)
dst_dir = os.path.join(dst_root, rel) if rel != '.' else dst_root
entries.append((dst_dir, file_list))
return entries
package_name = 'iiwa_description'
meshes_intsall_root = f"share/{package_name}/meshes"
urdf_intsall_root = f"share/{package_name}/urdf"
data_files = [
('share/' + package_name, ['package.xml']),
]
data_files += data_files_from_tree('meshes', meshes_intsall_root)
data_files += data_files_from_tree('urdf', urdf_intsall_root)
setup(
name=package_name,
version='0.0.1',
packages=find_packages(exclude=['test']),
data_files=data_files,
install_requires=['setuptools'],
zip_safe=True,
maintainer='Grabar Daniil',
maintainer_email='grabardm@ml-dev.ru',
description='TODO: Package description',
license='Apache-2.0',
extras_require={
'test': [
'pytest',
],
},
entry_points={
'console_scripts': [
],
},
)
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="iiwa7">
<xacro:include filename="$(find iiwa_description)/urdf/params.xacro"/>
<xacro:include filename="$(find iiwa_description)/urdf/macros.xacro"/>
<xacro:include filename="$(find iiwa_description)/urdf/links.xacro"/>
<xacro:include filename="$(find iiwa_description)/urdf/joints.xacro"/>
</robot>
+59
View File
@@ -0,0 +1,59 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" xacro:version="1.0">
<xacro:include filename="macros.xacro" />
<joint name="world_base_joint" type="fixed">
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<parent link="world"/>
<child link="base_link"/>
</joint>
<!-- joint1 -->
<xacro:revolute_joint jname="joint1" parent="base_link" child="link1"
xyz="0 0 0.3375" rpy="0 0 0" axis="0 0 -1"
lower="-2.97" upper="2.97" effort="176" velocity="1.71"/>
<!-- joint2 -->
<xacro:revolute_joint jname="joint2" parent="link1" child="link2"
xyz="0 0 0" rpy="-1.5708 0 0" axis="0 0 1"
lower="-2.09" upper="2.09" effort="176" velocity="1.71"/>
<!-- joint3 -->
<xacro:revolute_joint jname="joint3" parent="link2" child="link3"
xyz="0 -0.3993 0" rpy="1.5708 0 0" axis="0 0 -1"
lower="-2.97" upper="2.97" effort="110" velocity="1.75"/>
<!-- joint4 -->
<xacro:revolute_joint jname="joint4" parent="link3" child="link4"
xyz="0 0 0" rpy="-1.5708 0 0" axis="0 0 -1"
lower="-2.09" upper="2.09" effort="110" velocity="2.27"/>
<!-- joint5 -->
<xacro:revolute_joint jname="joint5" parent="link4" child="link5"
xyz="0 -0.3993 0" rpy="1.5708 0 0" axis="0 0 -1"
lower="-2.97" upper="2.97" effort="110" velocity="2.44"/>
<!-- joint6 -->
<xacro:revolute_joint jname="joint6" parent="link5" child="link6"
xyz="0 0 0" rpy="-1.5708 0 0" axis="0 0 1"
lower="-2.09" upper="2.09" effort="40" velocity="3.14"/>
<!-- joint7 -->
<xacro:revolute_joint jname="joint7" parent="link6" child="link7"
xyz="0 -0.126 0" rpy="1.5708 0 0" axis="0 0 1"
lower="-3.05" upper="3.05" effort="40" velocity="3.14"/>
<joint name="tools_joint" type="fixed">
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
<parent link="link7"/>
<child link="link7_ee"/>
</joint>
</robot>
+106
View File
@@ -0,0 +1,106 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" xacro:version="1.0">
<link name="world" />
<xacro:iiwa_link name="base_link"
xyz_iner="-0.012856764088336 7.05371084939836E-07 0.0679655592591469"
mass="${mass_base}"
ixx="0.111239565538359"
ixy="-3.81097437253422E-07"
ixz="0.00486659750522703"
iyy="0.139017104291389"
iyz="7.87871531503135E-07"
izz="0.133028621926226"
mesh_vision="${mesh_base_v}"
mesh_collision="${mesh_base_c}"/>
<xacro:iiwa_link name="link1"
xyz_iner="-4.78790441849064E-07 -0.0348192058752328 -0.0692021315991948"
mass="${mass_link1}"
ixx="0.133321610552378"
ixy="-5.3830316300325E-07"
ixz="9.16989471201082E-07"
iyy="0.127213841326705"
iyz="0.0236704924620788"
izz="0.047155320135412"
mesh_vision="${mesh_link1_v}"
mesh_collision="${mesh_link1_c}"/>
<xacro:iiwa_link name="link2"
xyz_iner="-5.2906167189587E-07 -0.0869460684741495 0.0287906957294968"
mass="${mass_link2}"
ixx="0.197631241693207"
ixy="9.50708464039702E-08"
ixz="-3.51963818841194E-07"
iyy="0.0602720613821397"
iyz="-0.0367196702125505"
izz="0.187557269753206"
mesh_vision="${mesh_link2_v}"
mesh_collision="${mesh_link2_c}"/>
<xacro:iiwa_link name="link3"
xyz_iner="8.94264666317923E-07 0.0343188244798595 -0.0692020521907963"
mass="${mass_link3}"
ixx="0.133322417523041"
ixy="-2.72387851582384E-07"
ixz="-2.31579646685682E-07"
iyy="0.127213838333813"
iyz="-0.0236710393468367"
izz="0.0471557500559207"
mesh_vision="${mesh_link3_v}"
mesh_collision="${mesh_link3_c}"/>
<xacro:iiwa_link name="link4"
xyz_iner="9.9343785475714E-08 -0.0869462342636022 -0.0292907044657978"
mass="${mass_link4}"
ixx="0.197630839812683"
ixy="-3.9082887807781E-07"
ixz="-3.24564289064112E-07"
iyy="0.0602723071447973"
iyz="0.0367195588674331"
izz="0.187556898167347"
mesh_vision="${mesh_link4_v}"
mesh_collision="${mesh_link4_c}"/>
<xacro:iiwa_link name="link5"
xyz_iner="-1.5059645121912E-07 -0.0298223596156005 -0.116233672352317"
mass="${mass_link5}"
ixx="0.0529038960536523"
ixy="6.86274869084724E-08"
ixz="3.57472026918582E-07"
iyy="0.0444942713885967"
iyz="0.0174914068345989"
izz="0.0239916848880951"
mesh_vision="${mesh_link5_v}"
mesh_collision="${mesh_link5_c}"/>
<xacro:iiwa_link name="link6"
xyz_iner="3.09820422451923E-06 -0.000588422963829549 0.000348569863276505"
mass="${mass_link6}"
ixx="0.0384515762635731"
ixy="-6.70279497724119E-08"
ixz="2.19173188415509E-06"
iyy="0.0280010940276735"
iyz="-0.00192249677468735"
izz="0.0368124806983828"
mesh_vision="${mesh_link6_v}"
mesh_collision="${mesh_link6_c}"/>
<xacro:iiwa_link name="link7"
xyz_iner="5.28878934317328E-07 3.37199922245852E-07 -0.0274928177649973"
mass="${mass_link7}"
ixx="0.00177365937026673"
ixy="-1.2410521430667E-07"
ixz="-2.95409038849194E-08"
iyy="0.00177328722902027"
iyz="-1.57567641084958E-08"
izz="0.00272748710623445"
mesh_vision="${mesh_link7_v}"
mesh_collision="${mesh_link7_c}"/>
<link name="link7_ee" />
</robot>
+43
View File
@@ -0,0 +1,43 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" xacro:version="1.0">
<!-- Макрос для описания link-а с использованием переменных путей к мешам и массы -->
<xacro:macro name="iiwa_link" params="name xyz_iner mass ixx ixy ixz iyy iyz izz mesh_vision mesh_collision">
<link name="${name}">
<inertial>
<origin xyz="${xyz_iner}" rpy="0 0 0"/>
<mass value="${mass}"/>
<inertia ixx="${ixx}" ixy="${ixy}" ixz="${ixz}" iyy="${iyy}" iyz="${iyz}" izz="${izz}"/>
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="${mesh_vision}"/>
</geometry>
<material name="iiwa_material">
<color rgba="${color_r} ${color_g} ${color_b} ${color_a}"/>
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="${mesh_collision}"/>
</geometry>
</collision>
</link>
</xacro:macro>
<!-- Макрос для описания соединений -->
<xacro:macro name="revolute_joint" params="jname parent child xyz rpy axis lower upper effort velocity">
<joint name="${jname}" type="revolute">
<origin xyz="${xyz}" rpy="${rpy}"/>
<parent link="${parent}"/>
<child link="${child}"/>
<axis xyz="${axis}"/>
<limit lower="${lower}" upper="${upper}" effort="${effort}" velocity="${velocity}"/>
</joint>
</xacro:macro>
</robot>
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" xacro:version="1.0">
<xacro:property name="pkg" value="package://iiwa_description/meshes"/>
<!-- Меши отображения -->
<xacro:property name="mesh_base_v" value="${pkg}/visual/base_link.DAE"/>
<xacro:property name="mesh_link1_v" value="${pkg}/visual/link1.DAE"/>
<xacro:property name="mesh_link2_v" value="${pkg}/visual/link2.DAE"/>
<xacro:property name="mesh_link3_v" value="${pkg}/visual/link3.DAE"/>
<xacro:property name="mesh_link4_v" value="${pkg}/visual/link4.DAE"/>
<xacro:property name="mesh_link5_v" value="${pkg}/visual/link5.DAE"/>
<xacro:property name="mesh_link6_v" value="${pkg}/visual/link6.DAE"/>
<xacro:property name="mesh_link7_v" value="${pkg}/visual/link7.DAE"/>
<!-- Меши колизии -->
<xacro:property name="mesh_base_c" value="${pkg}/collision/base_link.STL"/>
<xacro:property name="mesh_link1_c" value="${pkg}/collision/link1.STL"/>
<xacro:property name="mesh_link2_c" value="${pkg}/collision/link2.STL"/>
<xacro:property name="mesh_link3_c" value="${pkg}/collision/link3.STL"/>
<xacro:property name="mesh_link4_c" value="${pkg}/collision/link4.STL"/>
<xacro:property name="mesh_link5_c" value="${pkg}/collision/link5.STL"/>
<xacro:property name="mesh_link6_c" value="${pkg}/collision/link6.STL"/>
<xacro:property name="mesh_link7_c" value="${pkg}/collision/link7.STL"/>
</robot>
+23
View File
@@ -0,0 +1,23 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" xacro:version="1.0">
<!-- Массы звеньев -->
<xacro:property name="mass_base" value="30.2763517543289"/>
<xacro:property name="mass_link1" value="21.1627406257303"/>
<xacro:property name="mass_link2" value="25.1403147192251"/>
<xacro:property name="mass_link3" value="21.1627874292289"/>
<xacro:property name="mass_link4" value="25.140328983289"/>
<xacro:property name="mass_link5" value="9.53466992761605"/>
<xacro:property name="mass_link6" value="14.2007599322815"/>
<xacro:property name="mass_link7" value="2.47156969383589"/>
<!-- Общие цвета / материал -->
<xacro:property name="color_r" value="0.647058823529412"/>
<xacro:property name="color_g" value="0.619607843137255"/>
<xacro:property name="color_b" value="0.588235294117647"/>
<xacro:property name="color_a" value="1"/>
<xacro:include filename="$(find iiwa_description)/urdf/meshes.xacro" />
</robot>