Check the generated C code of analytic IK against MISRA C
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- embedded-iot, robotics
调研方向
On the feat/symbolic-ik branch, read src/roboticstoolbox/robot/symbolic_ik.py and symbolic_ik_rr.py; use docs/notebooks/ik-symbolic.ipynb to generate the Puma and Jaco C files. Run a MISRA C checker, record violations by rule, and identify inexpensive generator fixes. Done when cheap fixes are made and remaining deviations are documented.
由索引模型根据 Issue 内容生成。
描述
Analytic inverse kinematics can write its solution as C code that needs no library: robot.analytic_ik().generate("c", "my_ik"). This is on the branch feat/symbolic-ik and is not yet merged. We would like to know how close that C code is to MISRA C, since it is meant for embedded use, and to fix the generator where that is cheap.
What we know. I checked the generated C for the Puma 560, Stanford, UR5 and Jaco:
- no
malloc,calloc,reallocorfree - no input or output, and no
goto,setjmporlongjmp - no library other than
math.h, andstring.hfor the general 6R code - fixed-size working arrays, and the caller provides the array for the solutions
- no recursion and no variable-length arrays
- no warnings with
cc -std=c99 -pedantic -Wall -Wextra -Wvla
What we don't know. The code has not been checked against MISRA C:2012 or any other coding standard, so we say only that it avoids dynamic memory, not that it is compliant. The C++ output returns a std::vector, which allocates, and is out of scope here.
Help wanted:
- run a MISRA checker on the generated Puma and Jaco files (for example cppcheck with its MISRA addon, or a commercial tool)
- list the violations by rule, and say which look cheap to fix in the generator, for example floating-point equality,
NAN, multiple returns, or implicit conversions - fix those, and document the deviations that we keep
The generator is symbolic_ik.py and symbolic_ik_rr.py in src/roboticstoolbox/robot/ on that branch. The notebook docs/notebooks/ik-symbolic.ipynb shows how to generate the code.
🤖 Generated with Claude Code
- 主要语言
- C++
- 星标
- 3.5k
- 派生
- 639
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 113
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
petercorke/robotics-toolbox-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
petercorke/robotics-toolbox-python#709 ·
维护者通常 1 天内回复
-
enhancement help wanted
难度 4/5 3-5 天 新手友好度 52/100
petercorke/robotics-toolbox-python#825 · 2 条评论 ·
维护者通常 1 天内回复
-
feat(ets): numerical inverse kinematics for planar ETS2可能已有人在做 @qwist1233-cpu 于 4 天前认领。 未关闭enhancement help wanted
难度 4/5 3-5 天 新手友好度 68/100
petercorke/robotics-toolbox-python#824 ·
维护者通常 1 天内回复
-
Rigorous testing of operational-space methods可能已有人在做 @kVinsom 于 3 天前认领。 未关闭tech-debt Tests needed
难度 4/5 3-5 天 新手友好度 25/100
petercorke/robotics-toolbox-python#804 ·
维护者通常 1 天内回复
-
tech-debt
难度 5/5 一周以上 新手友好度 10/100
petercorke/robotics-toolbox-python#803 ·
维护者通常 1 天内回复
查看 petercorke/robotics-toolbox-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA-Omniverse/usd-brep#23 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
qbittorrent/qBittorrent#25121 ·
维护者通常 2 天内回复
-
SVT-AV1: Unnecessary size padding可能已有人在做 @pszemus 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
strukturag/libheif#1945 ·
维护者通常 1 天内回复
-
v9.6.0: CMake incorrectly enforces presence of libevdev可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 65/100
mltframework/shotcut#1943 ·
维护者通常 1 天内回复