]> defiant.homedns.org Git - ros_wild_thumper.git/commitdiff
sonar sensors: set fov to 40° as stated in http://picaxe.hobbizine.com/srf05.html
authorErik Andresen <erik@vontaene.de>
Thu, 15 Oct 2015 19:32:39 +0000 (21:32 +0200)
committerErik Andresen <erik@vontaene.de>
Thu, 15 Oct 2015 19:32:39 +0000 (21:32 +0200)
"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
scripts/wt_node.py

index 3dd3c902503cb5cfe3fcd9a651d193de97b8463f..6f3b2e8d9a1f2e16c11ed738a0b50764003c446f 100644 (file)
@@ -4,8 +4,9 @@ global_costmap:
   update_frequency: 5.0
   static_map: true
   rolling_window: true
   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'}
   plugins:
   - {name: obstacle_layer, type: 'costmap_2d::ObstacleLayer'}
   - {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
index 5056107206766930273850efc4dc6a8ce579a222..dcae6740c02b7fa35e07eb7416f75293cc0819eb 100755 (executable)
@@ -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)
        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.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
                
 
                        self.start_dist_srf(0x7) # get next value