stephane-caron / pink

Python inverse kinematics based on Pinocchio
Apache License 2.0
169 stars 11 forks source link

CoM task and optional joint limit check #96

Closed simeon-ned closed 4 days ago

simeon-ned commented 1 week ago

In this PR, we introduce a simple Center of Mass (CoM) regulation task, where the CoM is calculated using Pinocchio. This task is structured similarly to the existing Frame task, but without the orientation aspect. We have included an example using the G1 robot in the script examples/humanoid_g1_com.py:

https://github.com/stephane-caron/pink/assets/26837717/70129c42-c491-4531-981f-a625611b312e

However, we currently need to install the robot_descriptions package directly from the dedicated repository. @stephane-caron, could you kindly release a new version of robot_descriptions that includes the G1 robot on PyPI before we merge this PR?

Additionally, we propose adding an optional argument in the solve_ik function to allow users to ignore joint limit checks. This feature could be useful for those who prefer handling exceptions themselves. Alternatively, joint limit violations could generate a warning instead of an exception. We would love to hear your thoughts on this, @stephane-caron.

Thank you for reviewing these proposed changes, and we look forward to your feedback.

coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 9691369975

Details


Totals Coverage Status
Change from base Build 9594397741: 0.08%
Covered Lines: 1640
Relevant Lines: 1656

💛 - Coveralls
coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 9693574779

Details


Totals Coverage Status
Change from base Build 9594397741: 0.08%
Covered Lines: 1640
Relevant Lines: 1656

💛 - Coveralls
stephane-caron commented 1 week ago

However, we currently need to install the robot_descriptions package directly from the dedicated repository. @stephane-caron, could you kindly release a new version of robot_descriptions that includes the G1 robot on PyPI before we merge this PR?

Released in robot_descriptions.py v1.11.0 :+1:

coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 9731356959

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pink/tasks/com_task.py 41 42 97.62%
<!-- Total: 167 168 99.4% -->
Totals Coverage Status
Change from base Build 9594397741: 0.04%
Covered Lines: 1678
Relevant Lines: 1695

💛 - Coveralls
coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 9731382645

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pink/tasks/com_task.py 41 42 97.62%
<!-- Total: 166 167 99.4% -->
Totals Coverage Status
Change from base Build 9594397741: 0.04%
Covered Lines: 1678
Relevant Lines: 1695

💛 - Coveralls
coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 9731394100

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pink/tasks/com_task.py 41 42 97.62%
<!-- Total: 167 168 99.4% -->
Totals Coverage Status
Change from base Build 9594397741: 0.04%
Covered Lines: 1678
Relevant Lines: 1695

💛 - Coveralls
coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 9731406532

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pink/tasks/com_task.py 41 42 97.62%
<!-- Total: 167 168 99.4% -->
Totals Coverage Status
Change from base Build 9594397741: 0.04%
Covered Lines: 1678
Relevant Lines: 1695

💛 - Coveralls
coveralls commented 5 days ago

Pull Request Test Coverage Report for Build 9764666540

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pink/tasks/com_task.py 41 42 97.62%
<!-- Total: 167 168 99.4% -->
Totals Coverage Status
Change from base Build 9594397741: 0.04%
Covered Lines: 1678
Relevant Lines: 1695

💛 - Coveralls
coveralls commented 5 days ago

Pull Request Test Coverage Report for Build 9764672339

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pink/tasks/com_task.py 41 42 97.62%
<!-- Total: 167 168 99.4% -->
Totals Coverage Status
Change from base Build 9594397741: 0.04%
Covered Lines: 1678
Relevant Lines: 1695

💛 - Coveralls
coveralls commented 5 days ago

Pull Request Test Coverage Report for Build 9764670578

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pink/tasks/com_task.py 41 42 97.62%
<!-- Total: 167 168 99.4% -->
Totals Coverage Status
Change from base Build 9594397741: 0.04%
Covered Lines: 1678
Relevant Lines: 1695

💛 - Coveralls
simeon-ned commented 5 days ago

Dear @stephane-caron I have corrected some minor typos and perform tests and formatting, I think now we are ready to merge :)

coveralls commented 5 days ago

Pull Request Test Coverage Report for Build 9765021395

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
pink/tasks/com_task.py 41 42 97.62%
<!-- Total: 168 169 99.41% -->
Totals Coverage Status
Change from base Build 9594397741: 0.04%
Covered Lines: 1679
Relevant Lines: 1696

💛 - Coveralls
stephane-caron commented 4 days ago

Thank you @simeon-ned for this contribution! :+1: