当前位置:网站首页>Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (4)
Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (4)
2022-07-03 16:05:00 【Pony Baby】
introduction
To the last chapter of this tutorial , We used a single robot before SLAM, Multi robot map fusion SLAM, And the navigation of multiple robots in the map . The last chapter ( There may be new chapters later , This is the end of the first series ), We will use explore_lite Function pack , Make the robot in the process of drawing , Autonomously has established the frontier most suitable for expansion in the map , And automatic edge navigation , Edge construction map , Until the whole map is built .
The source code in gitee On , You can see the first article .
The overall launch file
It mainly integrates the contents of lesson 2 and lesson 3 , On multiple machines slam Added move_base Navigation , recycling explore_lite Publish coordinates
<launch>
<!--SLAM Algorithm -->
<arg name="slam_method" default="gmapping"/>
<arg name="simulation" default="true"/>
<arg name="move_forward_only" default="false"/>
<group if="$(arg simulation)" >
<!-- Open the simulation world -->
<include file="$(find gazebo_tutorials)/launch/create_world.launch" />
<!-- Place the robot -->
<include file="$(find gazebo_tutorials)/launch/place_robot.launch">
<arg name="robot_x_pos" value="0.0"/>
<arg name="robot_y_pos" value="0.0"/>
<arg name="robot_z_pos" value="0.0"/>
<arg name="robot_yaw" value="0.0"/>
<arg name="robot_name" value="tb3_0"/>
</include>
<!-- Place the robot -->
<include file="$(find gazebo_tutorials)/launch/place_robot.launch">
<arg name="robot_x_pos" value="-3"/>
<arg name="robot_y_pos" value="0.0"/>
<arg name="robot_z_pos" value="0.0"/>
<arg name="robot_yaw" value="0.0"/>
<arg name="robot_name" value="tb3_1"/>
</include>
</group>
<!-- Turn on SLAM -->
<include file="$(find gazebo_tutorials)/slam_methods/$(arg slam_method).launch">
<arg name="ns" value="tb3_0"/>
</include>
<include file="$(find gazebo_tutorials)/slam_methods/$(arg slam_method).launch">
<arg name="ns" value="tb3_1"/>
</include>
<!-- Start the map fusion node and join 1 Robot map information -->
<include file="$(find gazebo_tutorials)/launch/map_merging.launch">
<arg name="if_first_robot" value="True"/>
<arg name="robot_x_pos" value="0.0"/>
<arg name="robot_y_pos" value="0.0"/>
<arg name="robot_z_pos" value="0.0"/>
<arg name="robot_name" value="tb3_0"/>
</include>
<!-- Join in 2 Robot map information -->
<include file="$(find gazebo_tutorials)/launch/map_merging.launch">
<arg name="if_first_robot" value="False"/>
<arg name="robot_x_pos" value="-3"/>
<arg name="robot_y_pos" value="0.0"/>
<arg name="robot_z_pos" value="0.0"/>
<arg name="robot_name" value="tb3_1"/>
</include>
<!-- move_base Navigation -->
<include file="$(find gazebo_tutorials)/launch/move_base.launch">
<arg name="ns" value="tb3_0" />
<arg name="move_forward_only" value="$(arg move_forward_only)"/>
</include>
<include file="$(find gazebo_tutorials)/launch/move_base.launch">
<arg name="ns" value="tb3_1" />
<arg name="move_forward_only" value="$(arg move_forward_only)"/>
</include>
<!-- Explore on your own -->
<include file="$(find gazebo_tutorials)/launch/explore_costmap.launch">
<arg name="ns" value="tb3_0" />
</include>
<include file="$(find gazebo_tutorials)/launch/explore_costmap.launch">
<arg name="ns" value="tb3_1" />
</include>
<!-- rviz -->
<include file="$(find gazebo_tutorials)/launch/rviz_two_robots.launch" />
</launch>
explore_costmap.launch
This function package is to calculate the edge of the grid map , Then calculate the weight of the edge by some means , Decide where to expand . This is not a self-contained Feature Pack , Download it yourself .
sudo apt-get install ros-melodic-explore-lite
Mainly costmap_topic and costmap_updates_topic Two parameters , The map they receive will determine what they navigate based on .
<launch>
<arg name="ns" default="tb3_0"/>
<node pkg="explore_lite" type="explore" respawn="false" name="$(arg ns)_explore" output="screen">
<remap from="move_base_simple/goal" to="$(arg ns)/move_base_simple/goal"/>
<remap from="move_base" to="$(arg ns)/move_base"/>
<param name="robot_base_frame" value="$(arg ns)/base_footprint"/>
<param name="costmap_topic" value="$(arg ns)/map"/>
<param name="costmap_updates_topic" value="$(arg ns)/map_updates"/>
<!-- Specifies whether to publish visual boundaries -->
<param name="visualize" value="true"/>
<!-- Calculate the new boundary and reconsider the frequency of the target (Hz)-->
<param name="planner_frequency" value="0.33"/>
<!-- Time is in seconds . When the robot is progress_timeout When there is no progress , The current goal will be abandoned .-->
<param name="progress_timeout" value="30.0"/>
<!-- For weighted boundary . This multiplication parameter affects the leading edge potential component of the leading edge weight ( The distance to the front ).-->
<param name="potential_scale" value="3.0"/>
<!-- For weighted boundary . This multiplication parameter affects the leading edge direction component of the leading edge weight . This parameter does not currently perform any operation , For forward compatibility only .-->
<param name="orientation_scale" value="0.0"/>
<!-- For weighted boundary . This multiplication parameter affects the boundary weight ( Boundary size ) The boundary gain component of .-->
<param name="gain_scale" value="1.0"/>
<!-- The transformation tolerance used when changing the robot posture .-->
<param name="transform_tolerance" value="0.3"/>
<!-- Consider the boundary as the minimum size of the boundary of the exploration target . In meters .-->
<param name="min_frontier_size" value="0.1"/>
</node>
</launch>
start-up
Last command roslaunch gazebo_tutorials two_robots_autoslam.launch Start it up .
stay rviz You can add MarkerArray To show the leading edge of the map
Finally, we can see that the two robots move by themselves , And maps are integrated , But very stupid , After all, this function package is prepared for a robot , I may find a way to write the decision-making program of multiple robots later , Coming soon .
边栏推荐
- Go语言自学系列 | golang switch语句
- pyinstaller不是内部或外部命令,也不是可运行的程序 或批处理文件
- Go language self-study series | if else statement in golang
- Principles of several common IO models
- 初试scikit-learn库
- Download and install common programs using AUR
- 【Proteus仿真】8×8LED点阵屏仿电梯数字滚动显示
- [系统安全] 四十三.Powershell恶意代码检测系列 (5)抽象语法树自动提取万字详解
- Famous blackmail software stops operation and releases decryption keys. Most hospital IOT devices have security vulnerabilities | global network security hotspot on February 14
- App移动端测试【5】文件的写入、读取
猜你喜欢

