from Mapping.grid_map_lib.grid_map_lib import GridMapdef test_position_set():grid_map = GridMap(100, 120, 0.5, 10.0, -0.5)grid_map.set_value_from_xy_pos(10.1, -1.1, 1.0)grid_map.set_value_from_xy_pos(10.1, -0.1, 1.0)grid_map.set_value_from_xy_pos(10.1, 1.1, 1.0)grid_map.set_value_from_xy_pos(11.1, 0.1, 1.0)grid_map.set_value_from_xy_pos(10.1, 0.1, 1.0)grid_map.set_value_from_xy_pos(9.1, 0.1, 1.0)def test_polygon_set():ox = [0.0, 20.0, 50.0, 100.0, 130.0, 40.0]oy = [0.0, -20.0, 0.0, 30.0, 60.0, 80.0]grid_map = GridMap(600, 290, 0.7, 60.0, 30.5)grid_map.set_value_from_polygon(ox, oy, 1.0, inside=False)if __name__ == '__main__':conftest.run_this_test(__file__)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。