Skip to content

Commit

Permalink
min of max_distance or range_max
Browse files Browse the repository at this point in the history
Signed-off-by: Jatin Patil <[email protected]>
  • Loading branch information
JatinPatil2003 committed Aug 17, 2024
1 parent d75e3cd commit 9a4cb0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nav2_loopback_sim/nav2_loopback_sim/loopback_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +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)
# max_distance = min(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)
Expand Down

0 comments on commit 9a4cb0e

Please sign in to comment.