当前位置:网站首页>Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (III)
Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (III)
2022-07-03 16:05:00 【Pony Baby】
introduction
We can already use multiple robots together SLAM, And fuse the map . This time, , We have built the map , Let multiple robots locate and plan their movements . Please go to my gitee Download the function pack ,gitee In the first article
Environment building
Let's see launch file , In addition to starting the simulation environment and putting it into the robot , We also joined in acml and move_base node ,acml The robot can judge its position in the map through radar scanning data ,move_base Road strength planning can be carried out .
There are many tutorials online , But the core difficulty here is the existence of multiple robots , So there are many namespace conflicts , It needs to be made clear acml and move_base What have you subscribed to topic, To sort out the relationship between multiple robots .
<launch>
<!-- Set parameters -->
<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"/>
<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="1.0"/>
<arg name="robot_y_pos" value="0.0"/>
<arg name="robot_z_pos" value="0.0"/>
<arg name="robot_yaw" value="0"/>
<arg name="robot_name" value="tb3_1"/>
</include>
</group>
<!-- Import map -->
<node name="map_server" pkg="map_server" type="map_server" args="$(find gazebo_tutorials)/map/map.yaml" output="screen">
<!-- <param name="frame_id" value="/map"/> -->
</node>
<!-- amcl location -->
<include file="$(find gazebo_tutorials)/launch/amcl.launch" >
<arg name="ns" value="tb3_0" />
</include>
<include file="$(find gazebo_tutorials)/launch/amcl.launch" >
<arg name="ns" 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>
<!-- rviz -->
<include file="$(find gazebo_tutorials)/launch/rviz_two_robots.launch" />
</launch>
Instructions
Use command roslaunch gazebo_tutorials navigate_with_map.launch
Startup file
2d pos estimate There is no need to use , Because our initial position is set by ourselves , Basically accurate . But if in use , We may tilt the robot , Then the scanning result of lidar does not match the edge of the map , At this time, you need to use this tool to adjust the posture . When releasing pose, use the one in the upper right corner tool properties, Is this in the default rviz Will not be shown in , Need to be manually added . And now topic There is no namespace , So add... To the front tb3_0/
It represents the first robot pose estimation .
2d Nav Goal Is to release the target location of the hope robot , You also need to modify the upper right corner topic To choose the robot to navigate .
边栏推荐
- App移动端测试【5】文件的写入、读取
- Wechat payment -jsapi: code implementation (payment asynchronous callback, Chinese parameter solution)
- CString getbuffer and releasebuffer instructions
- Intelij idea efficient skills (III)
- CString的GetBuffer和ReleaseBuffer使用说明
- How can technology managers quickly improve leadership?
- 突破100万,剑指200万!
- The difference between RAR and zip files
- Unityshader - materialcapture material capture effect (Emerald axe)
- [list to map] collectors Tomap syntax sharing (case practice)
猜你喜欢
近视:摘镜or配镜?这些问题必须先了解清楚
[redis foundation] understand redis master-slave architecture, sentinel mode and cluster together (Demo detailed explanation)
Creation and destruction of function stack frames
Project -- high concurrency memory pool
The difference between calling by value and simulating calling by reference
深度学习之三维重建
App mobile terminal test [4] APK operation
[web security] - [SQL injection] - error detection injection
Seckill system 2 redis solves the problem of distributed session
Redis在Windows以及Linux系统下的安装
随机推荐
How idea starts run dashboard
Project -- high concurrency memory pool
Redis installation under windows and Linux systems
ASEMI整流桥UMB10F参数,UMB10F规格,UMB10F封装
子类隐藏父类的同名函数
嵌入式开发:避免开源软件的7个理由
CString getbuffer and releasebuffer instructions
MB10M-ASEMI整流桥MB10M
[redis foundation] understand redis master-slave architecture, sentinel mode and cluster together (Demo detailed explanation)
VC下Unicode和ANSI互转,CStringW和std::string互转
Microservice - Nacos registration center and configuration center
Go language self-study series | if else statement in golang
Microservice sentinel flow control degradation
Jmeter线程组功能介绍
[proteus simulation] 74hc595+74ls154 drive display 16x16 dot matrix
Pychart error updating package list: connect timed out
Pandora IOT development board learning (HAL Library) - Experiment 5 external interrupt experiment (learning notes)
Low level version of drawing interface (explain each step in detail)
Under VC, Unicode and ANSI are converted to each other, cstringw and std:: string are converted to each other
Microservice - declarative interface call openfeign