Why I get Error using rosgenmsg?
이전 댓글 표시
Hello,
I am using Windows10 and MATLAB R2023b.
I got error by using the ROS Toolbox an generating some ROS Messages.
This is my error message:
rosgenmsg("D:\MATLAB2023\toolbox\ros\bin\win64\ros1")
Identifying message files in folder 'D:/MATLAB2023/toolbox/ros/bin/win64/ros1'..Done.
Validating message files in folder 'D:/MATLAB2023/toolbox/ros/bin/win64/ros1'..Done.
[1/1] Generating MATLAB interfaces for custom message packages... Done.
Running catkin build in folder 'D:/MATLAB2023/toolbox/ros/bin/win64/ros1/matlab_msg_gen_ros1/win64'.
Build in progress. This may take several minutes...错误使用 ros.internal.ROSProjectBuilder/buildPackage
Error building package: build_log.
出错 rosgenmsg (第 593 行)
buildPackage(builder, [], 'install', catkinMakeArgs); %other messages might need to be present in the same directory
This is my build_log:
********************************************************************** ** Visual Studio 2022 Developer Command Prompt v17.11.3 ** Copyright (c) 2022 Microsoft Corporation ********************************************************************** [vcvarsall.bat] Environment initialized for: 'x86_x64' -- The C compiler identification is MSVC 19.41.34120.0 -- The CXX compiler identification is MSVC 19.41.34120.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: D:/VScode/2022/community/VC/Tools/MSVC/14.41.34120/bin/Hostx86/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: D:/VScode/2022/community/VC/Tools/MSVC/14.41.34120/bin/Hostx86/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CATKIN_DEVEL_PREFIX: D:/MATLAB2023/toolbox/ros/bin/win64/ros1/matlab_msg_gen_ros1/win64/devel -- Using CMAKE_PREFIX_PATH: D:\MATLAB2023\sys\ros1\win64\ros1;D:/MATLAB2023/toolbox/ros/mlroscpp/custom_messages -- This workspace overlays: D:/MATLAB2023/sys/ros1/win64/ros1;D:/MATLAB2023/toolbox/ros/mlroscpp/custom_messages -- Found PythonInterp: C:/Users/finee/AppData/Roaming/MathWorks/MATLAB/R2023b/ros1/win64/venv/Scripts/python.exe (found suitable version "3.9.7", minimum required is "3") -- Using PYTHON_EXECUTABLE: C:/Users/finee/AppData/Roaming/MathWorks/MATLAB/R2023b/ros1/win64/venv/Scripts/python.exe -- Using default Python package layout -- Found PY_em: C:\Users\finee\AppData\Roaming\MATHWO~1\MATLAB\R2023b\ros1\win64\venv\lib\site-packages\em.py -- Using empy: C:/Users/finee/AppData/Roaming/MATHWO~1/MATLAB/R2023b/ros1/win64/venv/lib/site-packages/em.py -- Using CATKIN_ENABLE_TESTING: off -- catkin 0.8.10 -- BUILD_SHARED_LIBS is on 系统找不到指定的批处理标签 - GenerateTempFilename Traceback (most recent call last): File "D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64\build\catkin_generated\generate_cached_setup.py", line 22, in <module> code = generate_environment_script('D:/MATLAB2023/toolbox/ros/bin/win64/ros1/matlab_msg_gen_ros1/win64/devel/env.bat') File "D:\MATLAB2023\sys\ros1\win64\ros1\lib\site-packages\catkin\environment_cache.py", line 63, in generate_environment_script env_after = ast.literal_eval(output.decode('utf8')) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 3773: invalid start byte CMake Error at D:/MATLAB2023/sys/ros1/win64/ros1/share/catkin/cmake/safe_execute_process.cmake:11 (message): execute_process(C:/Users/finee/AppData/Roaming/MathWorks/MATLAB/R2023b/ros1/win64/venv/Scripts/python.exe "D:/MATLAB2023/toolbox/ros/bin/win64/ros1/matlab_msg_gen_ros1/win64/build/catkin_generated/generate_cached_setup.py") returned error code 1 Call Stack (most recent call first): D:/MATLAB2023/sys/ros1/win64/ros1/share/catkin/cmake/all.cmake:208 (safe_execute_process) D:/MATLAB2023/sys/ros1/win64/ros1/share/catkin/cmake/catkinConfig.cmake:20 (include) CMakeLists.txt:58 (find_package) -- Configuring incomplete, errors occurred! See also "D:/MATLAB2023/toolbox/ros/bin/win64/ros1/matlab_msg_gen_ros1/win64/build/CMakeFiles/CMakeOutput.log". Base path: D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64 Source space: D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64\src Build space: D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64\build Devel space: D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64\devel Install space: D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64\install Copying file from "D:\MATLAB2023\sys\ros1\win64\ros1\share\catkin\cmake\toplevel.cmake" to "D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64\src\CMakeLists.txt" #### #### Running command: "cmake D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64\src -DALIAS_ROS1_CLASS_LOADER=1 -DBoost_NAMESPACE=mwboost -DCATKIN_ENABLE_TESTING=off -DCMAKE_PREFIX_PATH=D:\MATLAB2023\sys\ros1\win64\ros1;D:/MATLAB2023/toolbox/ros/mlroscpp/custom_messages -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE=/MD /Od /Ob2 /DNDEBUG -DCATKIN_DEVEL_PREFIX=D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64\devel -DCMAKE_INSTALL_PREFIX=D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64\install -G Ninja" in "D:\MATLAB2023\toolbox\ros\bin\win64\ros1\matlab_msg_gen_ros1\win64\build" #### Invoking "cmake" failed
I saw a response on another post with the same question that there is any environment variable containing non-ASCII characters. However, I don't have any no ASCII chatacer on my computer. So,is there any other problem that caused this error to occur?
Thanks!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Publishers and Subscribers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!