From fb692fdbf76fda0e13adb284b6ccd09cb3fa7afb Mon Sep 17 00:00:00 2001 From: Erik Andresen Date: Thu, 15 Oct 2015 21:32:39 +0200 Subject: [PATCH 1/1] =?utf8?q?sonar=20sensors:=20set=20fov=20to=2040=C2=B0?= =?utf8?q?=20as=20stated=20in=20http://picaxe.hobbizine.com/srf05.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit "A proper understanding of the detection zone of the SRF05 is key to developing a successful detection and avoidance algorithm. The beam width (or beam angle) of ultrasonic range finders is typically described as being a cone of a certain angle (for the SRF05 it is about 55°). This angle describes the arc at which the ultrasound pulse emanates from the transducer. The mistake is sometimes made to consider the detection zone of the sensor as being identical to this beam. The conclusion of this logic would be that the detection zone extends from the sensor in an even, steadily expanding arc until it reaches the 4 meter limit of the SRF05 range. In reality the detection zone expands at about 55° for the first meter and then the rate of expansion starts to decay. At about 2 meters distance from the sensor the angle of the detection zone is closer to 40° with the zone reaching a maximum width of about 80-100 centimeters. From this point the detection zone will begin to narrow, ultimately reaching zero when the distance from the sensor is a little more than 4 meters." --- config/global_costmap_params_odom.yaml | 5 +++-- scripts/wt_node.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/global_costmap_params_odom.yaml b/config/global_costmap_params_odom.yaml index 3dd3c90..6f3b2e8 100644 --- a/config/global_costmap_params_odom.yaml +++ b/config/global_costmap_params_odom.yaml @@ -4,8 +4,9 @@ global_costmap: update_frequency: 5.0 static_map: true rolling_window: true - width: 10.0 - height: 10.0 + width: 100.0 + height: 100.0 + resolution: 1.0 plugins: - {name: obstacle_layer, type: 'costmap_2d::ObstacleLayer'} - {name: inflation_layer, type: 'costmap_2d::InflationLayer'} diff --git a/scripts/wt_node.py b/scripts/wt_node.py index 5056107..dcae674 100755 --- a/scripts/wt_node.py +++ b/scripts/wt_node.py @@ -238,13 +238,13 @@ class MoveBase: def get_dist_forward(self): if self.pub_range_fwd.get_num_connections() > 0: dist = self.read_dist_srf(0x15) - self.send_range(self.pub_range_fwd, "sonar_forward", Range.ULTRASOUND, dist, 0.04, 6, 30) + self.send_range(self.pub_range_fwd, "sonar_forward", Range.ULTRASOUND, dist, 0.04, 6, 40) self.start_dist_srf(0x5) # get next value def get_dist_backward(self): if self.pub_range_bwd.get_num_connections() > 0: dist = self.read_dist_srf(0x17) - self.send_range(self.pub_range_bwd, "sonar_backward", Range.ULTRASOUND, dist, 0.04, 6, 30) + self.send_range(self.pub_range_bwd, "sonar_backward", Range.ULTRASOUND, dist, 0.04, 6, 40) self.start_dist_srf(0x7) # get next value -- 2.39.2