This repository contains the source code for the generation of an environment map by performing SLAM, and of robot navigation using the DWA local planner.
CMakeList.txtthis file contains a description of the project's source files and targetsinfo.txtthis file contrains the registration number, name, last name of the authorspackage.xmlthis file contains a collection of metadata componentslaunch/*this folder contains the project launch filesmaps_raw/*this folder contains the.pgmand.yamlfiles of the generated mapssrc/navigation.cppthis executable instantiates thenavigationnode, reads the new goal from thewaypoints.csvfile (defined in the/navigation/csv_pathparameter) and publishes it via move base actionsrc/tf_publisher.cppthis executable instantiates thetf_publishernode and publishes the tf between odom and t265 frames based on the t265 odometrystage/*this folder contains the.pgm,.yaml,.pngand.worldfiles of the final chosen mapconfig_mapping.rvizthis file contains the rviz configuration parameters for the generation of the mapconfig_nav.rvizthis file contains the rviz configuration parameters for the robot navigationwaypoints.csvthis file contains the waypoints read by thenavigationnode to set the new goalwaypoints.pngthis file contains an image of the map chosen for navigation, with the pose and sequence number of the selected waypoints
Prerequisites:
- Linux environment
- ROS noetic
Launchfile for generating the map with the provided single plane scanner data (from /scan topic):
roslaunch second_project slam_toolbox_scan.launchLaunchfile for generating the map with the 2D data converted from the 3D laser (includes a pointcloud_to_laserscan node)
roslaunch second_project slam_toolbox_2d_scan.launchAfter launching either one of these, a rosbag should be played in order to generate the map.
Both launchfiles were run with two separate bags, and the resulting maps were stored in the maps_raw folder.
These commands also launch the tf_publisher node together with other static transforms, and RViz with the config_mapping.rviz configuration.
After the map was generated, it was saved by running:
rosrun map_server map_saver -f <map_name>The map chosen for navigation was the map generated from the converted 2D scanner by playing the first bag; noise was removed in post-processing.
The algorithm chosen for local path planning is DWA.
roslaunch second_project amcl.launchThis also launches the navigation node and RViz with the config_navigation.rviz configuration.
The navigation node reads a sequence of waypoints, one at a time, from the waypoints.csv file; each waypoint represents the new goal that the robot attempts to reach.
This is the map with the chosen waypoints:
pointcloud_to_laserscanto convert velodyne pointcloud to laserscanslam_toolboxwithgmappingto generate the map (detailed config incfg/st_config_scan.yaml)dwa_local_plannerfor local planningtfandtf2_rosfor static transformsrvizfor visualizationstage_rosfor stage simulationmove_basefor the navigation stackamclfor localizationmap_serverfor saving/serving the mapamclfor autonomous navigation
