Skip to content

Commit 0d9282e

Browse files
author
Johannes Hechtl
committed
added rotvec bindings
1 parent 9f65db1 commit 0d9282e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/pybind/rcs.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ PYBIND11_MODULE(_core, m) {
178178
t[2].cast<double>());
179179
}));
180180

181+
py::class_<rcs::common::RotVec>(common, "RotVec")
182+
.def(py::init<Eigen::Vector3d>(), py::arg("vec"))
183+
.def("rotation_matrix", &rcs::common::RotVec::rotation_matrix)
184+
.def("as_vector", &rcs::common::RotVec::as_vector)
185+
.def("as_quaternion_vector", &rcs::common::RotVec::as_quaternion_vector)
186+
.def("is_close", &rcs::common::RotVec::is_close, py::arg("other"),
187+
py::arg("eps") = 1e-8)
188+
.def("__str__", &rcs::common::RotVec::str);
189+
181190
py::class_<rcs::common::Pose>(common, "Pose")
182191
.def(py::init<>())
183192
.def(py::init<const Eigen::Matrix4d &>(), py::arg("pose_matrix"))

0 commit comments

Comments
 (0)