ros仿真小车

2023-05-16

ros仿真小车

补全前面博客中缺少的一些部分关于前面博客中的robotcar
(本文也可单独食用)

创建工作空间并初始化

mkdir -p catkin_ws/src 
~$ cd catkin_ws/
~/catkin_ws$ catkin_init_workspace 
cd ..
catkin_make

创建所需文件夹

cd src
~/catkin_ws$ catkin_create_pkg robotcar rospy roscpp std_msgs
~/catkin_ws$ cd src/robotcar/
~/catkin_ws/src/robotcar$ mkdir launch
~/catkin_ws/src/robotcar$ mkdir urdf
~/catkin_ws/src/robotcar$ mkdir words
~/catkin_ws/src/robotcar$ touch urdf.rviz
sudo vi urdf.rviz
Panels:
  - Class: rviz/Displays
    Help Height: 78
    Name: Displays
    Property Tree Widget:
      Expanded:
        - /TF1/Frames1
      Splitter Ratio: 0.5
    Tree Height: 419
  - Class: rviz/Selection
    Name: Selection
  - Class: rviz/Tool Properties
    Expanded:
      - /2D Pose Estimate1
      - /2D Nav Goal1
      - /Publish Point1
    Name: Tool Properties
    Splitter Ratio: 0.5886790156364441
  - Class: rviz/Views
    Expanded:
      - /Current View1
    Name: Views
    Splitter Ratio: 0.5
  - Class: rviz/Time
    Experimental: false
    Name: Time
    SyncMode: 0
    SyncSource: ""
Preferences:
  PromptSaveOnExit: true
Toolbars:
  toolButtonStyle: 2
Visualization Manager:
  Class: ""
  Displays:
    - Alpha: 0.5
      Cell Size: 1
      Class: rviz/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/RobotModel
      Collision Enabled: false
      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
        head:
          Alpha: 1
          Show Axes: false
          Show Trail: false
          Value: true
        left_back_wheel:
          Alpha: 1
          Show Axes: false
          Show Trail: false
          Value: true
        left_front_wheel:
          Alpha: 1
          Show Axes: false
          Show Trail: false
          Value: true
        right_back_wheel:
          Alpha: 1
          Show Axes: false
          Show Trail: false
          Value: true
        right_front_wheel:
          Alpha: 1
          Show Axes: false
          Show Trail: false
          Value: true
      Name: RobotModel
      Robot Description: robot_description
      TF Prefix: ""
      Update Interval: 0
      Value: true
      Visual Enabled: true
    - Class: rviz/TF
      Enabled: false
      Frame Timeout: 15
      Frames:
        All Enabled: false
      Marker Scale: 1
      Name: TF
      Show Arrows: true
      Show Axes: true
      Show Names: true
      Tree:
        {}
      Update Interval: 0
      Value: false
    - Alpha: 1
      Auto Size:
        Auto Size Factor: 1
        Value: true
      Autocompute Intensity Bounds: true
      Autocompute Value Bounds:
        Max Value: 10
        Min Value: -10
        Value: true
      Axis: Z
      Channel Name: intensity
      Class: rviz/DepthCloud
      Color: 255; 255; 255
      Color Image Topic: ""
      Color Transformer: ""
      Color Transport Hint: raw
      Decay Time: 0
      Depth Map Topic: ""
      Depth Map Transport Hint: raw
      Enabled: true
      Invert Rainbow: false
      Max Color: 255; 255; 255
      Min Color: 0; 0; 0
      Name: DepthCloud
      Occlusion Compensation:
        Occlusion Time-Out: 30
        Value: false
      Position Transformer: ""
      Queue Size: 5
      Selectable: true
      Size (Pixels): 3
      Style: Flat Squares
      Topic Filter: true
      Use Fixed Frame: true
      Use rainbow: true
      Value: true
  Enabled: true
  Global Options:
    Background Color: 48; 48; 48
    Default Light: true
    Fixed Frame: base_link
    Frame Rate: 30
  Name: root
  Tools:
    - Class: rviz/Interact
      Hide Inactive Objects: true
    - Class: rviz/MoveCamera
    - Class: rviz/Select
    - Class: rviz/FocusCamera
    - Class: rviz/Measure
    - Class: rviz/SetInitialPose
      Theta std deviation: 0.2617993950843811
      Topic: /initialpose
      X std deviation: 0.5
      Y std deviation: 0.5
    - Class: rviz/SetGoal
      Topic: /move_base_simple/goal
    - Class: rviz/PublishPoint
      Single click: true
      Topic: /clicked_point
  Value: true
  Views:
    Current:
      Class: rviz/Orbit
      Distance: 3.6130359172821045
      Enable Stereo Rendering:
        Stereo Eye Separation: 0.05999999865889549
        Stereo Focal Distance: 1
        Swap Stereo Eyes: false
        Value: false
      Focal Point:
        X: -0.10787245631217957
        Y: -0.10073208808898926
        Z: -0.018152864649891853
      Focal Shape Fixed Size: true
      Focal Shape Size: 0.05000000074505806
      Invert Z Axis: false
      Name: Current View
      Near Clip Distance: 0.009999999776482582
      Pitch: 0.5303989052772522
      Target Frame: <Fixed Frame>
      Value: Orbit (rviz)
      Yaw: 2.6853959560394287
    Saved: ~
