Nav2 导航集成:新增 nav2_navigator.py,mission_executor 改用 Nav2 action 导航
- 新增 agv_app/utils/nav2_navigator.py:Nav2Navigator 类,通过 ros2 action /navigate_to_pose 和 /navigate_through_poses 与 Nav2 通信,支持路径点导航 - app.py:navigate/to, navigate/path, navigate/status 三个 API 改用 Nav2Navigator - mission_executor.py:_execute_point 中调用 _nav2_go_to_point() 替代原来的 time.sleep 模拟移动,Nav2 负责从当前点到目标点的自主导航 - 原有的 map_navigator.py(A* + Pure Pursuit 自实现)保留不动,供无 Nav2 时降级用
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
[
|
||||
{
|
||||
"id": "m_1778767289",
|
||||
"name": "机型1",
|
||||
"serial_prefix": "",
|
||||
"poses": [
|
||||
{
|
||||
"id": "pose_1778767302",
|
||||
"name": "front_1",
|
||||
"photo_type": "front",
|
||||
"arm_angles": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"speed": 500,
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"id": "pose_1778767312",
|
||||
"name": "front_2",
|
||||
"photo_type": "front",
|
||||
"arm_angles": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"speed": 500,
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"id": "pose_1778767323",
|
||||
"name": "back_1",
|
||||
"photo_type": "back",
|
||||
"arm_angles": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"speed": 500,
|
||||
"description": ""
|
||||
},
|
||||
{
|
||||
"id": "pose_1778767325",
|
||||
"name": "back_2",
|
||||
"photo_type": "back",
|
||||
"arm_angles": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"speed": 500,
|
||||
"description": ""
|
||||
}
|
||||
],
|
||||
"description": "",
|
||||
"notes": ""
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user