教程 | 阿克曼结构移动机器人的gazebo仿真(二)

2023-05-16

第二章、配置xacro文件

0.前言

上一节已经将urdf导出来了,这一节需要配置一下xacro文件。先看一下导出的功能包在gazebo以及rviz中显示的效果。

将功能包放进工作空间进行编译,source一下环境,先看gazebo:

roslaunch tianracer_description gazebo.launch

可以看到模型已经加载到gazebo中的empty_world中了,此时模型还是白板,稍后可对颜色进行配置。

再看rviz,先修改tianracer_description/launch中的 arg name="gui" default="False"改为arg name="gui" default="True"

roslaunch tianracer_description display.launch

此时左侧会出现joint_state_publisher的可视化窗口,拖动上边的动态条即可控制小车的每个关节。

1.添加传动装置

新建tianracer_description.xacro文件,将urdf文件中的代码复制过来,并对其进行修改。

<?xml version="1.0" encoding="utf-8"?>
<robot name="tianracer"  xmlns:xacro="http://ros.org/wiki/xacro">


<link name="base_link">
</link>
<link name="chassis">
    <inertial>
      <origin
        xyz="0.0623235722457065 0.0014584636628485 0.0350371599032402"
        rpy="0 0 0" />
      <mass
        value="5" />
     <inertia ixx="0.010609" ixy="0"          ixz="0"
                          iyy="0.050409"   iyz="0"
                                           izz="0.05865" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh filename="package://tianracer_description/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>
  <joint name="base_link_joint" type="fixed">
        <origin xyz="0 0 0" rpy="0 0 0" />        
        <parent link="base_link"/>
        <child link="chassis" />
    </joint> 
 <link
    name="left_steering_hinge">
    <inertial>
      <origin
        xyz="0.00160901052986848 0.00421500740928921 0.000999991873067492"
        rpy="0 0 0" />
      <mass
        value="0.34" />
      <inertia
        ixx="4E-06"
        ixy="0"
        ixz="0"
        iyy="4E-06"
        iyz="0"
        izz="4E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/left_steering_hinge.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/left_steering_hinge.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="left_steering_hinge_joint"
    type="revolute">
    <origin
      xyz="0.1237 0.070647 0.0235"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="left_steering_hinge" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="-0.6"
      upper="0.6"
      effort="10"
      velocity="1000" />
  </joint>

  <link
    name="left_front_wheel">
    <inertial>
      <origin
        xyz="-1.16652756898539E-10 0.000722301233977055 -0.000982991824011559"
        rpy="0 0 0" />
      <mass
        value="0.7" />
     <inertia ixx="0.00026046" ixy="0"          ixz="0"
                            iyy="0.00026046" iyz="0"
                                             izz="0.00041226" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/left_front_wheel.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/left_front_wheel.STL" />
      </geometry>
    </collision>
  </link>
 <joint
    name="left_front_wheel_joint"
    type="continuous">
    <origin
      xyz="0 0.015649 0"
      rpy="0 0 0" />
    <parent
      link="left_steering_hinge" />
    <child
      link="left_front_wheel" />
    <axis
      xyz="0 1 0" />
  </joint>

  <link
    name="right_steering_hinge">
    <inertial>
      <origin
        xyz="0.00160901052986852 -0.00421500740928916 0.00100000812693248"
        rpy="0 0 0" />
      <mass
        value="0.34" />
      <inertia
         ixx="4E-06"
        ixy="0"
        ixz="0"
        iyy="4E-06"
        iyz="0"
        izz="4E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/right_steering_hinge.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="1 1 1 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/right_steering_hinge.STL" />
      </geometry>
    </collision>
  </link>
<joint
    name="right_steering_hinge_joint"
    type="revolute">
    <origin
      xyz="0.12626 -0.065953 0.0235"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="right_steering_hinge" />
    <axis
      xyz="0 0 1" />
    <limit
      lower="-0.6"
      upper="0.6"
      effort="10"
      velocity="1000" />
  </joint>
