ROS build package error
이전 댓글 표시
Hello,
I am facing the error with the buildPackage in rosgenmsg command.
The error I am getting is as follows:
<
Build in progress. This may take several minutes...Error using ros.internal.ROSProjectBuilder/buildPackage (line 552)
Error building package: build log.
Error in rosgenmsg (line 483)
buildPackage(builder, [], 'install', catkinMakeArgs); %other messages might need to be present in the same directory
>
When I checked the build log, it shows:
<
-- Configuring incomplete, errors occurred! See also "E:/catkin_ws/src/matlab_msg_gen_ros1/win64/build/CMakeFiles/CMakeOutput.log". Base path: E:\catkin_ws\src\matlab_msg_gen_ros1\win64 Source space: E:\catkin_ws\src\matlab_msg_gen_ros1\win64\src Build space: E:\catkin_ws\src\matlab_msg_gen_ros1\win64\build Devel space: E:\catkin_ws\src\matlab_msg_gen_ros1\win64\devel Install space: E:\catkin_ws\src\matlab_msg_gen_ros1\win64\install #### #### Running command: "cmake E:\catkin_ws\src\matlab_msg_gen_ros1\win64\src -DBoost_NAMESPACE=mwboost -DCATKIN_ENABLE_TESTING=off -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_C_COMPILER=cl.exe -DCMAKE_LINKER=link.exe -DMSVC_TOOLSET_VERSION=141 -DCMAKE_PREFIX_PATH=C:\Program Files\MATLAB\R2021b\sys\ros1\win64\ros1;C:/Program Files/MATLAB/R2021b/toolbox/ros/mlroscpp/custom_messages -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE=/MD /Od /Ob2 /DNDEBUG -DCATKIN_DEVEL_PREFIX=E:\catkin_ws\src\matlab_msg_gen_ros1\win64\devel -DCMAKE_INSTALL_PREFIX=E: \catkin_ws\src\matlab_msg_gen_ros1\win64\install -G Ninja" in "E:\catkin_ws\src\matlab_msg_gen_ros1\win64\build" #### Invoking "cmake" failed
>
Could anyone support? I am not sure what's the issue in this case.
댓글 수: 19
Jagadeesh Konakalla
2022년 5월 31일
Hi Bharath,
Please attach the entire log file. Looks like some configuration issue.
Which version of MATLAB that you are using ?
Please run the following command in the MATLAB command window and share the generated log file with us.
ros.internal.generateSupportFile
With regards,
Jagadeesh K.
Bharath Mahadikar
2022년 5월 31일
Jagadeesh Konakalla
2022년 5월 31일
Thanks for sharing the required log files.
From the log, i can say that CMAKE is confused with the Python in the folllowing path. The following path has spaces in the path because of which CMAKE is throwing error which is not understandable.
C:\Users\Bharath B Mahadikar\AppData\Local\Microsoft\WindowsApps\python.exe
May i know from where you installed the Python 2.7 on your windows machine? Looks like you have two versions of Python.
Path 1 : C:\Python27
Path 2: C:\Users\Bharath B Mahadikar\AppData\Local\Microsoft\WindowsApps\python.exe
If the path 1 is correct python, can you add C:\Python27 to PATH environment variable of Windows. Please make sure that Path 1 is higher on search path than the Path 2.
After the above change, please restart the MATLAB and let me know if the rosgenmsg works or not.
Thanks,
Jagadeesh K
Bharath Mahadikar
2022년 5월 31일
Mridul Agrawal
2022년 5월 31일
편집: Mridul Agrawal
2022년 5월 31일
Hi, I was also facing the same error while i was creating ROS custom messages :
""Build in progress. This may take several minutes...Error using ros.internal.ROSProjectBuilder/buildPackage (line 552)
Error building package: build log.
Error in rosgenmsg (line 483)
buildPackage(builder, [], 'install', catkinMakeArgs); %other messages might need to be present in the same directory""
I did try to take help from below link :
which in a way says path length might be the issue.
Workaround tried which worked is :
- ROS message folder i directly put in my system D drive as ......."D:\Your_Folder_name
- Now add this folder in MATLAB path
- Try to run command rosgenmsg("D:\Your_Folder_name") ......(which i suppose you want to do actually)
Disclamer Note : I did not see your log files, probably there might be some other issues, but command window errors was similar, the method i mentioned might not be working for you in that case
I able to solve same issue now by this and sucessfully able to build it and created ROS messages. Let me know if this helped you as well.
Thanks
Mridul Agrawal
Bharath Mahadikar
2022년 5월 31일
Jagadeesh Konakalla
2022년 5월 31일
Hi Bharath,
Can you please run the following command before you do as above suggested. Let me know the output of the following on your MATLAB.
ros.internal.createOrGetLocalPython(true)
Thanks,
Jagadeesh K
Bharath Mahadikar
2022년 5월 31일
Jagadeesh Konakalla
2022년 5월 31일
Thanks for the update. On my end i was getting error when spaces are present in prefdir. Now i understood that you fixed the issues following the link. Let me know how it works when you use the prefdir without space.
Bharath Mahadikar
2022년 5월 31일
Jagadeesh Konakalla
2022년 5월 31일
How did you launch the MATLAB ?
Please share the error log.
Bharath Mahadikar
2022년 5월 31일
Jagadeesh Konakalla
2022년 5월 31일
Hi Bharath,
From the new log, i still see that, python environement is created in the same folder.
You may need to delete the matlab_msg_gen_ros1 folder before you do rosggenmsg in the MATLAB.
Please type prefdir command in the MATLAB and make sure that it returns the E:\4AT100.
Then do run ros.internal.createOrGetLocalPython(true).
If the above command is succeful, then run rosgenmsg.
Thanks,
Jagadeesh K.
Bharath Mahadikar
2022년 5월 31일
Mario Cervantes Hernandez
2023년 11월 3일
I have the same message error but I do not have an username "with spaces" I am wondered if you could help me on this issue?
Hello, I need to run the command "rosgenmsg". I am using Windows 10, Visual Studio 2017, Python 2.7.18 and Cmake 3.15.5 as Matlab recommends for each version.
but I have the following error:
[1/1] Generating MATLAB interfaces for custom message packages... Done.
Running catkin build in folder 'C:/Users/username/Documents/Hexa2023/matlab_msg_gen_ros1/win64'.
Build in progress. This may take several minutes...Error using ros.internal.ROSProjectBuilder/buildPackage (line 552)
Error building package: build log.
Error in rosgenmsg (line 483)
buildPackage(builder, [], 'install', catkinMakeArgs); %other messages might need to be present in the same directory
Jagadeesh Konakalla
2023년 11월 3일
Can you please send me the error log ? Which version of MATLAB that yoiu are using ?
zn
2025년 3월 9일
I am having the same issue. I have checked spaces in the directory of prefdir. And ros.internal.createOrGetLocalPython(true) is also done. But it appears to have the same error:
buildPackage(builder, [], 'install', catkinMakeArgs); %other messages might need to be present in the same directory.
Jagadeesh Konakalla
2025년 3월 10일
Hi Zn,
Your error looks different.
Can you try to build custom messages in the new folder and give a try ? It could be issue with previously generated build folder.
Aslo, can you ensure that you use the latest version of 2023b MATLAB release ?
Thanks,
Jagadeesh K
zn
2025년 3월 10일
The problem is solved! Cause for that is unrecognized characters in .msg.
Using rosgenmsg with a .msg contained unusual characters (like Chinese) is forbidden, even in comments (after %).
Thanks,
zn
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Network Connection and Exploration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!