Having trouble reading ROS 2 bag with custom messages
24 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I used ros2genmsg to generate the custom message types, but then I run ros2bagreader, it fails. It says that it doesn't recognize one of the message types.
When I run "ros2 msg list" in matlab, the custom message does appear...
Would appreciate any help. Thanks in advance!
0 comentarios
Respuestas (1)
Sakshay
el 13 de Mzo. de 2023
Hello Ari,
As per my understanding, after running "ros2genmsg" function, you are not able to view the custom messages that are generated using the "ros2 msg list" command.
ROS 2 custom messages are specified in ROS 2 package folders that contain a folder named "msg". The "msg" folder should contain all the custom message type definitions. Hence, you must have a ROS 2 package that contains the required "msg" file.
After ensuring that your custom message package is correct, you specify the path to the parent folder and call "ros2genmsg" with the specified path. The commands for that would look as below:
folderPath = fullfile(pwd,"<ROS2 Package Name>");
ros2genmsg(folderPath);
After running this command, make sure that the output indicates a successful build. After a successful build, you may run the "ros2 msg list" command to make sure the custom message is generated correctly.
For more information on generating custom messages from ROS2 definitions, you may refer to the following documentation:
0 comentarios
Ver también
Categorías
Más información sobre Specialized Messages en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!