cmower/optas

Naming convention violated for jacobian methods in models.py

cmower opened this issue · 2 comments

Almost all the get methods in RobotModel use incorrect naming conventions. They all miss the word link. These should be replaced.

There is lots of code that is using the incorrect naming convention, so I think it would be best for a while to add deprecation warnings.

Added a deprecation warning to multiple functions. However, now when running the example python example_planar_idk.py I get the following error:

example_planar_idk.py:27: DeprecationWarning: 'get_global_linear_jacobian_function' will be deprecated, please use 'get_global_link_linear_jacobian_function' instead
  J = robot.get_global_linear_jacobian_function(link=link_ee)
Traceback (most recent call last):
  File "example_planar_idk.py", line 27, in <module>
    J = robot.get_global_linear_jacobian_function(link=link_ee)
  File ".local/lib/python3.8/site-packages/optas/models.py", line 63, in wrapper
    return new_function(*args, **kwargs)
TypeError: get_global_link_linear_jacobian_function() got multiple values for argument 'link'

Fixed issues above. In first official release I will need to actually deprecate these methods. Closing for now.