有关eca_a9质量分布和流体密度

该博客详细介绍了ECA A9水下机器人的URDF模型配置,包括链接的物理属性如质量、长度、直径,以及流体密度的设定。内容涵盖机器人基座的视觉和碰撞几何,惯性特性,以及Hydrodynamic Plugin的参数,如Fossen模型的附加质量和线性阻尼。此外,还提到了鳍和推进器的实例化,以及电池模块的基本参数。博客最后引入了传感器配置。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

eca_a9/eca_a9_description/urdf/eca_a9_base.xacro

此处mass参数可调,注意还有sensor文件中也有一个较小的mass

rho可设置为:
1026.26(静平衡)
1006.46(损失2%)

<?xml version="1.0"?>
<!-- Copyright (c) 2016 The UUV Simulator Authors.
     All rights reserved.
     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.
-->
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" >
  <!-- Import macro files -->
  <xacro:include filename="$(find uuv_descriptions)/urdf/common.urdf.xacro" />
  <xacro:include filename="$(find uuv_sensor_ros_plugins)/urdf/sensor_snippets.xacro"/>
  <xacro:include filename="$(find eca_a9_description)/urdf/eca_a9_snippets.xacro"/>
  <xacro:include filename="$(find uuv_gazebo_ros_plugins)/urdf/snippets.xacro"/>
  <!-- Properties -->
  <xacro:property name="mass" value="69.7"/>
  <xacro:property name="length" value="1.98"/>
  <xacro:property name="diameter" value="0.23"/>
  <xacro:property name="radius" value="${diameter*0.5}"/>
  <xacro:property name="volume" value="0.06799987704121499"/>
  <xacro:property name="cob" value="0 0 0.06"/>
  <xacro:property name="rho" value="1027.0"/>

  <xacro:property name="area" value="0.04155"/>
  <xacro:property name="length" value="1.98"/>

  <xacro:property name="visual_mesh_file" value="file://$(find eca_a9_description)/mesh/eca_a9.dae"/>
  <xacro:property name="collision_mesh_file" value="file://$(find eca_a9_description)/mesh/eca_a9.stl"/>
  <xacro:property name="prop_mesh_file" value="file://$(find eca_a9_description)/mesh/eca_a9_propeller.dae"/>
  <xacro:property name="fin_mesh_file" value="file://$(find eca_a9_description)/mesh/eca_a9_fin.dae"/>

  <xacro:macro name="eca_a9_base" params="namespace debug inertial_reference_frame">
    <link name="${namespace}/base_link">
      <visual>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
          <mesh filename="${visual_mesh_file}" scale="1 1 1" />
        </geometry>
      </visual>

      <collision>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
          <mesh filename="${visual_mesh_file}" scale="1 1 1" />
        </geometry>
      </collision>

      <inertial>
        <mass value="${mass}" />
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <inertia ixx="0.6" ixy="0" ixz="0"
                 iyy="30.0" iyz="0"
                 izz="35.0" />
      </inertial>
    </link>

    <!-- Set up hydrodynamic plugin -->
    <gazebo>
      <plugin name="${namespace}_uuv_plugin" filename="libuuv_underwater_object_ros_plugin.so">
        <fluid_density>${rho}</fluid_density>
        <flow_velocity_topic>hydrodynamics/current_velocity</flow_velocity_topic>
        <debug>${debug}</debug>
        <link name="${namespace}/base_link">
          <volume>${volume}</volume>
          <center_of_buoyancy>${cob}</center_of_buoyancy>
          <neutrally_buoyant>0</neutrally_buoyant>
          <hydrodynamic_model>
            <type>fossen</type>
            <added_mass>
              4   0   0   0   0   0
              0   95  0   0   0   0
              0   0   75  0   0   0
              0   0   0   0.4 0   0
              0   0   0   0   27  0
              0   0   0   0   0   32
            </added_mass>

            <linear_damping_forward_speed>
              -8      0       0       0       0       0
              0       -162    0       0       0       150
              0       0       -108    0       -100    0
              0       0       0       -13     0       0
              0       0       37      0       -20     0
              0       -34     0       0       0       -32
            </linear_damping_forward_speed>
          </hydrodynamic_model>
        </link>
      </plugin>
    </gazebo>

    <!-- Instantiate Fins -->
    <xacro:fin_macro namespace="${namespace}" fin_id="0">
      <origin xyz="-0.70777 -0.07876 0.078586" rpy="0.7904 -0.0998 -0.1003" />
    </xacro:fin_macro>
    <xacro:fin_macro namespace="${namespace}" fin_id="1">
      <origin xyz="-0.70777 -0.07876 -0.078586" rpy="2.3512 0.0998 -0.1003" />
    </xacro:fin_macro>
    <xacro:fin_macro namespace="${namespace}" fin_id="2">
      <origin xyz="-0.70777 0.07876 -0.078586" rpy="-2.3512 0.0998 0.1003" />
    </xacro:fin_macro>
    <xacro:fin_macro namespace="${namespace}" fin_id="3">
      <origin xyz="-0.70777 0.07876 0.078586" rpy="-0.7904 -0.0998 0.1003" />
    </xacro:fin_macro>

    <xacro:thruster_module_first_order_basic_fcn_macro
      namespace="${namespace}"
      thruster_id="0"
      mesh_filename="${prop_mesh_file}"
      dyn_time_constant="0.1"
      rotor_constant="0.000049">
      <origin xyz="-0.9676 0 0" rpy="0 0 ${pi}" />
    </xacro:thruster_module_first_order_basic_fcn_macro>

    <!-- TODO: Parametrize the battery unit -->
    <xacro:basic_linear_battery_macro
      namespace="${namespace}"
      parent_link="${namespace}/base_link"
      prefix=""
      open_circuit_voltage_constant_coef="3.7"
      open_circuit_voltage_linear_coef="-3.1424"
      initial_charge="1.1665"
      capacity="0.5"
      resistance="0.002"
      smooth_current_tau="1.9499"
      voltage="4.2"
      update_rate="2.0"/>

    <xacro:include filename="$(find eca_a9_description)/urdf/eca_a9_sensors.xacro"/>
  </xacro:macro>
</robot>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值