RTAB Mapping and Localization for a two wheeled robot.
- Install Rtabmap :
sudo apt-get install ros-noetic-rtabmap*
- Clone the repositry :
git clone https://github.com/Vamsi-IITI/RTAB_Mapping_and_Localization.git
- Navigate up to the root level directory ( cd RTAB_Mapping_and_Localization ) , and execute:
catkin_make
source devel/setup.bash
roslaunch my_robot world.launch
- To operate the robot via the keyboard, open a second terminal, navigate to the root level directory, and execute:
source devel/setup.bash
roslaunch my_robot teleop.launch
You can then command the robot to move using the keys indicated by the teleop node.
- Finally, to run SLAM, open a third terminal, navigate to the root level directory, and execute:
source devel/setup.bash
roslaunch my_robot mapping.launch
- As you move the robot around, RTAB-Map will build a map of the room. When you terminate the mapping window, the map will be saved as a database file in the launch folder. To view the map, execute:
rtabmap-databaseViewer ~/RTAB_Mapping_and_Localization/src/my_robot/maps/rtabmap.db
- Click "yes" when asked about database parameters, and then select "Constraint View" and "Graph View" from the View menu.
Note : Map uploaded in repo is slightly distorted because robot collided with walls during mapping process.
rosrun rqt_tf_tree rqt_tf_tree