ROS package for a simple navigation system utilizing the Visibility Graph algorithm.
It is compatible with occupancy grid maps generated by popular 2D SLAM such as Cartographer, slam_toolbox, and slam_gmapping
$ cd {ROS_WORKSPACE}/src
$ git clone -b noetic-devel https://github.com/Alpaca-zip/vgraph_nav.git
$ wstool merge vgraph_nav/.rosinstall
$ wstool update
$ python3 -m pip install -r vgraph_nav/requirements.txt
$ rosdep install -r -y -i --from-paths .
$ catkin build
Example of navigation using TurtleBot3.
$ roslaunch vgraph_nav turtlebot3_vgraph_navigation.launch
Before starting navigation, you can define the starting point of the robot.
This is achieved using the 2D Pose Estimate button on the RViz.
More info : e-Manual
After setting the initial pose, the next step is to specify the target position using 2D Nav Goal.
More info : e-Manual
NOTE: The first time after launch, optimization using the Visibility Graph algorithm takes few minutes.
~map_file
: Path to the configuration file (yaml) for the occupancy grid map.~test_folder
: A debug folder primarily used for debugging the Visibility Graph algorithm.~epsilon_factor
: Adjust the corner detection accuracy of the occupancy grid map. Higher values reduce the number of corners.~robot_radius
: Specifies the radius of the robot. This is mainly used for obstacle detection.~odom_topic
: The name of the odometry topic.~scan_topic
: The name of the LaserScan topic.~vel_linear
: Linear velocity.~vel_theta
: Maximum angular velocity.~angle_tolerance
: During navigation, the robot will attempt to align its direction with the goal if the angle difference exceeds this tolerance.~goal_tolerance
: Distance to a waypoint at which it is considered reached.~verbose
: If True, the results of the optimization are displayed.
-
Subscribed Topics:
/initialpose
(geometry_msgs/PoseWithCovarianceStamped) : Receives the robot's initial pose from RViz's 2D Pose Estimate/move_base_simple/goal
(geometry_msgs/PoseStamped) : Receives navigation goals from RViz's 2D Nav Goal/odom
(nav_msgs/Odometry) : Provides the robot's odometry data. Can be remapped via~odom_topic
./scan
(sensor_msgs/LaserScan) : Provides the 2D Lidar data of the robot. Can be remapped via~scan_topic
.
-
Published Topics:
/cost_map
(nav_msgs/OccupancyGrid) : Generates a path along the obstacles in this occupancy grid map. Mainly for visualization in RViz./path
(nav_msgs/Path) : The path that the robot will follow. Mainly for visualization in RViz./cmd_vel
(geometry_msgs/Twist) : Conveys the target velocity data of the robot.