borglab / GTDynamics

Full kinodynamics constraints for arbitrary robot configurations with factor graphs.
BSD 2-Clause "Simplified" License
39 stars 10 forks source link

ObjectiveFactors renaming #194

Closed gchenfc closed 3 years ago

gchenfc commented 3 years ago

Addresses #183

Changes naming of add_link_objectives and add_joint_objectives and has them inherit from NonlinearFactorGraph so that they don't need to mutate a passed-in graph. Syntax:

graph.add(JointObjectives(...).accel(...).angle(...));`

An alternative would be to have a create() function that returns the factor graph, and JointObjectives would no longer inherit from NonlinearFactorGraph. So for example, the calling syntax would then look like

graph.add(JointObjectives(...).accel(...).angle(...).create());`

I opted for the former since I believe it to be cleaner.

This PR also changes the names of add_joint_rest_objectives and AddPointGoalFactors similarly, and adds them to the python wrapper.