ros2genmsg Error when updating to R2022b

조회 수: 14 (최근 30일)
Michael
Michael 2022년 10월 26일
답변: Karthik Reddy Vennapureddy 2022년 10월 27일
I was able to generate/use custom ROS2 messages with R2022a, but I just upgraded to 2022b and I am not getting an error when I used ros2genmsg (see below). I have attached a screenshot with 2022a and 2022b running side-by-side showing that my PATH variable includes the same path to CMake and that my python environments are the same. I don't know what the issue could be.
>> ros2genmsg(pwd)
Identifying message files in folder '/Users/mshafer/Desktop/PLAYGROUND/CODE_TOEPLITZ'..Done.
Validating message files in folder '/Users/mshafer/Desktop/PLAYGROUND/CODE_TOEPLITZ'..Done.
[1/1] Generating MATLAB interfaces for custom message packages... Done.
Running colcon build in folder '/Users/mshafer/Desktop/PLAYGROUND/CODE_TOEPLITZ/matlab_msg_gen/maci64'.
Build in progress. This may take several minutes...Error using ros.internal.ROSProjectBuilder/buildPackage
Error building package: build log.
Error in ros2genmsg (line 336)
buildPackage(builder, [], ' --merge-install', colconMakeArgs); %other messages might need to be present in the same directory
The build log I have bolded above contains the following information:
CMake Error: Error: generator : Ninja
Does not match the generator used previously: Unix Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
  댓글 수: 2
Karthik Reddy Vennapureddy
Karthik Reddy Vennapureddy 2022년 10월 26일
편집: Karthik Reddy Vennapureddy 2022년 10월 26일
Hi Michael,
Could you please delete older matlab_msg_gen folder and re-run ros2genmsg on the message package folder. ros2genmsg in R2022b uses Ninja Generator of CMake.
Thanks,
Karthik Reddy
Michael
Michael 2022년 10월 26일
@Karthik Reddy Vennapureddy That worked. I originally deleted a matlab_msg_gen that was in the subdirectory, which didn't work. I needed to delete the one in the parent directory.

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

채택된 답변

Karthik Reddy Vennapureddy
Karthik Reddy Vennapureddy 2022년 10월 27일
Hi Michael,
Could you please delete older matlab_msg_gen folder and re-run ros2genmsg on the message package folder. ros2genmsg in R2022b uses Ninja Generator of CMake.
Thanks,
Karthik Reddy

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Custom Message Support에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by