Multiple TB3 navigation in RViz and Gazebo
$ cd /catkin_ws/src
$ git clone https://github.com/raghdutionn/N-Robots-Navigation
$ cd .. (go back to parent directory)
$ catkin_make
$ cd
$ source ~/catkin_ws/devel/setup.bash
$ sudo apt-get install ros-melodic-turtlebot3
$ sudo apt-get install ros-melodic-turtlebot3-gazebo
$ sudo apt-get install ros-melodic-turtlebot3-navigation
$ roscore (1st tab)
$ export TURTLEBOT3_MODEL=burger (2nd tab)
$ roslaunch turtlebot3_gazebo turtlebot3_world_multi.launch
note: if you got an error like this:
just go to the exact directory and launch the file, and hopefully it'll work
$ export TURTLEBOT3_MODEL=burger (3rd tab)
$ roslaunch turtlebot3_navigation turtlebot3_navigation_multi.launch
after you adjust each robot's laser to the map using 2D Pose Estimate (notice there are two 2D pose Estimate and 2D Nav Goal for each robot) you'll see the map like this:
$ rostopic list (to see the topics)
$ rosrun rqt_graph rqt_graph
n_robots_nav.webm.mov
[1] - https://github.com/syahmi001/multinav_turtlebot3/tree/f4ab06f46fb0b8d13386ec61e46b4ff756de0269