<link
    name="right_front_wheel">
    <inertial>
      <origin
        xyz="1.16652479342783E-10 -0.000722301233976874 -0.000982991824011684"
        rpy="0 0 0" />
      <mass
        value="0.7" />
      <inertia ixx="0.00026046" ixy="0"          ixz="0"
                            iyy="0.00026046" iyz="0"
                                             izz="0.00041226" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/right_front_wheel.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/right_front_wheel.STL" />
      </geometry>
    </collision>
  </link>
 <joint
    name="right_front_wheel_joint"
    type="continuous">
    <origin
      xyz="0 -0.015649 0"
      rpy="0 0 0" />
    <parent
      link="right_steering_hinge" />
    <child
      link="right_front_wheel" />
    <axis
      xyz="0 1 0" />
  </joint>
 <link
    name="left_rear_wheel">
    <inertial>
      <origin
        xyz="-6.22009417952651E-06 0.000722301233977513 1.58299866985546E-05"
        rpy="0 0 0" />
      <mass
        value="0.7" />
     <inertia ixx="0.00026046" ixy="0"          ixz="0"
                            iyy="0.00026046" iyz="0"
                                             izz="0.00041226" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/left_rear_wheel.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/left_rear_wheel.STL" />
      </geometry>
    </collision>
  </link>
 <joint
    name="left_rear_wheel_joint"
    type="continuous">
    <origin
      xyz="-0.12626 0.081602 0.0225"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="left_rear_wheel" />
    <axis
      xyz="0 1 0" />
  </joint>
 <link
    name="right_rear_wheel">
    <inertial>
      <origin
        xyz="5.49312575473526E-06 -0.000722301233977277 1.60966959317256E-05"
        rpy="0 0 0" />
      <mass
        value="0.7" />
        <inertia ixx="0.00026046" ixy="0"          ixz="0"
                            iyy="0.00026046" iyz="0"
                                             izz="0.00041226" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh  filename="package://tianracer_description/meshes/right_rear_wheel.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/right_rear_wheel.STL" />
      </geometry>
    </collision>
  </link>
 <joint
    name="right_rear_wheel_joint"
    type="continuous">
    <origin
      xyz="-0.1237 -0.086296 0.0225"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="right_rear_wheel" />
    <axis
      xyz="0 1 0" />
  </joint>
 <link
    name="lidar">
    <inertial>
      <origin
        xyz="-0.0120919804823413 0.0023160815953297 -0.0191850779635995"
        rpy="0 0 0" />
      <mass
        value="0.0792224121739075" />
      <inertia
        ixx="2.10579541640659E-05"
        ixy="-1.189626176555E-07"
        ixz="4.23690141563745E-07"
        iyy="2.51190032657276E-05"
        iyz="-7.86831091483644E-09"
        izz="4.38241306407012E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/lidar.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/lidar.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="lidar_joint"
    type="fixed">
    <origin
      xyz="0.093603 -8.284E-05 0.12377"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="lidar" />
    <axis
      xyz="0 0 0" />
  </joint>
  <link
    name="camera">
    <inertial>
      <origin
        xyz="-0.00831465204525364 0.000297862545499916 -0.000809694900417546"
        rpy="0 0 0" />
      <mass
        value="0.0203878842392581" />
      <inertia
        ixx="4.0787812214101E-06"
        ixy="-1.28709200468823E-08"
        ixz="-1.65865223773842E-08"
        iyy="3.17565570823081E-06"
        iyz="-1.52713816393124E-08"
        izz="2.98536150732633E-06" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/camera.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.43921568627451 0.43921568627451 0.43921568627451 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/camera.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="camera_joint"
    type="fixed">
    <origin
      xyz="0.14851 0.0022137 0.0975"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="camera" />
    <axis
      xyz="0 0 0" />
  </joint>
  <link
    name="real_sense">
    <inertial>
      <origin
        xyz="-0.00975078931607951 0.00306064913353049 -7.04374991291334E-05"
        rpy="0 0 0" />
      <mass
        value="0.103311749598955" />
      <inertia
        ixx="7.35323632954531E-05"
        ixy="3.0437488683846E-06"
        ixz="2.08538534427428E-08"
        iyy="7.40427481540393E-06"
        iyz="-1.93018760531168E-08"
        izz="7.2832884533889E-05" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/real_sense.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.666666666666667 0.698039215686274 0.768627450980392 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://tianracer_description/meshes/real_sense.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="real_sense_joint"
    type="fixed">
    <origin
      xyz="0.19864 0.0038046 0.052021"
      rpy="0 0 0" />
    <parent
      link="base_link" />
    <child
      link="real_sense" />
    <axis
      xyz="0 0 0" />
  </joint>

上边主要修改的内容是第一句修改为xacro声明:

<?xml version="1.0" encoding="utf-8"?>
<robot name="tianracer"  xmlns:xacro="http://ros.org/wiki/xacro">

以及一些惯性参数的修改。

本次项目做的是基于twist消息的阿克曼转向移动机器人,为实现该机器人的运动学,我们给两个后轮以及连接两个前轮的steer添加传动装置。为使用ROS控制驱动机器人,需要在模型中加入transmission元素,将传动装置与joint绑定。

<transmission name="right_steering_hinge_joint_trans">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="right_steering_hinge_joint" >
      <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
    </joint>
    <actuator name="right_steering_hinge_joint_motor">
      <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
      <motorTorqueConstant>100</motorTorqueConstant>
    </actuator>
  </transmission>  
  
  <transmission name="left_steering_hinge_joint_trans">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="left_steering_hinge_joint" >
      <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
    </joint>
    <actuator name="left_steering_hinge_joint_motor">
      <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
      <motorTorqueConstant>100</motorTorqueConstant>
    </actuator>
  </transmission>
 <transmission name="right_rear_wheel_joint_trans">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="right_rear_wheel_joint" >
      <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
    </joint>
    <actuator name="right_rear_wheel_joint_motor">
      <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>      
  
  <transmission name="left_rear_wheel_joint_trans">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="left_rear_wheel_joint" >
      <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
    </joint>
    <actuator name="left_rear_wheel_joint_motor">
      <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>

2.添加插件                               

在与tianracer_description.xacro路径相同路径下新建tianracer.gazebo文件

添加gazebo插件

由于车轮实际上会接触地面,因此会与地面发生物理相互作用,将各个link添加部件材料的附加信息,并且定义各个link的颜色信息。参考

[gazebo官网] http://gazebosim.org/tutorials/?tut=ros_urdf

<gazebo reference="chassis">
  <mu1 value="0.0"/>
  <mu2 value="0.0"/>
  <kp  value="10000000.0" />
  <kd  value="1.0" />
  <material>Gazebo/Red</material>
</gazebo>
<gazebo reference="left_steering_hinge">
  <mu1 value="2.0"/>
  <mu2 value="2.0"/>
  <kp  value="10000000.0" />
  <kd  value="1.0" />
  <fdir1 value="1 0 0"/>
  <material>Gazebo/Grey</material>
</gazebo>
<gazebo reference="left_rear_wheel">
  <mu1 value="2.0"/>
  <mu2 value="2.0"/>
  <kp  value="10000000.0" />
  <kd  value="1.0" />
  <fdir1 value="1 0 0"/>
  <material>Gazebo/Black</material>
</gazebo>
<gazebo reference="right_steering_hinge">
  <mu1 value="2.0"/>
  <mu2 value="2.0"/>
  <kp  value="10000000.0" />
  <kd  value="1.0" />
  <fdir1 value="1 0 0"/>
  <material>Gazebo/Grey</material>
</gazebo>
<gazebo reference="right_rear_wheel">
  <mu1 value="2.0"/>
  <mu2 value="2.0"/>
  <kp  value="10000000.0" />
  <kd  value="1.0" />
  <fdir1 value="1 0 0"/>
  <material>Gazebo/Black</material>
</gazebo>
<gazebo reference="left_front_wheel">
  <mu1 value="2.0"/>
  <mu2 value="2.0"/>
  <kp  value="10000000.0" />
  <kd  value="1.0" />
  <fdir1 value="0 0 1"/>
  <material>Gazebo/Black</material>
