47 std::size_t pos = ros_msg_name.find(
'/');
49 py::module m = py::module::import((ros_msg_name.substr(0, pos) +
".msg").c_str());
51 py::object cls = m.attr(ros_msg_name.substr(pos + 1).c_str());
56 bool convertible(
const pybind11::handle& h,
const char* ros_msg_name)
60 PyObject* o = h.attr(
"_type").ptr();
61 return py::cast<std::string>(o) == ros_msg_name;
63 catch (
const std::exception& e)
PYBIND11_EXPORT pybind11::object createMessage(const std::string &ros_msg_name)
PYBIND11_EXPORT bool convertible(const pybind11::handle &h, const char *ros_msg_name)
Main namespace for MoveIt.