几种常见IO模型的原理

Mb10m-asemi rectifier bridge mb10m

Reading notes of "micro service design" (Part 2)

From the 18th line to the first line, the new story of the network security industry

关于网页中的文本选择以及统计选中文本长度
![[redis foundation] understand redis master-slave architecture, sentinel mode and cluster together (Demo detailed explanation)](/img/1f/3dd95522b8d5f03dd763a6779e3db5.jpg)
[redis foundation] understand redis master-slave architecture, sentinel mode and cluster together (Demo detailed explanation)

Uploads labs range (with source code analysis) (under update)
![App mobile terminal test [5] file writing and reading](/img/f1/4bff6e66b77d0f867bf7237019e982.png)
App mobile terminal test [5] file writing and reading

请做好3年内随时失业的准备?

Embedded development: seven reasons to avoid open source software
随机推荐
Distributed task scheduling XXL job
Detailed explanation of string function and string function with unlimited length
pyinstaller不是内部或外部命令,也不是可运行的程序 或批处理文件
App mobile terminal test [5] file writing and reading
App mobile terminal test [3] ADB command
嵌入式开发:避免开源软件的7个理由
分布式事务(Seata) 四大模式详解
Why can't strings be directly compared with equals; Why can't some integers be directly compared with the equal sign
Backtracking method to solve batch job scheduling problem
"Remake Apple product UI with Android" (2) -- silky Appstore card transition animation
Redis high availability and persistence
一些事情的反思
Q2 encryption market investment and financing report in 2022: gamefi becomes an investment keyword
Problems of CString in multithreading
Colab works with Google cloud disk
Microservices - load balancing ribbon
几种常见IO模型的原理
The wonderful use of do{}while()
do{}while()的妙用
Microservices Seata distributed transactions