Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend python bindings #843

Merged
merged 1 commit into from
Nov 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions python/types/sba/py_types_six_dof_expmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ void declareTypesSixDofExpmap(py::module& m) {
.def("compute_error", &EdgeSE3ProjectXYZOnlyPose::computeError)
.def("is_depth_positive", &EdgeSE3ProjectXYZOnlyPose::isDepthPositive)
.def("linearize_oplus", &EdgeSE3ProjectXYZOnlyPose::linearizeOplus)
.def("cam_project", &EdgeSE3ProjectXYZOnlyPose::cam_project);
.def("cam_project", &EdgeSE3ProjectXYZOnlyPose::cam_project)
.def_readwrite("fx", &EdgeSE3ProjectXYZOnlyPose::fx)
.def_readwrite("fy", &EdgeSE3ProjectXYZOnlyPose::fy)
.def_readwrite("cx", &EdgeSE3ProjectXYZOnlyPose::cx)
.def_readwrite("cy", &EdgeSE3ProjectXYZOnlyPose::cy)
.def_readwrite("Xw", &EdgeSE3ProjectXYZOnlyPose::Xw);

// Projection using focal_length in x and y directions stereo
py::class_<EdgeStereoSE3ProjectXYZ,
Expand All @@ -109,7 +114,12 @@ void declareTypesSixDofExpmap(py::module& m) {
.def("compute_error", &EdgeStereoSE3ProjectXYZ::computeError)
.def("is_depth_positive", &EdgeStereoSE3ProjectXYZ::isDepthPositive)
.def("linearize_oplus", &EdgeStereoSE3ProjectXYZ::linearizeOplus)
.def("cam_project", &EdgeStereoSE3ProjectXYZ::cam_project);
.def("cam_project", &EdgeStereoSE3ProjectXYZ::cam_project)
.def_readwrite("fx", &EdgeStereoSE3ProjectXYZ::fx)
.def_readwrite("fy", &EdgeStereoSE3ProjectXYZ::fy)
.def_readwrite("cx", &EdgeStereoSE3ProjectXYZ::cx)
.def_readwrite("cy", &EdgeStereoSE3ProjectXYZ::cy)
.def_readwrite("bf", &EdgeStereoSE3ProjectXYZ::bf);

// Edge to optimize only the camera pose stereo
templatedBaseUnaryEdge<3, Vector3, VertexSE3Expmap>(
Expand Down
Loading