</gazebo>
<gazebo reference="right_front_wheel">
  <mu1 value="2.0"/>
  <mu2 value="2.0"/>
  <kp  value="10000000.0" />
  <kd  value="1.0" />
  <fdir1 value="0 0 1"/>
  <material>Gazebo/Black</material>
</gazebo>

添加ros_control插件

由于gazebo并没阿克曼车型的插件,要链接gazebo与ros,我们先添加ros_control插件,它读取所有transmission标记,以及joint_state_publisher插件

<gazebo>
  <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
    <robotNamespace>/tianracer</robotNamespace>
    <robotParam>robot_description</robotParam>
    <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
    <legacyModeNS>true</legacyModeNS>
  </plugin>
</gazebo>

<gazebo>
    <plugin name="joint_state_publisher" filename="libgazebo_ros_joint_state_publisher.so">
      <jointName>left_rear_wheel_joint, right_rear_wheel_joint, left_steering_hinge_joint, right_steering_hinge_joint, right_front_wheel_joint,left_ front_wheel_joint</jointName>
      <updateRate>50.0</updateRate>
      <robotNamespace>/tianracer</robotNamespace>
      <alwaysOn>true</alwaysOn>
    </plugin>
  </gazebo>

 添加二维激光雷达插件

<!-- hokuyo -->
<xacro:unless value="$(optenv DISABLE_GAZEBO_LASER false)">
  <gazebo reference="lidar">
    <material>Gazebo/Grey</material>
    <sensor type="ray" name="hokuyo_sensor">
      <pose>0 0 0.0124 0 0 0</pose>
      <visualize>false</visualize>
      <update_rate>40</update_rate>
      <ray>
        <scan>
          <horizontal>
            <samples>1081</samples>
            <resolution>1</resolution>
            <min_angle>-2.3561944902</min_angle>
            <max_angle>2.3561944902</max_angle>
          </horizontal>
        </scan>
        <range>
          <min>0.1</min>
          <max>10.0</max>
          <resolution>0.01</resolution>
        </range>
        <noise>
          <mean>0.0</mean>
          <stddev>0.01</stddev>
        </noise>
      </ray>
      <plugin name="gazebo_ros_hokuyo_controller" filename="libgazebo_ros_laser.so">
        <topicName>/scan</topicName>
        <frameName>lidar</frameName>
      </plugin>
    </sensor>
  </gazebo>
</xacro:unless>

注意雷达的名字需要与link名对应上。

添加单目摄像头以及深度摄像头插件

<!-- camera -->
  <gazebo reference="camera">
  <material>Gazebo/Grey</material>
    <sensor type="camera" name="camera1">
      <update_rate>30.0</update_rate>
      <camera name="head">
        <horizontal_fov>1.3962634</horizontal_fov>
        <image>
          <width>800</width>
          <height>800</height>
          <format>R8G8B8</format>
        </image>
        <clip>
          <near>0.02</near>
          <far>300</far>
        </clip>
        <noise>
          <type>gaussian</type>
          <!-- Noise is sampled independently per pixel on each frame.
               That pixel's noise value is added to each of its color
               channels, which at that point lie in the range [0,1]. -->
          <mean>0.0</mean>
          <stddev>0.007</stddev>
        </noise>
      </camera>
      <plugin name="camera_controller" filename="libgazebo_ros_camera.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>0.0</updateRate>
        <cameraName>rrbot/camera1</cameraName>
        <imageTopicName>image_raw</imageTopicName>
        <cameraInfoTopicName>camera_info</cameraInfoTopicName>
        <frameName>camera</frameName>
        <hackBaseline>0.07</hackBaseline>
        <distortionK1>0.0</distortionK1>
        <distortionK2>0.0</distortionK2>
        <distortionK3>0.0</distortionK3>
        <distortionT1>0.0</distortionT1>
        <distortionT2>0.0</distortionT2>
      </plugin>
    </sensor>
    </gazebo>


