Error of gazebogenmsg to create the customized gazebo plugin

1 Ansicht (letzte 30 Tage)
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

Akzeptierte Antwort

Gaurav Bhosale
Gaurav Bhosale am 10 Jun. 2021
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 Kommentar
Yunsik Jung
Yunsik Jung am 18 Jun. 2021
Hi, Gaurav.
Thank you for the anwer! I solved this issue with it.
Thanks,
Yun

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Robotics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by