Error of gazebogenmsg to create the customized gazebo plugin

조회 수: 1 (최근 30일)
Yunsik Jung
Yunsik Jung 2021년 5월 24일
댓글: Yunsik Jung 2021년 6월 18일
Hi, all.
I am trying yo generate the customized gazebo message plugin using the gazebogenmsg commend, as shown below.
%% custom message
folderPath = 'C:\PersonalWorkspace\Yunsik\2nd_teleoperation\workspace\custommsg';
gazebogenmsg(folderPath,"GazeboMessageList",["gazebo.msgs.Joint","gazebo.msgs.Link",...
"gazebo.msgs.Pose", "gazebo.msgs.Sensor", ...
"gazebo.msgs.Contact", "gazebo.msgs.Contacts",...
"gazebo.msgs.ContactSensor", "gazebo.msgs.Collision", "gazebo.msgs.Wrench", ...
"gazebo.msgs.WrenchStamped", "gazebo.msgs.ForceTorque"]);
But, I got this error message,
>> custommsg
Validating ...
Error using
robotics.gazebo.internal.customMessageSupport.compilerValidation
(line 53)
Installed compiler is either invalid or not
supported. Install "Microsoft Visual C++: version >
14.0 ".
Error in gazebogenmsg (line 151)
robotics.gazebo.internal.customMessageSupport.compilerValidation();
Error in custommsg (line 4)
gazebogenmsg(folderPath,"GazeboMessageList",["gazebo.msgs.Joint","gazebo.msgs.Link",...
Indeed, I have installed visual studio 2019 and visual studio build tools,
Do you have any ideas?
Thanks!
Yun

채택된 답변

Gaurav Bhosale
Gaurav Bhosale 2021년 6월 10일
Hi Yunsik,
You need to select Microsoft Visual C++ 2019 as follows,
>> mex -setup cpp
MEX configured to use 'Microsoft Visual C++ 2017' for C++ language compilation.
To choose a different C++ compiler, select one from the following:
Intel Parallel Studio XE 2018 for C++ with Microsoft Visual Studio 2019 mex -setup:F:\....\bin\win64\mexopts\intel_cpp_18_vs2019.xml C++
Intel Parallel Studio XE 2019 for C++ with Microsoft Visual Studio 2019 mex -setup:F:....\bin\win64\mexopts\intel_cpp_19_vs2019.xml C++
Intel Parallel Studio XE 2020 for C++ with Microsoft Visual Studio 2019 mex -setup:F:\....\bin\win64\mexopts\intel_cpp_20_vs2019.xml C++
MinGW64 Compiler (C++) mex -setup:F:\....\bin\win64\mexopts\mingw64_g++.xml C++
MinGW64 Compiler with Windows 10 SDK or later (C++) mex -setup:F:\....\bin\win64\mexopts\mingw64_g++_sdk10+.xml C++
Microsoft Visual C++ 2019 mex -setup:F:\jobarchive\BR2021bd\2021_06_02_h16m09s57_job1682114_pass\matlab\bin\win64\mexopts\msvcpp2019.xml C++
Renamed options file 'C:\Users\gbhosale\AppData\Roaming\MathWorks\MATLAB\R2021b\mex_C++_win64.xml' to 'C:\Users\gbhosale\AppData\Roaming\MathWorks\MATLAB\R2021b\mex_C++_win64_backup.xml'.
MEX configured to use 'Microsoft Visual C++ 2019' for C++ language compilation.
Select the Microsoft Visual C++ 2019 mex by clicking on highlighted line above.
Then, execute gazebogenmsg(), which shows selected compiler details.
>> gazebogenmsg(pwd,"GazeboMessageList","gazebo.msgs.Any")
Validating ...
Selected compiler details: "Microsoft Visual C++ 2019 16.0"
Building shared library ...
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29112 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
Recheck installed Microsoft Visual C++ 2019.
Thanks.
With Regards,
Gaurav Bhosale
  댓글 수: 1
Yunsik Jung
Yunsik Jung 2021년 6월 18일
Hi, Gaurav.
Thank you for the anwer! I solved this issue with it.
Thanks,
Yun

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Troubleshooting in MATLAB Compiler SDK에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by