当前位置:网站首页>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 .
边栏推荐
- Creation and destruction of function stack frames
- How to use annotations such as @notnull to verify and handle global exceptions
- Calibre LVL
- Pandora IOT development board learning (HAL Library) - Experiment 5 external interrupt experiment (learning notes)
- [combinatorics] combinatorial identities (review of eight combinatorial identities | product of combinatorial identities 1 | proof | use scenario | general method for finding combinatorial numbers)
- Detailed pointer advanced 2
- CString getbuffer and releasebuffer instructions
- Shell script import and export data
- [system safety] 43 PowerShell malicious code detection series (5) automatic extraction of ten thousand words from abstract syntax tree
- Download and install common programs using AUR
猜你喜欢

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

《微服务设计》读书笔记(下)

Function introduction of JMeter thread group

Semi supervised learning
![[web security] - [SQL injection] - error detection injection](/img/18/5c511871dab0e5c684b6b4c081c061.jpg)
[web security] - [SQL injection] - error detection injection

“用Android复刻Apple产品UI”(2)——丝滑的AppStore卡片转场动画

Brush questions -- sword finger offer

初试scikit-learn库

Microservice - Nacos registration center and configuration center

Uploads labs range (with source code analysis) (under update)
随机推荐
Intelij idea efficient skills (III)
Approval process design
Subclass hides the function with the same name of the parent class
The difference between mutually exclusive objects and critical areas
Pyinstaller is not an internal or external command, nor is it a runnable program or batch file
From the 18th line to the first line, the new story of the network security industry
[proteus simulation] 74hc595+74ls154 drive display 16x16 dot matrix
Download and install common programs using AUR
App mobile terminal test [5] file writing and reading
Find mapping relationship
Semi supervised learning
CString getbuffer and releasebuffer instructions
Detailed pointer advanced 2
Redis高可用与持久化
Why can't strings be directly compared with equals; Why can't some integers be directly compared with the equal sign
使用AUR下载并安装常用程序
A Fei's expectation
nifi从入门到实战(保姆级教程)——flow
Brush questions -- sword finger offer
Get the executable path through the process PID (queryfullprocessimagename)