ipab-slmc / exotica

Extensible Optimization Framework
https://ipab-slmc.github.io/exotica
BSD 3-Clause "New" or "Revised" License
150 stars 70 forks source link

Expose GetNumControlledJoints to python scene #661

Closed cmower closed 5 years ago

cmower commented 5 years ago

Minor addition, exposes GetNumControlledJoints in KinematicTree to python scene.

wxmerkt commented 5 years ago

This has already been exposed. You can get the KinematicTree from the scene via: scene.get_kinematic_tree() and then the number of controlled joints from there:

https://github.com/ipab-slmc/exotica/blob/9e1da605f2b191a17410b2f19be19b5e256c7abc/exotica_python/src/pyexotica.cpp#L1151

cmower commented 5 years ago

Similar functions are implemented like GetControlledLinkNames and GetModelJointNames that are just by-passing get_kinematic_tree. This was only to bring GetNumControlledJoints in sync with these (I had a simple use-case for it and thought it would be a quick addition).

wxmerkt commented 5 years ago

The other ones are for historic reasons and are meant to be removed. Is something preventing the correct use of the already exposed method?

cmower commented 5 years ago

Ahh ok, I didn't realize this, no need for this then