Window Geometry:
  Displays:
    collapsed: false
  Height: 889
  Hide Left Dock: false
  Hide Right Dock: true
  QMainWindow State: 000000ff00000000fd00000004000000000000016a0000022efc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073000000003d0000022e000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f00000242fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000002800000242000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004f30000003efc0100000002fb0000000800540069006d00650000000000000004f3000002eb00fffffffb0000000800540069006d006501000000000000045000000000000000000000077c0000037900000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730000000000ffffffff0000000000000000
  Selection:
    collapsed: false
  Time:
    collapsed: false
  Tool Properties:
    collapsed: false
  Views:
    collapsed: true
  Width: 1916
  X: 0
  Y: 0

添加机器人模型

在urdf文件夹里添加机器人模型

cd urdf
touch mybot.gazebo.xacro
touch myrot.xacro
sudo vi myrot.xacro
<?xml version="1.0"?>  
<robot name="mybot" xmlns:xacro="http://ros.org/wiki/xacro">  

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

  <link name="base_footprint"/>

  <joint name="base_joint" type="fixed">  
    <parent link="base_footprint"/>  
    <child link="base_link"/>  
    <origin rpy="0 0 0" xyz="0 0 0"/>  
  </joint>  
  
  <link name="base_link">  
    <inertial>
     <origin xyz="0 0 0" rpy="0 0 0"/>
     <mass value="0.1"/>
     <inertia ixx="0.0001"  ixy="0"  ixz="0" iyy="0.0001" iyz="0" izz="0.001" />
    </inertial>

    <visual>  
      <geometry>  
        <box size="0.25 0.16 0.05"/>  
      </geometry>  
      <origin rpy="0 0 0" xyz="0 0 0"/>  
      <material name="blue">  
          <color rgba="0 0 0.8 1"/>  
      </material>  
    </visual>  

   <collision>
     <origin xyz="0 0 0" rpy="0 0 0"/>
     <geometry>
       <box size="0.25 0.16 0.05"/>
     </geometry>
   </collision>

  </link>  
 
  <link name="right_wheel_link">  
    <inertial>
     <origin xyz="0 0 0" rpy="0 0 0"/>
     <mass value="0.1"/>
     <inertia ixx="0.0001"  ixy="0"  ixz="0" iyy="0.0001" iyz="0" izz="0.0001" />
    </inertial>

    <visual>  
      <geometry>  
        <cylinder length="0.02" radius="0.025"/>  
      </geometry>  
      <material name="black">  
        <color rgba="0 0 0 1"/>  
      </material>  
    </visual>  

    <collision>
     <origin xyz="0 0 0" rpy="0 0 0"/>
     <geometry>
       <cylinder length="0.02" radius="0.025"/> 
     </geometry>
    </collision>
  </link>  
 
  <joint name="right_wheel_joint" type="continuous">  
    <axis xyz="0 0 -1"/>  
    <parent link="base_link"/>  
    <child link="right_wheel_link"/>  
    <origin rpy="1.5707 0 0" xyz=" 0.1 -0.09 -0.03"/>  
  </joint>  
 
  <link name="left_wheel_link">  
    <inertial>
     <origin xyz="0 0 0" rpy="0 0 0"/>
     <mass value="0.1"/>
     <inertia ixx="0.0001"  ixy="0"  ixz="0" iyy="0.0001" iyz="0" izz="0.0001" />
    </inertial>

    <visual>  
      <geometry>  
        <cylinder length="0.02" radius="0.025"/>  
      </geometry>  
      <material name="black">  
        <color rgba="0 0 0 1"/>  
      </material>  
    </visual>  

    <collision>
     <origin xyz="0 0 0" rpy="0 0 0"/>
     <geometry>
       <cylinder length="0.02" radius="0.025"/> 
     </geometry>
    </collision>   
  </link>  
 
  <joint name="left_wheel_joint" type="continuous">  
    <axis xyz="0 0 -1"/>  
    <parent link="base_link"/>  
    <child link="left_wheel_link"/>  
    <origin rpy="1.5707 0 0" xyz="0.1 0.09 -0.03"/>  
  </joint>  
 
  <link name="ball_wheel_link">  
    <inertial>
     <origin xyz="0 0 0" rpy="0 0 0"/>
     <mass value="0.1"/>
     <inertia ixx="0"  ixy="0"  ixz="0" iyy="0" iyz="0" izz="0" />
    </inertial>

    <visual>  
      <geometry>  
        <sphere radius="0.025"/>  
      </geometry>  
      <material name="black">  
        <color rgba="0 0 0 1"/>  
      </material>  
    </visual>  

    <collision>
     <origin xyz="0 0 0" rpy="0 0 0"/>
     <geometry>
       <sphere radius="0.025"/> 
     </geometry>
    </collision>   
  </link>  

  <joint name="ball_wheel_joint" type="fixed">  
    <axis xyz="0 0 1"/>  
    <parent link="base_link"/>  
    <child link="ball_wheel_link"/>  
    <origin rpy="0 0 0" xyz="-0.10 0 -0.03"/>  
  </joint>  
  <!-- imu sensor -->
  <link name="imu">  
    <visual>  
      <geometry>  
        <box size="0.01 0.01 0.01"/>  
      </geometry>  
      <material name="white">  
          <color rgba="1 1 1 1"/>  
      </material>  
    </visual>  
  </link>  

  <joint name="imu_joint" type="fixed">  
    <parent link="base_link"/>  
    <child link="imu"/>  
    <origin xyz="0.08 0 0.025"/>  
  </joint> 

  <!-- camera -->
  <link name="base_camera_link">  
    <visual>  
      <geometry>  
        <box size="0.02 0.03 0.03"/>  
      </geometry>  
      <material name="white">  
          <color rgba="1 1 1 1"/>  
      </material>  
    </visual>  
  </link>  

  <joint name="camera_link" type="fixed">  
    <parent link="base_link"/>  
    <child link="base_camera_link"/>  
    <origin xyz="0.1 0 0.025"/>  
  </joint> 
  <!-- laser lidar -->
  <link name="base_laser_link">  
    <visual>  
      <geometry>  
        <cylinder length="0.06" radius="0.04"/>   
      </geometry>  
      <material name="white">  
          <color rgba="1 1 1 1"/>  
      </material>  
    </visual>  
  </link>  
  
  <joint name="laser_joint" type="fixed">  
    <parent link="base_link"/>  
    <child link="base_laser_link"/>  
    <origin xyz="0 0.0 0.06"/>  
  </joint> 
