ROS build package error

14 次查看(过去 30 天)
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
Jagadeesh Konakalla 2025-3-10,4:06
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
zn 2025-3-10,14:48
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

请先登录,再进行评论。

采纳的回答

Jagadeesh Konakalla
移动:Remo Pillat 2023-3-2
Hi Bharath,
We create a python virtual environement in MATLAB preferences directory (prefdir). In your case, the preference directory has sapces. Please note that your username has spaces.
C:\Users\Bharath B Mahadikar\AppData\\Roaming\MathWorks\MATLAB\R2022b
From the CMAKE log, i see that error says that
B was unexpected this time.
The issue looks like some python script is not able to handle spaces in the Path where the python virtual environment is created. This issue looks specific to Windows platform only.
One workaround is to change MATLAB preference directory for your 2021b MATLAB.
You can give a try and let me know if that works for you.
Thanks,
Jagadeesh K.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Wireless Communications 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by