Issue to configure custom messages

2 ビュー (過去 30 日間)
Bastien
Bastien 2022 年 6 月 12 日
回答済み: Jagadeesh Konakalla 2022 年 6 月 17 日
Hello, I have an issue configuring custom message for ROS. There is one specific message that I need : "custom_msgs/Uwb" to do some analysis on a rosbag.
I successfully run the rosgenmsg but when I try add the new classes of message to Matlab I can not find the message in the rosmsg list.
Some details, below :
  • I created a folder /Matlab/custom_msgs/packages/ in which I paste my ROS custom_msgs package (which contains the folder msg with the custom message Uwb, a src folder, a CMakeLists.txt file and package.xml file
  • I execute rosgenmsg('/home/iod/Matlab/custom_msgs/packages/custom_msgs')
  • the building process is going quite well, but a strange mention at the end of the log file " build stopped: interrupted by user." whereas I did not interrupt anything (stdout_stderr.log enclosed)
  • I looked to the related m file, and I find it in the following folder "/home/iod/Matlab/custom_msgs/packages/matlab_msg_gen_ros1/glnxa64/src/custom_msgs/m/+ros/+msggen". This is a strange path.
  • Then I can not add this path "/home/iod/Matlab/custom_msgs/packages/matlab_msg_gen_ros1/glnxa64/src/custom_msgs/m/+ros/+msggen" to the Matlab pat, I tried to use addpath(genpath('/home/iod/Matlab/custom_msgs/packages/matlab_msg_gen_ros1/glnxa64/src/custom_msgs/m'))
  • Finally as I try to find the custom_msgs/Uwb, it is not present.
Someone could help me on this issue ?
Thank you in advance.
  6 件のコメント
Jagadeesh Konakalla
Jagadeesh Konakalla 2022 年 6 月 15 日
Hi Bastien,
On my end, i am able to build the custom messages that you shared. Looks like no issue with message packages.
When i look at the log file, i see that /opt/ros/noetic/bin is on the PATH and LD_LIBRARY_PATH.
ROS Toolbox ships the Noetic with Installation. Multiple versions of ROS may cause this error.
Can you remove noetic installation paths from PATH and LD_LIBRARY_PATH and try launch MATLAB and do rosgenmsg ?
Let me know if that works or not.
Jagadeesh K
Bastien
Bastien 2022 年 6 月 16 日
It solved the issue !
Thank you for your help.
Bastien

サインインしてコメントする。

採用された回答

Jagadeesh Konakalla
Jagadeesh Konakalla 2022 年 6 月 17 日
ROS Toolbox ships the Noetic with Installation. Multiple versions of ROS may cause this error.
So remving other ROS installation paths from PATH and LD_LIBRARY_PATH resolved the issue.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCustom Message Support についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by