diff --git a/nav2_loopback_sim/nav2_loopback_sim/loopback_simulator.py b/nav2_loopback_sim/nav2_loopback_sim/loopback_simulator.py index 54e83cbb6e..c2c4290b68 100644 --- a/nav2_loopback_sim/nav2_loopback_sim/loopback_simulator.py +++ b/nav2_loopback_sim/nav2_loopback_sim/loopback_simulator.py @@ -324,6 +324,7 @@ def getLaserScan(self, num_samples): # max_distance = math.sqrt( # (self.map.info.width * self.map.info.resolution) ** 2 + # (self.map.info.height * self.map.info.resolution) ** 2) + # max_distance = max(max_distance, self.scan_msg.range_max) # for i in range(num_samples): # curr_angle = theta + self.scan_msg.angle_min + i * self.scan_msg.angle_increment # x1 = float(x0) + max_distance * math.cos(curr_angle)