diff --git a/README.md b/README.md
index f6e04a8..44ad3e1 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ More info : [e-Manual](https://emanual.robotis.com/docs/en/platform/turtlebot3/n
- `~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.
- `~down_scale_factor`: A factor for downscaling the occupancy grid map. Please reduce this value if optimization is taking too long.
-- `~clearance`: The required clearance for the robot to navigate. It has to be at least half the maximum width of the robot. This is also used for obstacle detection.
+- `~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.
diff --git a/launch/include/vgraph_planner.launch b/launch/include/vgraph_planner.launch
index 59fec89..5ccbbe3 100644
--- a/launch/include/vgraph_planner.launch
+++ b/launch/include/vgraph_planner.launch
@@ -3,7 +3,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/launch/turtlebot3_vgraph_navigation.launch b/launch/turtlebot3_vgraph_navigation.launch
index a7ec53a..47f4921 100644
--- a/launch/turtlebot3_vgraph_navigation.launch
+++ b/launch/turtlebot3_vgraph_navigation.launch
@@ -7,7 +7,7 @@
-
+
@@ -39,7 +39,7 @@
-
+
diff --git a/scripts/vgraph_planner.py b/scripts/vgraph_planner.py
index fb55943..7b10ca0 100755
--- a/scripts/vgraph_planner.py
+++ b/scripts/vgraph_planner.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-# Copyright (C) 2023 Alapaca-zip
+# Copyright (C) 2023-2024 Alapaca-zip
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ def __init__(self):
self.map_file_path = rospy.get_param("~map_file", "map.yaml")
self.test_folder_path = rospy.get_param("~test_folder", "test")
self.down_scale_factor = rospy.get_param("~down_scale_factor", 0.1)
- self.clearance = rospy.get_param("~clearance", 0.1)
+ self.robot_radius = rospy.get_param("~robot_radius", 0.1)
self.odom_topic = rospy.get_param("~odom_topic", "/odom")
self.scan_topic = rospy.get_param("~scan_topic", "/scan")
self.vel_linear = rospy.get_param("~vel_linear", 0.1)
@@ -98,7 +98,7 @@ def change_image_resolution(self, image, factor):
black_pixels = self.find_black_pixels(image)
enlarged_image, black_pixels = self.enlarge_black_pixels(
- image, black_pixels, self.clearance
+ image, black_pixels, self.robot_radius
)
down_scaled_image = enlarged_image.resize(
@@ -665,14 +665,14 @@ def send_stop(self):
rospy.sleep(0.1)
def check_obstacle(self):
- if self.clearance < self.range_min:
+ if self.robot_radius < self.range_min:
rospy.logwarn(
- "Clearance is smaller than range_min. Please check the parameters."
+ "robot_radius is smaller than range_min. Please check the parameters."
)
return False
for distance in self.scan_data:
- if self.range_min < distance < self.clearance:
+ if self.range_min < distance < self.robot_radius:
return True
return False