original_docstring: 
          updated the map based on current observation (point cloud) and current pose of robot
          :param pcd: point cloud in robot base frame, in meter
          :param pose: pose of robot, in metric unit
  
          :type pcd: np.ndarray [num_points, 3]
          :type pose: [x_robot_co-ordinate, y_robot_co-ordinate, robot_orientation]
          :return: map of the environment, values [1-> obstacle, 0->free, unknown space]
          :rtype: np.ndarray
          
docstring: updated the map based on current observation (point cloud) and current pose of robot
docstring_tokens: updated the map based on current observation ( point cloud ) and current pose of robot
code: def update_map(self, pcd, pose):
          """
          updated the map based on current observation (point cloud) and current pose of robot
          :param pcd: point cloud in robot base frame, in meter
          :param pose: pose of robot, in metric unit
  
          :type pcd: np.ndarray [num_points, 3]
          :type pose: [x_robot_co-ordinate, y_robot_co-ordinate, robot_orientation]
          :return: map of the environment, values [1-> obstacle, 0->free, unknown space]
          :rtype: np.ndarray
          """
          # transfer points from base frame to global frame
          pcd = transform_pose(pcd, pose)
  
          # convert point from m to cm
          pcd = pcd * 100
  
          # for mapping we want global center to be at origin
          geocentric_pc_for_map = transform_pose(
              pcd, (self.map_size_cm / 2.0, self.map_size_cm / 2.0, np.pi / 2.0)
          )
          geocentric_flat = bin_points(
              geocentric_pc_for_map, self.map.shape[0], self.z_bins, self.resolution
          )
  
          self.map = self.map + geocentric_flat
  
          map_gt = self.map[:, :, 1] / self.obs_threshold
          map_gt[map_gt >= 0.5] = 1.0
          map_gt[map_gt < 0.5] = 0.0
  
          return map_gt
code_tokens: def update_map ( self , pcd , pose ) : pcd = transform_pose ( pcd , pose ) pcd = pcd * 100 geocentric_pc_for_map = transform_pose ( pcd , ( self . map_size_cm / 2.0 , self . map_size_cm / 2.0 , np . pi / 2.0 ) ) geocentric_flat = bin_points ( geocentric_pc_for_map , self . map . shape [ 0 ] , self . z_bins , self . resolution ) self . map = self . map + geocentric_flat map_gt = self . map [ : , : , 1 ] / self . obs_threshold map_gt [ map_gt >= 0.5 ] = 1.0 map_gt [ map_gt < 0.5 ] = 0.0 return map_gt
short_docstring: updated the map based on current observation (point cloud) and current pose of robot
short_docstring_tokens: updated the map based on current observation ( point cloud ) and current pose of robot
comment: """
          updated the map based on current observation (point cloud) and current pose of robot
          :param pcd: point cloud in robot base frame, in meter
          :param pose: pose of robot, in metric unit
  
          :type pcd: np.ndarray [num_points, 3]
          :type pose: [x_robot_co-ordinate, y_robot_co-ordinate, robot_orientation]
          :return: map of the environment, values [1-> obstacle, 0->free, unknown space]
          :rtype: np.ndarray
          """$SEP$# transfer points from base frame to global frame$SEP$# convert point from m to cm$SEP$# for mapping we want global center to be at origin