<gazebo reference="real_sense">
            <sensor type="depth" name="real_sense">
                <always_on>true</always_on>
                <update_rate>20.0</update_rate>
                <camera>
                    <horizontal_fov>${60.0*3.14/180.0}</horizontal_fov>
                    <image>
                        <format>R8G8B8</format>
                        <width>640</width>
                        <height>480</height>
                    </image>
                    <clip>
                        <near>0.05</near>
                        <far>8.0</far>
                    </clip>
                </camera>
                <plugin name="kinect_real_sense_controller" filename="libgazebo_ros_openni_kinect.so">
                    <cameraName>real_sense</cameraName>
                    <alwaysOn>true</alwaysOn>
                    <updateRate>10</updateRate>
                    <imageTopicName>rgb/image_raw</imageTopicName>
                    <depthImageTopicName>depth/image_raw</depthImageTopicName>
                    <pointCloudTopicName>depth/points</pointCloudTopicName>
                    <cameraInfoTopicName>rgb/camera_info</cameraInfoTopicName>
                    <depthImageCameraInfoTopicName>depth/camera_info</depthImageCameraInfoTopicName>
                    <frameName>real_sense</frameName>
                    <baseline>0.1</baseline>
                    <distortion_k1>0.0</distortion_k1>
                    <distortion_k2>0.0</distortion_k2>
                    <distortion_k3>0.0</distortion_k3>
                    <distortion_t1>0.0</distortion_t1>
                    <distortion_t2>0.0</distortion_t2>
                    <pointCloudCutoff>0.4</pointCloudCutoff>
                </plugin>
            </sensor>
        </gazebo>

这里深度摄像头的插件用kinect的插件代替。

最后将tianracer.gazebo添加到tianracer_description.xacro文件里边:

<xacro:include filename="$(find tianracer_description)/urdf/tianracer.gazebo" />

小结

至此,我们已经配置好小车的各个link的颜色以及传感器的插件,但我们仍无法让小车运动起来,因为我们还未配置小车的controllers。下一节通过配置controllers让小车动起来。

参考资料

1.古月老师的<<ROS机器人开发实践>>

2.从零开始自动驾驶:https://www.bilibili.com/video/BV1ZJ41187tS?spm_id_from=333.999.0.0

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

教程 | 阿克曼结构移动机器人的gazebo仿真(二) 的相关文章

