This commit is contained in:
2026-03-11 03:26:15 +00:00
parent 4617ce85b6
commit 7afd85e2c6
12 changed files with 190 additions and 26 deletions

View File

@@ -140,6 +140,10 @@ namespace NavigationExample
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool navigation_move_to_order(NavigationHandle handle, Order order, PoseStamped goal);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool navigation_move_to_nodes_edges(NavigationHandle handle, IntPtr nodes, UIntPtr node_count, IntPtr edges, UIntPtr edge_count, PoseStamped goal);
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool navigation_dock_to(NavigationHandle handle, string marker, PoseStamped goal);

View File

@@ -405,8 +405,10 @@ namespace NavigationExample
goal.pose.orientation.w = 1.0;
Console.WriteLine("Docking to docking_point");
NavigationAPI.navigation_dock_to_order(navHandle, order, "charger", goal);
// Console.WriteLine("Docking to docking_point");
// NavigationAPI.navigation_dock_to_order(navHandle, order, "charger", goal);
NavigationAPI.navigation_move_to_nodes_edges(navHandle, order.nodes, order.nodes_count, order.edges, order.edges_count, goal);
// NavigationAPI.navigation_move_to_order(navHandle, order, goal);
NavigationAPI.navigation_set_twist_linear(navHandle, 0.1, 0.0, 0.0);
@@ -493,4 +495,3 @@ namespace NavigationExample
}
}
}