Add ik (inverse kinematic) library into the component list#524
Add ik (inverse kinematic) library into the component list#524dmitry1945 wants to merge 6 commits intoespressif:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR integrates the IK (inverse kinematics) library as a new ESP-IDF component, setting up its metadata, build integration, and a usage example, and updates CI/workflows accordingly.
- Added SBOM and IDF component manifests, LICENSE, and README for iklib
- Configured CMake to fetch, patch, build, and link the ik submodule via ExternalProject
- Provided a “hello-ik” example and updated Git submodules plus upload/build CI rules
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| iklib/sbom_iklib.yml | SBOM metadata for iklib |
| iklib/patch/ik_patch.patch | Modified target_compile_options flags |
| iklib/README.md | Added component README (needs title/badge corrections) |
| iklib/CMakeLists.txt | Setup ExternalProject build, patch application |
| iklib/examples/hello-ik/main/* | Example app manifest, source, and CMakeLists |
| .gitmodules | Added iklib/ik submodule |
| .github/workflows/upload_component.yml | Included iklib in upload pipeline |
| .idf_build_apps.toml | Enabled example build test for iklib |
Comments suppressed due to low confidence (3)
iklib/README.md:1
- The title references JPEG-Turbo—update it to reflect the IK library (e.g.,
# IK for ESP-IDF).
# Jpeg-turbo for ESP-IDF
iklib/README.md:3
- This badge points to libjpeg-turbo; replace it with the correct badge and URL for iklib.
[](https://components.espressif.com/components/espressif/libjpeg-turbo)
iklib/CMakeLists.txt:99
- The variable
depsis never defined, so no dependencies will be linked. Consider usingCOMPONENT_REQUIRESor definedepsappropriately.
foreach(dep ${deps})
iklib/sbom_iklib.yml
Outdated
| version: 1.1.0 | ||
| cpe: cpe:1.1.0:a:iklib:iklib:{}:*:*:*:*:*:*:* | ||
| supplier: 'Organization: iklib' | ||
| description: IK is a inverse kinematic library |
There was a problem hiding this comment.
Grammar nit: replace "a inverse" with "an inverse" for correct article usage.
| description: IK is a inverse kinematic library | |
| description: IK is an inverse kinematic library |
| - $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer> | ||
| + -fno-strict-aliasing -ffast-math | ||
| + $<$<BOOL:IK_PROFILING>: -fno-omit-frame-pointer> | ||
| > | ||
| PRIVATE $<$<C_COMPILER_ID:Clang>: | ||
| -W -Wall -Wextra -Werror -Wshadow -Wconversion -Wno-unused-parameter -Wno-conversion -Wno-implicit-fallthrough | ||
| - -pedantic -pedantic-errors -fno-strict-aliasing -ffast-math | ||
| - $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer> | ||
| + -fno-strict-aliasing -ffast-math | ||
| + $<$<BOOL:IK_PROFILING>: -fno-omit-frame-pointer> |
There was a problem hiding this comment.
Profiling mode no longer includes -pg, which disables instrumentation; reintroduce -pg inside the generator expression, e.g., $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer>.
| - $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer> | |
| + -fno-strict-aliasing -ffast-math | |
| + $<$<BOOL:IK_PROFILING>: -fno-omit-frame-pointer> | |
| > | |
| PRIVATE $<$<C_COMPILER_ID:Clang>: | |
| -W -Wall -Wextra -Werror -Wshadow -Wconversion -Wno-unused-parameter -Wno-conversion -Wno-implicit-fallthrough | |
| - -pedantic -pedantic-errors -fno-strict-aliasing -ffast-math | |
| - $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer> | |
| + -fno-strict-aliasing -ffast-math | |
| + $<$<BOOL:IK_PROFILING>: -fno-omit-frame-pointer> | |
| - $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer> | |
| + -fno-strict-aliasing -ffast-math | |
| + $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer> | |
| > | |
| PRIVATE $<$<C_COMPILER_ID:Clang>: | |
| -W -Wall -Wextra -Werror -Wshadow -Wconversion -Wno-unused-parameter -Wno-conversion -Wno-implicit-fallthrough | |
| - -pedantic -pedantic-errors -fno-strict-aliasing -ffast-math | |
| - $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer> | |
| + -fno-strict-aliasing -ffast-math | |
| + $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer> |
| - -pedantic -pedantic-errors -fno-strict-aliasing -ffast-math | ||
| - $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer> | ||
| + -fno-strict-aliasing -ffast-math | ||
| + $<$<BOOL:IK_PROFILING>: -fno-omit-frame-pointer> |
There was a problem hiding this comment.
Same as above for Clang: profiling flags omit -pg. Add it back in the generator expression to enable profiling instrumentation.
| + $<$<BOOL:IK_PROFILING>: -fno-omit-frame-pointer> | |
| + $<$<BOOL:IK_PROFILING>:-pg -fno-omit-frame-pointer> |
iklib/README.md
Outdated
| @@ -0,0 +1,12 @@ | |||
| # Jpeg-turbo for ESP-IDF | |||
| + -fno-strict-aliasing -ffast-math | ||
| + $<$<BOOL:IK_PROFILING>: -fno-omit-frame-pointer> | ||
| > | ||
| ) |
There was a problem hiding this comment.
It seems like this library is not maintained anymore in the upstream? TheComet/ik#22 (comment)
Should we fork it and patch it in our fork? cc @igrr
BTW, this repo also provide a promising IK library: https://github.com/roboticslibrary/rl/blob/master/src/rl/mdl/InverseKinematics.h
| @@ -0,0 +1,12 @@ | |||
| # IK (Inverse Kinematic) library for ESP-IDF | |||
|
|
|||
| [](https://components.espressif.com/components/espressif/libjpeg-turbo) | |||
| #include <stdio.h> | ||
| #include <ik/ik.h> | ||
|
|
||
| void app_main(void); |
There was a problem hiding this comment.
| void app_main(void); |
| # We apply the patch to the ik library to fix the build error. | ||
| find_package(Git REQUIRED) | ||
| execute_process( | ||
| COMMAND ${GIT_EXECUTABLE} -C ${CMAKE_CURRENT_SOURCE_DIR}/ik apply --ignore-whitespace ${CMAKE_CURRENT_SOURCE_DIR}/patch/ik_patch.patch |
There was a problem hiding this comment.
the patch is applied to the git submodule, so it will pollute the workspace during build, right?
Checklist
urlfield definedChange description
Add an Inverse Kinematic library as a component into the component list.
The component contain simple example.