Skip to content
Merged
Show file tree
Hide file tree
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
16 changes: 9 additions & 7 deletions src/pyhpp/manipulation/device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ std::map<std::string, GripperPtr_t> Device::grippers() {
->grippers.map;
}

PinDevicePtr_t Device::asPinDevice() {
hpp::pinocchio::DevicePtr_t pinDevice =
std::dynamic_pointer_cast<hpp::pinocchio::Device>(obj);
return pinDevice;
}

void Device::setJointBounds(const char* jointName,
boost::python::list py_jointBounds) {
Frame frame = obj->getFrameByName(jointName);
Expand Down Expand Up @@ -172,14 +166,22 @@ void exposeHandle() {
.def(boost::python::map_indexing_suite<std::map<std::string, HandlePtr_t>,
true>());
}
object asPinDevice(object self) {
PyErr_WarnEx(PyExc_DeprecationWarning,
"asPinDevice() is deprecated: manipulation.Device already "
"inherits from pinocchio.Device, use the object directly",
1);
return self;
}

void exposeDevice() {
// DocClass(Device)
class_<Device, bases<pyhpp::pinocchio::Device>, boost::shared_ptr<Device>,
boost::noncopyable>("Device", init<const std::string&>())
.def("setRobotRootPosition", &Device::setRobotRootPosition)
.def("handles", &Device::handles)
.def("grippers", &Device::grippers)
.def("asPinDevice", &Device::asPinDevice)
.def("asPinDevice", &asPinDevice)
.def("getJointNames", &Device::getJointNames)
.def("getJointConfig", &Device::getJointConfig)
.def("setJointBounds", &Device::setJointBounds);
Expand Down
1 change: 0 additions & 1 deletion src/pyhpp/manipulation/device.hh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ struct Device : public pyhpp::pinocchio::Device {
const Transform3s& positionWRTParentJoint);
std::map<std::string, HandlePtr_t> handles();
std::map<std::string, GripperPtr_t> grippers();
PinDevicePtr_t asPinDevice();
boost::python::list getJointConfig(const char* jointName);
boost::python::list getJointNames();
void setJointBounds(const char* jointName, boost::python::list jointBounds);
Expand Down
Loading