stack-of-tasks / sot-core

Hierarchical task solver plug-in for dynamic-graph
BSD 2-Clause "Simplified" License
19 stars 32 forks source link

Exposing RobotSimu in python #185

Closed florent-lamiraux closed 3 years ago

florent-lamiraux commented 3 years ago

In order to test some code aimed at running in a remote interpreter, I am trying to replace the Device entity by RobotSimu. However, I get an error when trying to access to RobotSimu..after. The entity is exposed in python class Device but not by RobotSimu that derives from Device (in C++, not in python).

I try to add some boost::python code here: https://github.com/florent-lamiraux/sot-core/commit/28bda180ffa60c7029404818a485def500cb9f59. Python class RobotSimu has a member after, but when trying to access to it, I get the following error message

ArgumentError: Python argument types in
    None.None(RobotSimu)
did not match C++ signature:
    None(dynamicgraph::sot::Device {lvalue})

Could someone help me ?

florent-lamiraux commented 3 years ago

I found the solution by following the model provided in sot-tiago that exposes SoTTiagoDevice deriving from Device.