-
Notifications
You must be signed in to change notification settings - Fork 81
Description
In robots_loader.py there are many utility methods to load a RobotWrapper containing one of the robots of this repository.
Is it really needed? I do not like these special methods. There are many reasons why I say this:
-
First of all, they are based on
RobotWrapper, and we should not encourage the use ofRobotWrapper -
For most robots, they amount to little more than a call to
RobotWrapper.BuildFromURDF. Pinocchio methods are already convenient enough to load robots. -
They make the code employing them less transparent
-
They introduce a dependency to Pinocchio
-
They are not general
-
They are not flexible.
- file path is hardcoded
- If one wants to use a slightly modified URDF, you cannot by using these methods, unless you modify the installed files.
- If you are using one of those methods and you find you need to modify the URDF but you do not want to do change the installed files, the only option is to scrap them and rewrite the code so that they are not used. Better not to give this option entirely! You should know were your URDF files are and what's in them
- What if a robot is removed from this repo? Then the Python code will be removed too. This will break the code using it, and this is really unnecessary.
-
They introduce yet-another-way of doing the same thing, i. e. loading a URDF model. Do we really need another way? This is not really desirable, as goes, for instance, the Zen of Python :
There should be one-- and preferably only one --obvious way to do it.We already have- native Pinocchio methods
- shortcuts
buildModelsFromUrdfandcreateDatas(models) - the
RobotWrapperinterface
-
They make the robots contained in this repo sort of "special", because they have a special way to be loaded
-
They are confusing to newcomers, because they hide too much detail and then they will not know how to load a generic robot or a slightly modified one (I can call some newcomers to testify)
Summarizing, I think this loader functions are a bad idea and should be removed