ros2_controllers icon indicating copy to clipboard operation
ros2_controllers copied to clipboard

Refactor: joint_trajectory_controllers library

Open thedevmystic opened this issue 2 months ago • 3 comments

Hey dear ros2_controllers maintainers, while browsing joint_trajectory_controllers library I noticed this library do not have necessary comments and in source files (e.g., trajectory.cpp) the code is mess and do not follows DRY (Do not Repeated Yourself) and lacks comments. If you want me go ahead and refactor the library codebase, then just give me a green flag.

I can do the following things,

  1. Enforce DRY.
  2. Add Doxygen-style comments.
  3. Add new features like explicit LINEAR interpolation method.
  4. Extend test cases for new features.

As this is a huge is undertaking (refactoring a library), I need a green flag from you, the respected maintainers.

Regards, Surya

thedevmystic avatar Nov 20 '25 16:11 thedevmystic

there is for sure enough potential for improvements..my suggestion is to make that in small batches, focussing on a single file for example. otherwise the reviews will take an eternity.

christophfroehlich avatar Nov 20 '25 22:11 christophfroehlich

Of course then, so at first I will focus on refactoring and feature addition in following order,

  1. Refactoring of joint_trajectory/include directory
  2. Refactoring of joint_trajectory/src directory
  3. Feature addition, like explicit LINEAR interpolation method
  4. Test case extension

And submit different PR on each.

If its fine with you, can I proceed? @christophfroehlich

thedevmystic avatar Nov 21 '25 02:11 thedevmystic

After PR #2019 is merged. I'll focus on tolerances.hpp.

Future plan: Refactoring of tolerances.hpp

Current Progress:

  • [x] interpolation_methods.hpp
  • [ ] tolerances.hpp
  • [ ] trajectory.hpp & .cpp
  • [ ] validate_jtc_parameters.hpp
  • [ ] joint_trajectory_controller.hpp & .cpp

Regards, Surya!

thedevmystic avatar Dec 01 '25 15:12 thedevmystic