</robot>
sudo vi touch mybot.gazebo.xacro
<?xml version="1.0"?>
<robot name="mybot" xmlns:xacro="http://ros.org/wiki/xacro">
  <xacro:arg name="laser_visual" default="false"/>
  <xacro:arg name="camera_visual" default="false"/>
  <xacro:arg name="imu_visual"   default="false"/>

  <gazebo reference="base_link">
    <material>Gazebo/DarkGrey</material>
  </gazebo>

  <gazebo reference="left_wheel_link">
    <mu1>0.5</mu1>
    <mu2>0.5</mu2>
    <kp>500000.0</kp>
    <kd>10.0</kd>
    <minDepth>0.001</minDepth>
    <maxVel>1.0</maxVel>
    <fdir1>1 0 0</fdir1>
    <material>Gazebo/DarkGrey</material>
  </gazebo>

  <gazebo reference="right_wheel_link">
    <mu1>0.5</mu1>
    <mu2>0.5</mu2>
    <kp>500000.0</kp>
    <kd>10.0</kd>
    <minDepth>0.001</minDepth>
    <maxVel>1.0</maxVel>
    <fdir1>1 0 0</fdir1>
    <material>Gazebo/FlatBlack</material>
  </gazebo>

  <gazebo reference="ball_wheel_link">
    <mu1>0.1</mu1>
    <mu2>0.1</mu2>
    <kp>500000.0</kp>
    <kd>100.0</kd>
    <minDepth>0.001</minDepth>
    <maxVel>1.0</maxVel>
    <material>Gazebo/FlatBlack</material>
  </gazebo>

  <gazebo reference="imu">
    <sensor type="imu" name="imu">
      <always_on>true</always_on>
      <visualize>$(arg imu_visual)</visualize>
    </sensor>
    <material>Gazebo/FlatBlack</material>
  </gazebo>

  <gazebo>
    <plugin name="mybot_controller" filename="libgazebo_ros_diff_drive.so">
      <commandTopic>cmd_vel</commandTopic>
      <odometryTopic>odom</odometryTopic>
      <odometryFrame>odom</odometryFrame>
      <odometrySource>world</odometrySource>
      <publishOdomTF>true</publishOdomTF>
      <robotBaseFrame>base_footprint</robotBaseFrame>
      <publishWheelTF>false</publishWheelTF>
      <publishTf>true</publishTf>
      <publishWheelJointState>true</publishWheelJointState>
      <legacyMode>false</legacyMode>
      <updateRate>30</updateRate>
      <leftJoint>left_wheel_joint</leftJoint>
      <rightJoint>right_wheel_joint</rightJoint>
      <wheelSeparation>0.180</wheelSeparation>
      <wheelDiameter>0.05</wheelDiameter>
      <wheelAcceleration>10</wheelAcceleration>
      <wheelTorque>100</wheelTorque>
      <rosDebugLevel>na</rosDebugLevel>
    </plugin>
  </gazebo>

  <gazebo>
    <plugin name="imu_plugin" filename="libgazebo_ros_imu.so">
      <alwaysOn>true</alwaysOn>
      <bodyName>imu</bodyName>  
      <frameName>imu</frameName>
      <topicName>imu</topicName>
      <serviceName>imu_service</serviceName>
      <gaussianNoise>0.0</gaussianNoise>
      <updateRate>0</updateRate>
      <imu>
        <noise>
          <type>gaussian</type>
          <rate>
            <mean>0.0</mean>
            <stddev>2e-4</stddev>
            <bias_mean>0.0000075</bias_mean>
            <bias_stddev>0.0000008</bias_stddev>
          </rate>
          <accel>
            <mean>0.0</mean>
            <stddev>1.7e-2</stddev>
            <bias_mean>0.1</bias_mean>
            <bias_stddev>0.001</bias_stddev>
          </accel>
        </noise>
      </imu>
    </plugin>
  </gazebo>

  <gazebo reference="base_laser_link">
    <material>Gazebo/FlatBlack</material>
    <sensor type="ray" name="rplidar_sensor">
      <pose>0 0 0 0 0 0</pose>
      <visualize>$(arg laser_visual)</visualize>
      <update_rate>7</update_rate>
      <ray>
        <scan>
          <horizontal>
            <samples>720</samples>
            <resolution>0.5</resolution>
            <min_angle>0.0</min_angle>
            <max_angle>6.28319</max_angle>
          </horizontal>


        </scan>
        <range>
          <min>0.120</min>
          <max>24.0</max>
          <resolution>0.015</resolution>
        </range>
        <noise>
          <type>gaussian</type>
          <mean>0.0</mean>
          <stddev>0.01</stddev>
        </noise>
      </ray>
      <plugin name="gazebo_ros_rplidar_controller" filename="libgazebo_ros_laser.so">
        <topicName>scan</topicName>
        <frameName>base_laser_link</frameName>
        <min_range>0.9</min_range>
        <max_range>130.0</max_range>
        <gaussianNoise>0.0</gaussianNoise>
      </plugin>
    </sensor>
  </gazebo>

  <!-- stereo camera -->
    <gazebo reference="base_camera_link">  
      <sensor type="multicamera" name="stereocamera">
        <always_on>true</always_on>
        <update_rate>10</update_rate>
        <visualize>false</visualize>
        <camera name="left">
          <pose>0 0 0 0 0 0</pose>
          <horizontal_fov>1.047</horizontal_fov>
          <image>
            <width>320</width>
            <height>240</height>
          </image>
          <clip>
            <near>0.1</near>
            <far>100</far>
          </clip>
        </camera>
        <camera name="right">
          <pose>0 -0.07 0 0 0 0</pose>
          <horizontal_fov>1.047</horizontal_fov>
          <image>
            <width>320</width>
            <height>240</height>
          </image>
          <clip>
            <near>0.1</near>
            <far>100</far>
          </clip>
        </camera>        
        <plugin name="stereo_camera_controller" filename="libgazebo_ros_multicamera.so">
          <cameraName>stereocamera</cameraName>
          <alwaysOn>true</alwaysOn>
          <updateRate>10</updateRate>
          <cameraName>stereocamera</cameraName>
          <imageTopicName>image_raw</imageTopicName>
          <cameraInfoTopicName>camera_info</cameraInfoTopicName>
          <frameName>camera_link_optical</frameName>
          <baseline>0.07</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>
        </plugin>
      </sensor>
    </gazebo>