随机推荐

  • Linux doc和docx转换pdf

    准备工作 服务器安装libreoffice apt get install libreoffice 安装完成libreoffice后 xff0c 测试是否安装成功 soffice h 例子 把 tmp test docx 转换成 tmp t
  • 多个硬盘挂载到同一个目录

    同一目录无法重复挂载 xff0c 后挂载的会覆盖之前挂载的磁盘 但是现在需要将4块磁盘并行挂载 xff0c 该如何操作呢 xff1f 将2块磁盘合并到一个逻辑卷 进行挂载 基本知识 基本概念PV Physical Volume 物理卷物理卷
  • LeetCode 跳跃游戏 题解

    题述 xff1a 给定一个非负整数数组 nums xff0c 你最初位于数组的 第一个下标 数组中的每个元素代表你在该位置可以跳跃的最大长度 判断你是否能够到达最后一个下标 思路 xff1a 阅读题目我们可以发现只要数组里面没有0 我们就一
  • #error This file was generated by a newer version of protoc which is 【protoc版本问题】

    在github上下载自己适合的protoc版 xff08 我的环境是ubuntu18 04 ros melodic版本 xff09 gazebo9对应的最低版本protoc为3 0 0 我之前版本为3 14 0会提示目前文件由旧版本生成 x
  • Dispatcher.BeginInvoke()方法使用不当导致UI界面卡死的原因分析

    前段时间 xff0c 公司同事开发了一个小工具 xff0c 在工具执行过程中 xff0c UI 界面一直处于卡死状态 通过阅读代码发现 xff0c 主要是由于 Dispatcher BeginInvoke 方法使用不当导致的 本文将通过一个
  • List的Clear方法与RemoveAll方法用法小结

    示例代码 using System using System Collections Generic namespace ListClearExp class Program static void Main string args Lis
  • 利用C#访问注册表获取软件的安装路径

    绝大多数软件 xff0c 基本上都会在注册表中记录自己的名字和安装路径信息 在注册表中记录这些信息的位置是 xff1a HKEY LOCAL MACHINE SOFTWARE Microsoft Windows CurrentVersion
  • 使用ValidationRule类来检查用户输入的有效性

    1 新建WPF应用程序ValidationRuleExp 整个程序的结构如下图所示 程序运行起来后的效果如下图所示 用户操作程序时 xff0c 先输入固话 手机 Email 个人网站等信息 xff0c 再点击右侧的 点我记住你 按钮 xff
  • 关闭窗体后,进程仍然在运行的问题重现与解决

    1 问题陈述 在开发中 xff0c 遇到这样一个问题 xff1a 点击程序主窗体右上角的叉号关闭应用程序后 xff0c 程序的进程却没有关闭 通过查阅资料 xff0c 了解到 xff0c 产生此类问题的原因主要有以下两点 xff1a 1 x
  • Python判断一个字符串是否包含子串的几种方法

    1 使用成员操作符 in span class hljs prompt gt gt gt span s 61 span class hljs string 39 nihao shijie 39 span span class hljs pr
  • easyui-datagrid获取行和列数据

    1 获取当前行 span class hljs keyword var span row 61 span class hljs string 39 dg 39 span datagrid span class hljs string 39
  • No plugin found for prefix ‘tomcat7’ in the current project and in the plugin groups

    idea中开发javaweb应用 xff0c 使用mvn tomcat7 run命令运行应用时 xff0c 需要配置tomcat的maven插件 在没有配置的情况下会出现下面的错误提示 ERROR No plugin found for p
  • C#中的IComparable和IComparer接口

    C 中 xff0c 自定义类型 xff0c 支持比较和排序 xff0c 需要实现IComparable接口 IComparable接口存在一个名为CompareTo 的方法 xff0c 接收类型为object的参数表示被比较对象 xff0c
  • LeetCode Nim游戏 题解

    题述 xff1a 你和你的朋友 xff0c 两个人一起玩 Nim 游戏 xff1a 桌子上有一堆石头 你们轮流进行自己的回合 xff0c 你作为先手 每一回合 xff0c 轮到的人拿掉 1 3 块石头 拿掉最后一块石头的人就是获胜者 假设你
  • C#接口汇总

    1 IComparable和IComparer接口 用于比较和排序 IComparable 可比较的 xff0c 实现该接口的类 xff0c 便具有 可比较的 特性 IComparer 比较器 xff0c 实现该接口的类 xff0c 是一个
  • Python操作环境变量

    1 使用os读取环境变量 import os os getenv 39 path 39 os environ get 39 path 39 os environ 39 path 39 2 遍历打印所有环境变量 通过访问os environ可
  • 教程 | 阿克曼结构移动机器人的gazebo仿真(一)

    第一章 从SOLIDWORKS中导出URDF 二轮差速小车已经完结 接下去要进入阿克曼结构移动机器人的仿真 阿克曼小车的结构也就是我们看到最多的应用最广的车型 xff0c 也称为car like robot 在这里先挖下一个大坑 xff0c
  • TIANBOT MINI机器人使用blender进行贴图并导出详细教程

    很多小伙伴在看一些仿真视频中会看到 xff0c 仿真模型栩栩如生 xff0c 但是我们自己导出的模型总是不堪入目 xff0c 哪是因为你还没学会贴图 xff0c 下面我来教大家一步一步怎么学会贴图 首先我们打开blender并设置好简体中文
  • 什么是ROS2GO随身系统?

    随着ROS xff08 Robot Operating System xff09 机器人操作系统的越来越热 xff0c 大家都跃跃欲试 想一睹ROS的风采 xff0c 感受ROS的魅力 但是挡在初学者面前的第一个难题就是如何在Ubuntu系
  • 教程 | 阿克曼结构移动机器人的gazebo仿真(二)

    第二章 配置xacro文件 0 前言 上一节已经将urdf导出来了 xff0c 这一节需要配置一下xacro文件 先看一下导出的功能包在gazebo以及rviz中显示的效果 将功能包放进工作空间进行编译 xff0c source一下环境 x