Check the generated C code of analytic IK against MISRA C
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- embedded-iot, robotics
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- C++
- Stelle
- 3.5k
- Fork
- 639
- Merge medio
- 1g 13h
- PR unite (30g)
- 98
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di petercorke/robotics-toolbox-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
petercorke/robotics-toolbox-python#709 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
petercorke/robotics-toolbox-python#825 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
feat(ets): numerical inverse kinematics for planar ETS2Forse già presa @qwist1233-cpu l’ha presa 2 giorni fa. Apertaenhancement help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
petercorke/robotics-toolbox-python#824 ·
I maintainer di solito rispondono entro 1 giorno
-
Rigorous testing of operational-space methodsForse già presa @kVinsom l’ha presa 1 giorno fa. Apertatech-debt Tests needed
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
petercorke/robotics-toolbox-python#804 ·
I maintainer di solito rispondono entro 1 giorno
-
tech-debt
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
petercorke/robotics-toolbox-python#803 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di petercorke/robotics-toolbox-python
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
rocketride-org/rocketride-server#2705 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ROCm/rocm-systems#13754 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
neutralinojs/neutralinojs#1861 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
raspberrypi/libpisp#80 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
nanoporetech/pod5-file-format#198 ·