Skip to content

Commit 4c80aff

Browse files
committed
ros server class bindings
1 parent fb6df1f commit 4c80aff

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

bindings/python/pyRosImpl.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ PYBIND11_MODULE(pyci, m) {
4545
.def("getBounds", &ProblemDescription::getBounds)
4646
;
4747

48-
// py::class_<RosServerClass>(m, "RosServerClass")
49-
// .def(py::init(&make_ros_server_class),
50-
// py::arg("ci"),
51-
// py::arg("ros_namespace") = "cartesian",
52-
// py::arg("tf_prefix") = "ci",
53-
// py::arg("publish_tf") = true)
54-
// .def("run", &RosServerClass::run)
55-
// ;
48+
py::class_<RosServerClass>(m, "RosServerClass")
49+
.def(py::init(&make_ros_server_class),
50+
py::arg("ci"),
51+
py::arg("ros_namespace") = "cartesian",
52+
py::arg("tf_prefix") = "ci",
53+
py::arg("publish_tf") = true)
54+
.def("run", &RosServerClass::run)
55+
;
5656

5757

5858
py::class_<TaskDescription,

bindings/python/pyRosImpl.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ CartesianInterfaceImpl::Ptr make_ci(std::string solver_name,
3434

3535
}
3636

37-
// RosServerClass::UniquePtr make_ros_server_class(
38-
// CartesianInterfaceImpl::Ptr ci,
39-
// std::string ros_namespace,
40-
// std::string tf_prefix,
41-
// bool publish_tf)
42-
// {
43-
// RosServerClass::Options opt;
44-
// opt.ros_namespace = ros_namespace;
45-
// opt.tf_prefix = tf_prefix;
46-
// opt.publish_tf = publish_tf;
37+
RosServerClass::UniquePtr make_ros_server_class(
38+
CartesianInterfaceImpl::Ptr ci,
39+
std::string ros_namespace,
40+
std::string tf_prefix,
41+
bool publish_tf)
42+
{
43+
RosServerClass::Options opt;
44+
opt.ros_namespace = ros_namespace;
45+
opt.tf_prefix = tf_prefix;
46+
opt.publish_tf = publish_tf;
4747

48-
// return std::make_unique<RosServerClass>(ci, opt);
49-
// }
48+
return std::make_unique<RosServerClass>(ci, opt);
49+
}
5050

5151
auto pb_get_task_id(const ProblemDescription& self,
5252
int id)

0 commit comments

Comments
 (0)