</robot>

worlds文件夹中存放之前建立的世界模型文件(见之前的文章)

launch文件编写

cd launch
vi mybot.launch
<launch>
  <arg name="x_pos" default="0.0"/>
  <arg name="y_pos" default="0.0"/>
  <arg name="z_pos" default="0.0"/>
  <param name="/use_sim_time" value="true" />  
  
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find robotcar)/worlds/wall.world"/> 
  </include>

  <param name="robot_description" command="$(find xacro)/xacro --inorder $(find robotcar)/urdf/myrot.xacro" />

  <node pkg="gazebo_ros" type="spawn_model" name="spawn_urdf" args="-urdf -model myrot.xacro -x $(arg x_pos) -y $(arg y_pos) -z $(arg z_pos) -param robot_description" />

  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
  <node
    name="joint_state_publisher_gui"
    pkg="joint_state_publisher_gui"
    type="joint_state_publisher_gui" />

</launch>

:wq保存并退出

sudo vi world.launch
<launch>
  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="$(find robotcar)/worlds/PeiDianShi.world"/> 
  </include>
</launch>

编译并运行

cd ~/catkin_ws
catkin_make
source devel/setup.bash
roslaunch robotcar mybot.launch

就可以看到机器人在环境中的模型了。
请添加图片描述

