当前位置:网站首页>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 .
边栏推荐
- Nine ways to define methods in scala- Nine ways to define a method in Scala?
- About text selection in web pages and counting the length of selected text
- Rk3399 platform development series explanation (WiFi) 5.54. What is WiFi wireless LAN
- Pychart error updating package list: connect timed out
- Microservice sentinel flow control degradation
- nifi从入门到实战(保姆级教程)——flow
- Why can't strings be directly compared with equals; Why can't some integers be directly compared with the equal sign
- Microservice - Nacos registration center and configuration center
- Reflection on some things
- "Remake Apple product UI with Android" (2) -- silky Appstore card transition animation
猜你喜欢

Vs2017 is driven by IP debugging (dual machine debugging)

Microservice sentinel flow control degradation

App移动端测试【5】文件的写入、读取

App移动端测试【4】apk的操纵

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

nifi从入门到实战(保姆级教程)——flow

软件逆向破解入门系列(1)—xdbg32/64的常见配置及功能窗口

Secsha system 1- login function

App移动端测试【3】ADB命令

"Remake Apple product UI with Android" (3) - elegant statistical chart
随机推荐
How to thicken the brush in the graphical interface
Mixlab编辑团队招募队友啦~~
《天天数学》连载56:二月二十五日
The difference between calling by value and simulating calling by reference
Intelij idea efficient skills (III)
Go language self-study series | if else if statement in golang
[redis foundation] understand redis persistence mechanism together (rdb+aof graphic explanation)
Principles of several common IO models
The wonderful use of do{}while()
Redis在Windows以及Linux系统下的安装
pyinstaller不是内部或外部命令,也不是可运行的程序 或批处理文件
Project -- high concurrency memory pool
Why can't strings be directly compared with equals; Why can't some integers be directly compared with the equal sign
MongoDB 的安装和基本操作
String functions that you need to know
Expression of request header in different countries and languages
初试scikit-learn库
Mb10m-asemi rectifier bridge mb10m
From "zero sum game" to "positive sum game", PAAS triggered the third wave of cloud computing
App移动端测试【5】文件的写入、读取