graspit-simulator / graspit

The GraspIt! simulator
http://graspit-simulator.github.io/
Other
180 stars 81 forks source link

Dynamically adding energy classes using Object Factories #94

Closed iretiayo closed 7 years ago

iretiayo commented 7 years ago

Now you can dynamically add energy classes through the SearchEnergyFactory class by specifying the name of the class and a string. Internally, this registers and keeps track of the mapping between the string and Energy class creator. This has eliminated the need for the SearchEnergyType Enum.

jvarley commented 7 years ago

@iretiayo looks good!

@mateiciocarlie you will love this: This is a huge win as anyone can create new search energies for the EG planner in their own plugins, and register them with the searchEnergyFactory. Then they can be used from the EGPlannerDlg or anywhere else without having to modify GraspIt! at all.