Check the generated C code of analytic IK against MISRA C
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- embedded-iot, robotics
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- C++
- Estrellas
- 3.6k
- Forks
- 645
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 144
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de petercorke/robotics-toolbox-python
-
plt.pause(0) waits for ever: PoseGraph.plot_scan(pause=0) and Vehicle animation may hangPosiblemente ocupada @huxiaoyi-ovo la tomó hace 2 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
petercorke/robotics-toolbox-python#876 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
petercorke/robotics-toolbox-python#709 ·
Los mantenedores suelen responder en 1 día
-
tech-debt
Dificultad 4/5 1-2 días Aptitud para principiantes 55/100
petercorke/robotics-toolbox-python#898 ·
Los mantenedores suelen responder en 1 día
-
LatticePlanner: integer headings, and motion primitives with finer turn steps (design first)Posiblemente ocupada @kVinsom la tomó hace 1 día. Abiertoenhancement help wanted
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
petercorke/robotics-toolbox-python#895 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
tech-debt
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
petercorke/robotics-toolbox-python#894 ·
Los mantenedores suelen responder en 1 día
Todos los issues de petercorke/robotics-toolbox-python
Issues similares
-
Remove source files from packaging for deb, zip, etcPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
OpenSpace/OpenSpace#4353 · 1 comentario ·
Los mantenedores suelen responder en 5 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
justcallmekoko/ESP32Marauder#1656 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Decompiler: convertCharRef() in xml.y overflows its int4 accumulator on long character referencesPosiblemente ocupada @kaayzouee la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
NationalSecurityAgency/ghidra#10009 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
mutationpp/Mutationpp#337 ·