The code generated using ROS custom message in MATLAB R2021a is wrong

1 visualización (últimos 30 días)
longxia da
longxia da el 20 de Jul. de 2021
Comentada: longxia da el 12 de Ag. de 2021
When the ROS custom message name contains uppercase letters and underscores, the generated code is wrong. In the file slros_busmsg_conversion.cpp, for example, the custom message member is named float32 DataY. In the function converFromBus generated by MATLAB R2021a, msgPtr-> DataY becomes msgPtr->data_y, which is the correct msgPtr->DataY in MATLAB R2020b.

Respuestas (1)

Abhijeet Gadkari
Abhijeet Gadkari el 20 de Jul. de 2021
Hello Longxia,
This is a known problem that was fixed in R2021a update1.
Please refer to this bug-report for more details.
Please install R2021a update 1 and generate code again.
Let us know if this resolved the issue.
-Abhijeet

Categorías

Más información sobre Publishers and Subscribers en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by