Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- navigator.clearAllCostmaps()
- time.sleep(10)
- costmap = OccupancyGrid()
- #footprint_checker = FootprintCollisionChecker(PyCostmap2D(costmap))
- #print(localization_check.global_info)
- costmap.info.resolution = localization_check.global_info.info.resolution
- costmap.info.width = localization_check.global_info.info.width
- costmap.info.height = localization_check.global_info.info.height
- costmap.info.origin.position.x = localization_check.global_info.info.origin.position.x
- costmap.info.origin.position.y = localization_check.global_info.info.origin.position.y
- costmap.data = localization_check.global_info.data
- costmap_ = PyCostmap2D(costmap)
- footprint_checker = FootprintCollisionChecker()
- footprint_checker.setCostmap(costmap_)
- footprint_ = Polygon()
- point = Point32()
- point.x = 0.0
- point.y = 0.70
- point.z = 0.0
- footprint_.points.append(point)
- cost = footprint_checker.footprintCost(footprint_)
- print(cost)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement