MCPcopy Create free account
hub / github.com/UniflexAI/tinynav / PYBIND11_MODULE

Function PYBIND11_MODULE

tinynav/cpp/cpp_bind_definitions.cpp:69–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68
69PYBIND11_MODULE(tinynav_cpp_bind, m) {
70 m.doc() = "tinynav pybind11 binding";
71 m.def("run_raycasting_cpp", &run_raycasting_cpp, "A function that performs raycasting on a depth image",
72 py::arg("depth_image"),
73 py::arg("T_cam_to_world"),
74 py::arg("grid_shape"),
75 py::arg("fx"), py::arg("fy"), py::arg("cx"), py::arg("cy"),
76 py::arg("origin"),
77 py::arg("step"),
78 py::arg("resolution"));
79
80 m.def(
81 "pose_graph_solve",
82 &pose_graph_solve,
83 py::arg("camera_poses"),
84 py::arg("relative_pose_constraints"),
85 py::arg("constant_pose_index"),
86 py::arg("max_iteration_num"),
87 R"pbdoc(
88 pose graph solve function.
89
90 Parameters
91 ----------
92 camera_poses : dict[int, np.ndarray (4x4)]
93 Dictionary mapping camera index to 4x4 pose matrix.
94 relative_pose_constraints : list of tuples
95 Each tuple contains:
96 - cam_idx_i : int
97 - cam_idx_j : int
98 - relative_pose_j_i : np.ndarray (4x4)
99 - translation_weight : np.ndarray (3,)
100 - rotation_weight : np.ndarray (3,)
101 constant_pose_index : dict[int, bool]
102 Dictionary mapping camera index to whether the pose is constant.
103 max_iteration_num : int
104 Maximum number of iterations for the pose graph optimization.
105 Returns
106 -------
107 optimized_camera_poses : dict[int, np.ndarray (4x4)]
108 Dictionary mapping camera index to optimized 4x4 pose matrix.
109 )pbdoc"
110 );
111
112 m.def(
113 "ba_solve",
114 &ba_solve,
115 py::arg("camera_poses"),
116 py::arg("point_3ds"),
117 py::arg("observations"),
118 py::arg("K"),
119 py::arg("constant_pose_index"),
120 py::arg("relative_pose_constraints"),
121 R"pbdoc(
122 Bundle adjustment solve function.
123
124 Parameters
125 ----------
126 camera_poses : dict[int, np.ndarray (4x4)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected