btw, my purpose is playing rosbag and using subscriber in matlab to get GPS coordinates from ros, and then sent them into unreal engine for digital twins. The coordinates is sent by custom message in ros, so it is difficult for matlab to read, I encounter the problem above.
Matlab 2020b rosgenmsg() "error in using ros.internal.PackageInfo/checkForFiles"
4 次查看(过去 30 天)
显示 更早的评论
My ROS environment is in Ubuntu18.04 in VMware, and my Matlab version is 2020b.
I have successfully connected ROS with Matlab, and installed CMake in windows.
I have packed the entire work space in ubuntu, and move it into windows, the location is
D:\MATLAB\toolbox\ros\mlroscpp\custom_messages
Here is my code:
rosgenmsg('D:\MATLAB\toolbox\ros\mlroscpp\custom_messages\catkin_ws\src')
Identifying message files in folder 'D:/MATLAB/toolbox/ros/mlroscpp/custom_messages/catkin_ws/src'..Done.
Validating message files in folder 'D:/MATLAB/toolbox/ros/mlroscpp/custom_messages/catkin_ws/src'..Done.
[0/5] Generating MATLAB interfaces for custom message packages... 0%错误使用 ros.internal.PackageInfo/checkForFiles (第 93 行)
File 'D:\MATLAB\toolbox\ros\mlroscpp\custom_messages\catkin_ws\src\matlab_msg_gen_ros1\win64\src\esr_radar\src\esr_radar_Object_common.cpp' does not exist.
出错 ros.internal.PackageInfo/set.LibSourceFiles (第 105 行)
h.LibSourceFiles = checkForFiles(h, value);
出错 rosgenmsg (第 259 行)
pkgInfos{iPkg}.LibSourceFiles = [pkgInfos{iPkg}.LibSourceFiles {fullfile(srcGenDir,genFiles{i})}];
I checked the path (D:\MATLAB\toolbox\ros\mlroscpp\custom_messages\catkin_ws\src\matlab_msg_gen_ros1\win64\src\esr_radar\src\), found that there is no cpp file named xxx_common.cpp.
I also tried to delete some package, but it seems that matlab always need to find this xxx_common.cpp
I don't know how to solve it, please offer me some suggestion.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specialized Messages 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!