请添加图片描述

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

ros仿真小车 的相关文章

  • mongodb的文档的分页查询

    统计查询使用count xff08 xff09 方法 xff1a 统计comment集合的所有的记录数 xff1a db comment count 分页列表查询 xff1a 可以使用limit xff08 xff09 方法来读取指定数量的

随机推荐

  • 前后端分离项目的部署

    本次项目的项目架构图 xff1a Nginx主要部署的是 项目的静态资源 xff0c 即前端项目 通过Nginx的反向代理 xff0c 将请求发给Tomcat服务器 然后获取数据通过MySQL的主从复制 xff0c 主库负责更新数据 xff
  • echarts基本用法

    目录 tooltip 设置提示框信息 图表的提示框组件 legend 图例组件 toolbox 工具箱组件 可以另存为图片等功能 grid 网格配置 grid可以控制线型图 柱状图 图表大小 xAxs 设置x轴的相关配置 y轴同理 seri
  • java实现UDP通信传输信息

    实现UDP通信要依靠 DatagramPacket对象进行实现 UDP协议的相关介绍 xff1a UDP传输分为 服务端 和客户端 服务端发送消息 客户端接收消息 xff0c 服务端需要知晓客户端的 IP和所监听的端口号 话不多说直接上代码
  • MySQL篇之动态建表。

    在日常开发中 xff0c 可能会出现 动态配置的一些情况 xff0c 此时存储动态配置的一些数据时就需要动态建表了 xff0c 家人们可以选则两种方案 一种是采用mybatis的mapper xml文件里面使用 语句进行创建 二就是使用da
  • IDEA 2020.2 配置Tomcat服务器

    1 创建一个工程 2 右键项目名称 xff0c 选择 add framwork support 3 选中Web Application xff0c 默认勾选创建web xml 目录结构如下 4 点这两个地方中的任意一个 xff0c 添加配置
  • Java笔记之markdown语法

    狂神说Java系列视频笔记 本文章是作者学习B站系列视频 狂神说Java 的记录笔记与心得 xff0c 创作不易 xff0c 希望能够得到您的支持 1 Markdown的基本语法与使用 Markdown是当下一种较为流行的一种写作方法 通过
  • Java之数组专题

    文章目录 Java基础之数组专题数组的定义数组的声明与初始化数组元素的访问内存分析数组的使用For Each 循环数组作方法入参冒泡排序 多维数组稀疏数组 Java基础之数组专题 本文章是作者学习B站系列视频 狂神说Java 与经典书籍 J
  • Java封装详解

    Java类和对象 本文章是作者学习B站系列视频 狂神说Java 与经典书籍 Java核心技术 的记录笔记与心得 xff0c 创作不易 xff0c 希望能够得到您的支持 Java的构造器 Java的构造器 在用Java自定义类时 xff0c
  • C++ primer plus第七章习题中遇到的cin与cin.get问题

    cin gt gt 与cin get 是cpp程序常用到的输入函数 xff0c 近日在编写一道简单的习题时 xff0c 对二者产生了一些疑问 xff08 题目来源 C 43 43 primer plus 中文版习题第七章第六题 xff09
  • Leetcode部分经典链表题解析(涉及链表的反转、排序、合并、移除元素、成环、相交等操作)

    链表相关问题 第206题 反转链表 要求 xff1a 将给定链表进行反转操作 xff0c 第一个结点作为尾结点 xff0c 第二个结点指向第一个节点 xff0c 以此类推 xff0c 使得原链表的尾结点作为答案的头结点 思路一 xff1a
  • Linux报错:terminate called after throwing an instance of ‘std::regex_error‘ what(): regex_error

    文章目录 1 报错 xff1a 2 源码 3 原因 xff1a 4 解决办法 xff1a 5 运行成功 xff1a 1 报错 xff1a Linux中测试cpp httplib时出现报错std regex error xff0c 但源码中并
  • Redis学习笔记(狂神说)

    狂神视频地址 xff1a https www bilibili com video BV1S54y1R7SB Nosql概述 为什么要用Nosql 1 单机Mysql的年代 DAL xff1a 数据库访问层 在90年代 xff0c 一个基本
  • gazebo地图构建

    搭建地图环境是gazebo的基础功能 打开gazebo 可以在终端输入指令 打开的时候一定要有sudo xff0c 不然有可能在后面保存的时候出现画面卡住不动的情况 span class token operator span sudo g
  • Linux Ubuntu18.04安装微信

    最近做双系统 xff0c 在Ubuntu里下载微信时发现微信没有光网里没有开发Linux版本的微信 xff0c 找到了一些使用网页版登录微信的教程 xff0c 按着网上的教程做下来会的到一个如下的微信图标 打开扫描二维码后无法登录 可以在其
  • 虚拟机Ubuntu18.04 使用usb_cam调用笔记本摄像头

    虚拟机搭载Ubuntu18 04调用笔记本的摄像头 xff08 踩坑以及解决方法 xff09 一 建立工作空间 xff08 略 xff09 这里我建立的工作空间名称是catkin ones 二 下载usb cam包并进行编译 git clo
  • 关于UDP双向通信原理解释与范例

    注 本文不提供UDP通信的头文件 OK Let s do it 首先 我们需要了解什么叫做UDP xff0c 之前博主有些过TCP的通信范例 xff0c 我们可以了解到TCP的通信是一个稳定的 xff0c 可以进行双边通信的方式 同样附带上
  • windows10引导盘修复

    Windows修复引导项 前几天做双系统 xff0c 在使用Easybcd制作引导项时误删win10原本的引导项 xff0c 导致无法开机 xff0c 但是我可以通过磁盘直接启动linux 记录以下修复过程 在Linux里使用工具检查恢复
  • 局部路径规划:DWA算法

    一 概述 DWA算法是全称是Dynamic Window Approach 是在ROS中应用比较广泛的局部路径规划算法 主要作用是接受全局路径规划器生成的路径 xff0c 里程计信息 xff0c 地图信息等 xff0c 通过局部路径规划器将
  • ORB_SLAM2地图保存

    ORB SLAM2地图保存 在安装好orb slam2后按照教程中的方法做了地图构建的实验 xff0c 但是当地图达到想要的标准之后 xff0c 却发现没有办法保存地图 xff0c 查看ORB SLAM2源码发现在System h中有如下一
  • ros仿真小车

    ros仿真小车 补全前面博客中缺少的一些部分关于前面博客中的robotcar 本文也可单独食用 xff09 创建工作空间并初始化 span class token function mkdir span p catkin ws src sp