Ejemplo n.º 1
0
 def calc_map_range(self, ox, oy, oa):
     """
     Given a location on the map and a direction, predict the visible
     laser range.
      
     :Args:
         | ox (double): X location of observation
         | oy (double): Y location of observation
         | oa (double): Bearing (from North, in degrees) of the reading
     :Returns:
         | (double) Range (in m) expected to be observed by the laser
     """
     r = laser_trace.map_calc_range(ox, oy, oa, self.map_width,
                                    self.map_height, self.map_origin_x,
                                    self.map_origin_y, self.map_resolution,
                                    self.scan_range_max, self.map_data)
     if r <= self.scan_range_max:
         return r
     else:
         # rospy.logwarn("calc_map_range giving oversized ranges!!")
         return self.scan_range_max
Ejemplo n.º 2
0
 def calc_map_range(self, ox, oy, oa):
     """
     Given a location on the map and a direction, predict the visible
     laser range.
      
     :Args:
         | ox (double): X location of observation
         | oy (double): Y location of observation
         | oa (double): Bearing (from North, in degrees) of the reading
     :Returns:
         | (double) Range (in m) expected to be observed by the laser
     """
     r = laser_trace.map_calc_range(ox, oy, oa, self.map_width,
                                       self.map_height,
                                       self.map_origin_x,
                                       self.map_origin_y,
                                       self.map_resolution,
                                       self.scan_range_max,
                                       self.map_data)
     if r <= self.scan_range_max:
         return r
     else:
         # rospy.logwarn("calc_map_range giving oversized ranges!!")
         return self.scan_range_max