Skip to content

chore: minor controller changes#40

Merged
danielsanjosepro merged 12 commits intolearnsyslab:mainfrom
dmalexa5:main
Feb 28, 2026
Merged

chore: minor controller changes#40
danielsanjosepro merged 12 commits intolearnsyslab:mainfrom
dmalexa5:main

Conversation

@dmalexa5
Copy link
Copy Markdown
Contributor

Hi all,

I'm working on a similar controller that extends the cartesian_controller and thought I might kick back some small changes/improvements upstream.

Changes

  • Switch to target-based ament export
  • Bumped down python requirement. as humble is primarily linked to 3.10
  • Moved jacobian pseudoinverse memory allocation out of the control loop
  • Refactored state interface read-and-filter into updateCurrentState for readability

This is my first contribution here, so please let me know if I missed any styling guidelines or if you'd like the commits structured differently. Looking forward to hearing your feedback!

Comment thread include/crisp_controllers/cartesian_controller.hpp Outdated
Comment thread src/cartesian_controller.cpp
Copy link
Copy Markdown
Collaborator

@danielsanjosepro danielsanjosepro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you a lot for contributing :) All in all, really good! Thanks for catching the bug #41 this needs a fix for sure. I left a few comments that we need to discuss before merging. Feel free to add yourself to the community contributors list and add a link to your project.

Comment thread src/cartesian_controller.cpp Outdated
Comment thread src/cartesian_controller.yaml
Comment thread src/cartesian_controller.yaml
Comment thread src/cartesian_controller.cpp Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes small structural and performance-oriented improvements to the cartesian_controller, adjusts controller parameters, and updates the build/export configuration for the crisp_controllers library.

Changes:

  • Refactors joint state read/filter logic into updateCurrentState() and preallocates Jacobian pseudo-inverse/identity matrices outside the control loop.
  • Introduces a new jacobian_regularization parameter and changes how regularization is configured/used for pseudo-inverses.
  • Updates CMake exports to use target-based ament exports; lowers Python requirement in pyproject.toml to 3.10.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/cartesian_controller.yaml Adds jacobian_regularization, tweaks defaults, and removes nullspace.regularization.
src/cartesian_controller.cpp Moves state update into helper, preallocates matrices, and adjusts pseudo-inverse regularization usage.
include/crisp_controllers/cartesian_controller.hpp Declares updateCurrentState(), num_joints_, and preallocated matrices.
CMakeLists.txt Switches to target-based export approach and expands exported dependencies.
pyproject.toml Lowers requires-python from >=3.11 to >=3.10.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cartesian_controller.yaml Outdated
Comment thread CMakeLists.txt
Comment thread src/cartesian_controller.cpp Outdated
Comment thread src/cartesian_controller.cpp Outdated
@danielsanjosepro
Copy link
Copy Markdown
Collaborator

@dmalexa5 thanks for this David! It is much cleaner to have one function to update the currentState and thanks for catching the issue #41. I will merge this, the rolling CI is failing because of a different reason. Feel free to open any other PRs if you want ! Best

@danielsanjosepro danielsanjosepro merged commit d682c9a into learnsyslab:main Feb 28, 2026
3 of 4 checks passed
yizhongzhang1989 pushed a commit to yizhongzhang1989/crisp_controllers that referenced this pull request Mar 17, 2026
…ble parameter for inverse mass matrix computation (learnsyslab#40)

* Bump down python requirement

* Fixed library expoert issues

* Minor controller changes

* Minor controller changes

* Format CMakeLists

* Revert parameters header inclusion

* chore: add regularization to operational space pseudoinverse

* fix: targets exported before dependencies (incorrecttly)

* chore: revert back to nullspace regularization parameter

* fix: dq assignment and num_joint usage

* chore: Update docstrings for updateCurrentState

---------

Co-authored-by: Daniel San José Pro <42489409+danielsanjosepro@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants