chore: 框架科学优化前的完整基线
在开始'设备契约层 + 目录重构 + 通止规装配'改造之前,先钉住当前可运行状态, 使后续任何删除/重构都可回退。 本基线包含: - 现有 ROS 2 工作区全部源码(arm_application / arm_control / arm_bringup 等) - 官方 flexiv_ros2 栈(含 flexiv_hardware / flexiv_controllers 等符号链接) - 设备契约层 src/arm_interfaces(新增,46 项单测通过) - devices/ 设备选型与品牌清单(新增) - scripts/gen_site_example.py 与由它生成的 config/site.example.yaml 按 .gitignore 排除:build/ / install/ / log/ / config/site.yaml / 模型权重二进制。
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
project(arm_description)
|
||||
|
||||
find_package(ament_cmake REQUIRED)
|
||||
|
||||
install(DIRECTORY urdf meshes rviz launch config
|
||||
DESTINATION share/${PROJECT_NAME}
|
||||
)
|
||||
|
||||
ament_package()
|
||||
@@ -0,0 +1,21 @@
|
||||
# Flexiv Rizon 4 — site robot Rizon4-063989
|
||||
robot_model: Rizon4
|
||||
robot_sn: Rizon4-063989
|
||||
dof: 7
|
||||
load_gripper: false
|
||||
|
||||
# Official flexiv_description: SN hyphen is kept in the prefix
|
||||
joint_prefix: "Rizon4-063989_"
|
||||
|
||||
joint_names:
|
||||
- joint1
|
||||
- joint2
|
||||
- joint3
|
||||
- joint4
|
||||
- joint5
|
||||
- joint6
|
||||
- joint7
|
||||
|
||||
base_frame: base_link
|
||||
ee_frame: tcp
|
||||
flange_frame: flange
|
||||
@@ -0,0 +1,70 @@
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument
|
||||
from launch.conditions import IfCondition, UnlessCondition
|
||||
from launch.substitutions import Command, LaunchConfiguration, PathJoinSubstitution
|
||||
from launch_ros.actions import Node
|
||||
from launch_ros.parameter_descriptions import ParameterValue
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
use_gui = LaunchConfiguration('use_gui')
|
||||
use_rviz = LaunchConfiguration('use_rviz')
|
||||
robot_sn = LaunchConfiguration('robot_sn')
|
||||
rizon_type = LaunchConfiguration('rizon_type')
|
||||
load_gripper = LaunchConfiguration('load_gripper')
|
||||
|
||||
urdf_path = PathJoinSubstitution(
|
||||
[FindPackageShare('arm_description'), 'urdf', 'arm.urdf.xacro']
|
||||
)
|
||||
rviz_config = PathJoinSubstitution(
|
||||
[FindPackageShare('flexiv_description'), 'rviz', 'view_rizon.rviz']
|
||||
)
|
||||
|
||||
robot_description = ParameterValue(
|
||||
Command([
|
||||
'xacro ', urdf_path,
|
||||
' robot_sn:=', robot_sn,
|
||||
' rizon_type:=', rizon_type,
|
||||
' load_gripper:=', load_gripper,
|
||||
]),
|
||||
value_type=str,
|
||||
)
|
||||
|
||||
return LaunchDescription([
|
||||
DeclareLaunchArgument('use_gui', default_value='true'),
|
||||
DeclareLaunchArgument('use_rviz', default_value='true'),
|
||||
DeclareLaunchArgument('robot_sn', default_value='Rizon4-063989'),
|
||||
DeclareLaunchArgument('rizon_type', default_value='Rizon4'),
|
||||
DeclareLaunchArgument('load_gripper', default_value='false'),
|
||||
|
||||
Node(
|
||||
package='robot_state_publisher',
|
||||
executable='robot_state_publisher',
|
||||
name='robot_state_publisher',
|
||||
parameters=[{'robot_description': robot_description}],
|
||||
output='screen',
|
||||
),
|
||||
Node(
|
||||
package='joint_state_publisher_gui',
|
||||
executable='joint_state_publisher_gui',
|
||||
name='joint_state_publisher_gui',
|
||||
condition=IfCondition(use_gui),
|
||||
output='screen',
|
||||
),
|
||||
Node(
|
||||
package='joint_state_publisher',
|
||||
executable='joint_state_publisher',
|
||||
name='joint_state_publisher',
|
||||
condition=UnlessCondition(use_gui),
|
||||
output='screen',
|
||||
),
|
||||
Node(
|
||||
package='rviz2',
|
||||
executable='rviz2',
|
||||
name='rviz2',
|
||||
arguments=['-d', rviz_config],
|
||||
condition=IfCondition(use_rviz),
|
||||
output='screen',
|
||||
),
|
||||
])
|
||||
@@ -0,0 +1,2 @@
|
||||
# Placeholder: put STL/DAE meshes here and reference them from URDF, e.g.:
|
||||
# package://arm_description/meshes/link1.stl
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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>arm_description</name>
|
||||
<version>0.1.0</version>
|
||||
<description>URDF/Xacro wrapper for Flexiv Rizon 4 via flexiv_description.</description>
|
||||
<maintainer email="dev@example.com">arm_dev</maintainer>
|
||||
<license>Apache-2.0</license>
|
||||
|
||||
<buildtool_depend>ament_cmake</buildtool_depend>
|
||||
|
||||
<exec_depend>flexiv_description</exec_depend>
|
||||
<exec_depend>robot_state_publisher</exec_depend>
|
||||
<exec_depend>joint_state_publisher</exec_depend>
|
||||
<exec_depend>joint_state_publisher_gui</exec_depend>
|
||||
<exec_depend>xacro</exec_depend>
|
||||
<exec_depend>rviz2</exec_depend>
|
||||
|
||||
<export>
|
||||
<build_type>ament_cmake</build_type>
|
||||
</export>
|
||||
</package>
|
||||
@@ -0,0 +1,58 @@
|
||||
Panels:
|
||||
Displays:
|
||||
class: rviz_common/Displays
|
||||
name: Displays
|
||||
displays:
|
||||
- class: rviz_default_plugins/Grid
|
||||
name: Grid
|
||||
enabled: true
|
||||
Cell Size: 0.25
|
||||
Reference Frame: <Fixed Frame>
|
||||
- class: rviz_default_plugins/RobotModel
|
||||
name: RobotModel
|
||||
enabled: true
|
||||
Description Source: Topic
|
||||
Description Topic:
|
||||
Value: /robot_description
|
||||
Visual Enabled: true
|
||||
Collision Enabled: false
|
||||
Alpha: 1
|
||||
- class: rviz_default_plugins/TF
|
||||
name: TF
|
||||
enabled: true
|
||||
Show Names: true
|
||||
Show Axes: true
|
||||
Frame Timeout: 15
|
||||
Marker Scale: 0.15
|
||||
Views:
|
||||
class: rviz_common/Views
|
||||
name: Views
|
||||
Current:
|
||||
class: rviz_default_plugins/Orbit
|
||||
name: Current View
|
||||
Distance: 2.2
|
||||
Focal Point:
|
||||
X: 0.25
|
||||
Y: 0.0
|
||||
Z: 0.35
|
||||
Pitch: 0.45
|
||||
Yaw: 0.85
|
||||
Visualization Manager:
|
||||
class: ""
|
||||
displays: ~
|
||||
tools:
|
||||
- class: rviz_default_plugins/Interact
|
||||
- class: rviz_default_plugins/MoveCamera
|
||||
- class: rviz_default_plugins/Select
|
||||
- class: rviz_default_plugins/FocusCamera
|
||||
views:
|
||||
current:
|
||||
class: rviz_default_plugins/Orbit
|
||||
Global Options:
|
||||
Background Color: 48; 48; 48
|
||||
# Official flexiv_description Fixed Frame (or Rizon4-063989_base_link)
|
||||
Fixed Frame: world
|
||||
Frame Rate: 30
|
||||
Window Geometry:
|
||||
Height: 800
|
||||
Width: 1200
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
|
||||
|
||||
<xacro:macro name="arm_gazebo" params="prefix">
|
||||
<gazebo reference="${prefix}base_link">
|
||||
<material>Gazebo/DarkGrey</material>
|
||||
</gazebo>
|
||||
<gazebo reference="${prefix}link1">
|
||||
<material>Gazebo/Red</material>
|
||||
</gazebo>
|
||||
<gazebo reference="${prefix}link2">
|
||||
<material>Gazebo/Blue</material>
|
||||
</gazebo>
|
||||
<gazebo reference="${prefix}link3">
|
||||
<material>Gazebo/Green</material>
|
||||
</gazebo>
|
||||
<gazebo reference="${prefix}link4">
|
||||
<material>Gazebo/Yellow</material>
|
||||
</gazebo>
|
||||
<gazebo reference="${prefix}link5">
|
||||
<material>Gazebo/Orange</material>
|
||||
</gazebo>
|
||||
<gazebo reference="${prefix}link6">
|
||||
<material>Gazebo/Purple</material>
|
||||
</gazebo>
|
||||
<gazebo reference="${prefix}link7">
|
||||
<material>Gazebo/Grey</material>
|
||||
</gazebo>
|
||||
</xacro:macro>
|
||||
|
||||
</robot>
|
||||
@@ -0,0 +1,204 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
|
||||
|
||||
<!--
|
||||
Lightweight 7-DOF kinematic stand-in for Flexiv Rizon 4.
|
||||
For accurate meshes/kinematics, install official flexiv_description
|
||||
and launch via arm_bringup (uses flexiv_description / flexiv_bringup).
|
||||
Joint names follow Flexiv convention: {prefix}joint1 .. {prefix}joint7
|
||||
where prefix is typically robot_sn with '-' replaced by '_', e.g. Rizon4_123456_
|
||||
-->
|
||||
|
||||
<xacro:macro name="arm_inertial_box" params="mass x y z">
|
||||
<inertial>
|
||||
<origin xyz="0 0 0" rpy="0 0 0"/>
|
||||
<mass value="${mass}"/>
|
||||
<inertia
|
||||
ixx="${(1/12)*mass*(y*y+z*z)}" ixy="0.0" ixz="0.0"
|
||||
iyy="${(1/12)*mass*(x*x+z*z)}" iyz="0.0"
|
||||
izz="${(1/12)*mass*(x*x+y*y)}"/>
|
||||
</inertial>
|
||||
</xacro:macro>
|
||||
|
||||
<xacro:macro name="arm_visual_cylinder" params="length radius rgba">
|
||||
<visual>
|
||||
<origin xyz="0 0 ${length/2}" rpy="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="${length}" radius="${radius}"/>
|
||||
</geometry>
|
||||
<material name="">
|
||||
<color rgba="${rgba}"/>
|
||||
</material>
|
||||
</visual>
|
||||
</xacro:macro>
|
||||
|
||||
<xacro:macro name="arm_collision_cylinder" params="length radius">
|
||||
<collision>
|
||||
<origin xyz="0 0 ${length/2}" rpy="0 0 0"/>
|
||||
<geometry>
|
||||
<cylinder length="${length}" radius="${radius}"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</xacro:macro>
|
||||
|
||||
<!-- Approximate link lengths (m); replace with official URDF for production -->
|
||||
<xacro:property name="L1" value="0.15"/>
|
||||
<xacro:property name="L2" value="0.36"/>
|
||||
<xacro:property name="L3" value="0.12"/>
|
||||
<xacro:property name="L4" value="0.31"/>
|
||||
<xacro:property name="L5" value="0.10"/>
|
||||
<xacro:property name="L6" value="0.08"/>
|
||||
<xacro:property name="L7" value="0.07"/>
|
||||
|
||||
<xacro:macro name="arm_robot" params="prefix">
|
||||
|
||||
<link name="${prefix}base_link">
|
||||
<visual>
|
||||
<origin xyz="0 0 0.06" rpy="0 0 0"/>
|
||||
<geometry><cylinder length="0.12" radius="0.09"/></geometry>
|
||||
<material name=""><color rgba="0.15 0.15 0.18 1"/></material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin xyz="0 0 0.06" rpy="0 0 0"/>
|
||||
<geometry><cylinder length="0.12" radius="0.09"/></geometry>
|
||||
</collision>
|
||||
<xacro:arm_inertial_box mass="3.0" x="0.18" y="0.18" z="0.12"/>
|
||||
</link>
|
||||
|
||||
<!-- joint1: base yaw (±165°) -->
|
||||
<joint name="${prefix}joint1" type="revolute">
|
||||
<parent link="${prefix}base_link"/>
|
||||
<child link="${prefix}link1"/>
|
||||
<origin xyz="0 0 0.12" rpy="0 0 0"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit lower="-2.8798" upper="2.8798" effort="123" velocity="2.0944"/>
|
||||
<dynamics damping="0.1" friction="0.05"/>
|
||||
</joint>
|
||||
<link name="${prefix}link1">
|
||||
<xacro:arm_visual_cylinder length="${L1}" radius="0.05" rgba="0.85 0.25 0.2 1"/>
|
||||
<xacro:arm_collision_cylinder length="${L1}" radius="0.05"/>
|
||||
<xacro:arm_inertial_box mass="2.0" x="0.1" y="0.1" z="${L1}"/>
|
||||
</link>
|
||||
|
||||
<!-- joint2 -->
|
||||
<joint name="${prefix}joint2" type="revolute">
|
||||
<parent link="${prefix}link1"/>
|
||||
<child link="${prefix}link2"/>
|
||||
<origin xyz="0 0 ${L1}" rpy="0 ${pi/2} 0"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit lower="-2.3562" upper="2.3562" effort="123" velocity="2.0944"/>
|
||||
<dynamics damping="0.1" friction="0.05"/>
|
||||
</joint>
|
||||
<link name="${prefix}link2">
|
||||
<xacro:arm_visual_cylinder length="${L2}" radius="0.045" rgba="0.2 0.55 0.85 1"/>
|
||||
<xacro:arm_collision_cylinder length="${L2}" radius="0.045"/>
|
||||
<xacro:arm_inertial_box mass="2.5" x="0.09" y="0.09" z="${L2}"/>
|
||||
</link>
|
||||
|
||||
<!-- joint3 -->
|
||||
<joint name="${prefix}joint3" type="revolute">
|
||||
<parent link="${prefix}link2"/>
|
||||
<child link="${prefix}link3"/>
|
||||
<origin xyz="0 0 ${L2}" rpy="0 0 0"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit lower="-3.0543" upper="3.0543" effort="64" velocity="2.4435"/>
|
||||
<dynamics damping="0.08" friction="0.04"/>
|
||||
</joint>
|
||||
<link name="${prefix}link3">
|
||||
<xacro:arm_visual_cylinder length="${L3}" radius="0.04" rgba="0.2 0.75 0.45 1"/>
|
||||
<xacro:arm_collision_cylinder length="${L3}" radius="0.04"/>
|
||||
<xacro:arm_inertial_box mass="1.2" x="0.08" y="0.08" z="${L3}"/>
|
||||
</link>
|
||||
|
||||
<!-- joint4 -->
|
||||
<joint name="${prefix}joint4" type="revolute">
|
||||
<parent link="${prefix}link3"/>
|
||||
<child link="${prefix}link4"/>
|
||||
<origin xyz="0 0 ${L3}" rpy="0 ${pi/2} 0"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit lower="-1.9548" upper="2.7751" effort="64" velocity="2.4435"/>
|
||||
<dynamics damping="0.08" friction="0.04"/>
|
||||
</joint>
|
||||
<link name="${prefix}link4">
|
||||
<xacro:arm_visual_cylinder length="${L4}" radius="0.038" rgba="0.9 0.7 0.2 1"/>
|
||||
<xacro:arm_collision_cylinder length="${L4}" radius="0.038"/>
|
||||
<xacro:arm_inertial_box mass="1.8" x="0.076" y="0.076" z="${L4}"/>
|
||||
</link>
|
||||
|
||||
<!-- joint5 -->
|
||||
<joint name="${prefix}joint5" type="revolute">
|
||||
<parent link="${prefix}link4"/>
|
||||
<child link="${prefix}link5"/>
|
||||
<origin xyz="0 0 ${L4}" rpy="0 ${-pi/2} 0"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit lower="-3.0543" upper="3.0543" effort="39" velocity="4.8869"/>
|
||||
<dynamics damping="0.05" friction="0.02"/>
|
||||
</joint>
|
||||
<link name="${prefix}link5">
|
||||
<xacro:arm_visual_cylinder length="${L5}" radius="0.032" rgba="0.6 0.35 0.85 1"/>
|
||||
<xacro:arm_collision_cylinder length="${L5}" radius="0.032"/>
|
||||
<xacro:arm_inertial_box mass="0.8" x="0.064" y="0.064" z="${L5}"/>
|
||||
</link>
|
||||
|
||||
<!-- joint6 -->
|
||||
<joint name="${prefix}joint6" type="revolute">
|
||||
<parent link="${prefix}link5"/>
|
||||
<child link="${prefix}link6"/>
|
||||
<origin xyz="0 0 ${L5}" rpy="0 ${pi/2} 0"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit lower="-1.4835" upper="4.6251" effort="39" velocity="4.8869"/>
|
||||
<dynamics damping="0.05" friction="0.02"/>
|
||||
</joint>
|
||||
<link name="${prefix}link6">
|
||||
<xacro:arm_visual_cylinder length="${L6}" radius="0.03" rgba="0.35 0.75 0.75 1"/>
|
||||
<xacro:arm_collision_cylinder length="${L6}" radius="0.03"/>
|
||||
<xacro:arm_inertial_box mass="0.5" x="0.06" y="0.06" z="${L6}"/>
|
||||
</link>
|
||||
|
||||
<!-- joint7: flange yaw -->
|
||||
<joint name="${prefix}joint7" type="revolute">
|
||||
<parent link="${prefix}link6"/>
|
||||
<child link="${prefix}link7"/>
|
||||
<origin xyz="0 0 ${L6}" rpy="0 ${-pi/2} 0"/>
|
||||
<axis xyz="0 0 1"/>
|
||||
<limit lower="-3.0543" upper="3.0543" effort="39" velocity="4.8869"/>
|
||||
<dynamics damping="0.03" friction="0.01"/>
|
||||
</joint>
|
||||
<link name="${prefix}link7">
|
||||
<visual>
|
||||
<origin xyz="0 0 ${L7/2}" rpy="0 0 0"/>
|
||||
<geometry><cylinder length="${L7}" radius="0.035"/></geometry>
|
||||
<material name=""><color rgba="0.25 0.25 0.28 1"/></material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin xyz="0 0 ${L7/2}" rpy="0 0 0"/>
|
||||
<geometry><cylinder length="${L7}" radius="0.035"/></geometry>
|
||||
</collision>
|
||||
<xacro:arm_inertial_box mass="0.3" x="0.07" y="0.07" z="${L7}"/>
|
||||
</link>
|
||||
|
||||
<!-- TCP / flange (Flexiv uses flange + tcp frames) -->
|
||||
<joint name="${prefix}flange_joint" type="fixed">
|
||||
<parent link="${prefix}link7"/>
|
||||
<child link="${prefix}flange"/>
|
||||
<origin xyz="0 0 ${L7}" rpy="0 0 0"/>
|
||||
</joint>
|
||||
<link name="${prefix}flange"/>
|
||||
|
||||
<joint name="${prefix}tcp_joint" type="fixed">
|
||||
<parent link="${prefix}flange"/>
|
||||
<child link="${prefix}tcp"/>
|
||||
<origin xyz="0 0 0" rpy="0 0 0"/>
|
||||
</joint>
|
||||
<link name="${prefix}tcp"/>
|
||||
|
||||
<!-- Alias used by our application layer -->
|
||||
<joint name="${prefix}tool0_joint" type="fixed">
|
||||
<parent link="${prefix}tcp"/>
|
||||
<child link="${prefix}tool0"/>
|
||||
<origin xyz="0 0 0" rpy="0 0 0"/>
|
||||
</joint>
|
||||
<link name="${prefix}tool0"/>
|
||||
|
||||
</xacro:macro>
|
||||
</robot>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
|
||||
|
||||
<xacro:macro name="arm_ros2_control" params="prefix use_fake_hardware:=true">
|
||||
<ros2_control name="Rizon4System" type="system">
|
||||
<hardware>
|
||||
<xacro:if value="${use_fake_hardware}">
|
||||
<plugin>mock_components/GenericSystem</plugin>
|
||||
</xacro:if>
|
||||
<xacro:unless value="${use_fake_hardware}">
|
||||
<!-- Official Flexiv hardware plugin (requires flexiv_hardware) -->
|
||||
<plugin>flexiv_hardware/FlexivHardwareInterface</plugin>
|
||||
</xacro:unless>
|
||||
</hardware>
|
||||
|
||||
<joint name="${prefix}joint1">
|
||||
<command_interface name="position"/>
|
||||
<state_interface name="position"/>
|
||||
<state_interface name="velocity"/>
|
||||
</joint>
|
||||
<joint name="${prefix}joint2">
|
||||
<command_interface name="position"/>
|
||||
<state_interface name="position"/>
|
||||
<state_interface name="velocity"/>
|
||||
</joint>
|
||||
<joint name="${prefix}joint3">
|
||||
<command_interface name="position"/>
|
||||
<state_interface name="position"/>
|
||||
<state_interface name="velocity"/>
|
||||
</joint>
|
||||
<joint name="${prefix}joint4">
|
||||
<command_interface name="position"/>
|
||||
<state_interface name="position"/>
|
||||
<state_interface name="velocity"/>
|
||||
</joint>
|
||||
<joint name="${prefix}joint5">
|
||||
<command_interface name="position"/>
|
||||
<state_interface name="position"/>
|
||||
<state_interface name="velocity"/>
|
||||
</joint>
|
||||
<joint name="${prefix}joint6">
|
||||
<command_interface name="position"/>
|
||||
<state_interface name="position"/>
|
||||
<state_interface name="velocity"/>
|
||||
</joint>
|
||||
<joint name="${prefix}joint7">
|
||||
<command_interface name="position"/>
|
||||
<state_interface name="position"/>
|
||||
<state_interface name="velocity"/>
|
||||
</joint>
|
||||
</ros2_control>
|
||||
</xacro:macro>
|
||||
|
||||
</robot>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Project wrapper: official flexiv_description + tcp/tool0. -->
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="$(arg rizon_type)">
|
||||
<!-- rizon_type: Rizon4, Rizon4s, Rizon4M, Rizon4R, Rizon10, Rizon10s -->
|
||||
<xacro:arg name="rizon_type" default="Rizon4"/>
|
||||
<xacro:include filename="$(find flexiv_description)/urdf/common/rizon_robot.xacro"/>
|
||||
|
||||
<xacro:arg name="arm_prefix" default=""/>
|
||||
<xacro:arg name="robot_sn" default="Rizon4-063989"/>
|
||||
<xacro:arg name="joint_limits_parameters_file"
|
||||
default="$(find flexiv_description)/config/$(arg rizon_type)/joint_limits.yaml"/>
|
||||
<xacro:arg name="kinematics_parameters_file"
|
||||
default="$(find flexiv_description)/config/$(arg rizon_type)/default_kinematics.yaml"/>
|
||||
<xacro:arg name="inertia_parameters_file"
|
||||
default="$(find flexiv_description)/config/$(arg rizon_type)/inertia_parameters.yaml"/>
|
||||
<xacro:arg name="visual_parameters_file"
|
||||
default="$(find flexiv_description)/config/$(arg rizon_type)/visual_parameters.yaml"/>
|
||||
<xacro:arg name="load_gripper" default="false"/>
|
||||
<xacro:arg name="gripper_name" default="Flexiv-GN01"/>
|
||||
<xacro:arg name="load_mounted_ft_sensor" default="false"/>
|
||||
<xacro:arg name="ros2_control" default="false"/>
|
||||
<xacro:arg name="rdk_control_mode" default="joint_position"/>
|
||||
<xacro:arg name="use_fake_hardware" default="true"/>
|
||||
<xacro:arg name="fake_sensor_commands" default="false"/>
|
||||
<xacro:arg name="initial_positions_file"
|
||||
default="$(find flexiv_description)/config/initial_positions.yaml"/>
|
||||
<xacro:arg name="mounting_file"
|
||||
default="$(find flexiv_description)/config/single_robot_mounting.yaml"/>
|
||||
|
||||
<xacro:property name="mounting" value="${xacro.load_yaml('$(arg mounting_file)')}"/>
|
||||
<xacro:property name="sn" value="$(arg robot_sn)"/>
|
||||
<xacro:property name="ap" value="$(arg arm_prefix)"/>
|
||||
<xacro:property name="prefix"
|
||||
value="${(ap + '_' + sn + '_') if ap != '' and sn != '' else (ap + sn + '_') if (ap + sn) != '' else ''}"/>
|
||||
|
||||
<xacro:rizon_robot
|
||||
rizon_type="$(arg rizon_type)"
|
||||
robot_sn="$(arg robot_sn)"
|
||||
joint_limits_parameters_file="$(arg joint_limits_parameters_file)"
|
||||
kinematics_parameters_file="$(arg kinematics_parameters_file)"
|
||||
inertia_parameters_file="$(arg inertia_parameters_file)"
|
||||
visual_parameters_file="$(arg visual_parameters_file)"
|
||||
arm_prefix="$(arg arm_prefix)"
|
||||
load_gripper="$(arg load_gripper)"
|
||||
gripper_name="$(arg gripper_name)"
|
||||
load_mounted_ft_sensor="$(arg load_mounted_ft_sensor)"
|
||||
ros2_control="$(arg ros2_control)"
|
||||
rdk_control_mode="$(arg rdk_control_mode)"
|
||||
use_fake_hardware="$(arg use_fake_hardware)"
|
||||
fake_sensor_commands="$(arg fake_sensor_commands)"
|
||||
initial_positions_file="$(arg initial_positions_file)"
|
||||
base_rpy="${radians(mounting['orientation']['rx'])} ${radians(mounting['orientation']['ry'])} ${radians(mounting['orientation']['rz'])}"/>
|
||||
|
||||
<joint name="${prefix}tcp_joint" type="fixed">
|
||||
<parent link="${prefix}flange"/>
|
||||
<child link="${prefix}tcp"/>
|
||||
</joint>
|
||||
<link name="${prefix}tcp"/>
|
||||
<joint name="${prefix}tool0_joint" type="fixed">
|
||||
<parent link="${prefix}tcp"/>
|
||||
<child link="${prefix}tool0"/>
|
||||
</joint>
|
||||
<link name="${prefix}tool0"/>
|
||||
</robot>
|
||||
Reference in New Issue
Block a user