Compatibility ros2node with Coder Generation

4 visualizaciones (últimos 30 días)
Michael
Michael el 17 de Mayo de 2022
Respondida: Michael el 20 de Mayo de 2022
According to the ros2node documentation, the function supports code generation with a one node per function limitation. When I try to generate code with a ros2node.m call I get an error
'The 'ros2node' class does not support code generation.'
See the image attached. I have reduced the function to the following.
function [] = detectsteaming()
node_1 = ros2node("node_1");
end
Does anyone know what might be going on?
I have checked and my Matlab version is R2021a, which I think should support this but I could be wrong. Where can one find out when particular functions gained Code Generation support? Maybe the code generation support was released in an R2022 release?
Thanks.
  1 comentario
Michael
Michael el 17 de Mayo de 2022
On checking my documentation for R2021a, I don't see Code Generation support for this function. I am going to install R2022a right now and see if this fixes the problem.

Iniciar sesión para comentar.

Respuesta aceptada

Josh Chen
Josh Chen el 17 de Mayo de 2022
Hello Michael,
You are right. Code generation support for 'ros2node' starts at R2021b.
You should be able to use this feature after updating to R2021b or R2022a.
Besides specific documentation page for functions, another place to look at new features is the release page: https://www.mathworks.com/help/ros/release-notes.html
The release page is a good place to check when certain feature starts support.
Hope this helps,
Josh
  6 comentarios
Michael
Michael el 19 de Mayo de 2022
@Josh Chen Thanks for all the help on this. I was able to generate & run code using the commandline interface.
Josh Chen
Josh Chen el 19 de Mayo de 2022
Awesome! Glad to see it works! Thanks for the update @Michael

Iniciar sesión para comentar.

Más respuestas (1)

Michael
Michael el 20 de Mayo de 2022
FYI for anyone in the future: A quick way to see how to use command line code generation if you are used to using the Coder App is to select 'Convert to script...' option from within the coder app. This generate a Matlab script with the correct configuration structure and arguments you defined within the app. This is a super useful tool for learning how to use the commande line code generation.

Categorías

Más información sobre Specialized Messages en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by