error using ros2genmsg function in matlab 2021b (ubuntu, ros2 foxy)
显示 更早的评论
Hi,
I am trying to use matlab 2021b linux version to build my ros2 message package. I manage to solve the problems with lib and python but still encounter an error when building the message. Below is the output in command window and the build log is attached in the post.
________________________________________________________________
ros2genmsg msg
Identifying message files in folder '/home/igs/Desktop/lx/SIM/msg'..Done.
Validating message files in folder '/home/igs/Desktop/lx/SIM/msg'..Done.
[6/6] Generating MATLAB interfaces for custom message packages... Done.
Running colcon build in folder '/home/igs/Desktop/lx/SIM/msg/matlab_msg_gen/glnxa64'.
Build in progress. This may take several minutes..."/home/igs/R2021b/toolbox/ros/mlros2/+ros/+ros2/+internal/runcolconcmd.sh" "/home/igs/R2021b/sys/ros2/glnxa64/ros2" "/home/igs/.matlab/R2021b/ros2/glnxa64/venv" build --merge-install --cmake-args -G Ninja --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_CXX_FLAGS_RELEASE=-O0 : Segmentation fault
Error using ros.internal.ROSProjectBuilder/buildPackage (line 552)
Error building package: build log.
Error in ros2genmsg (line 276)
buildPackage(builder, [], ' --merge-install', colconMakeArgs); %other messages might need to be present in the same directory
________________________________________________________________
The problem with this error is that there seems no error in the build log but the build process just cannot be completed. I would suspect it has something to do with CMAKE but I cannot prove it. If you have any idea, please feel free to share, thanks in advance.
5 个评论
Jagadeesh Konakalla
2022-9-19
Hi Xing Li,
Can you please delete the matlab_msg_gen folder and try once again ?
Thanks,
Jagadeesh K.
xing li
2022-9-20
Jagadeesh Konakalla
2022-9-20
Hi Xing,
If you have the ROS 2 installation , can you try to build the custom messages outside the MATLAB to figure out whether the issue with MATLAB setup/CMAKE issue or system setup issue ?
We have not seen this issue before. If you have not restarted your machine , Can you give a try once ?
The segmentation fault is usually related to memory. Is your home directory mapped to network drive or local to your machine ?
Thanks,
Jagadeesh K
xing li
2022-9-21
Karthik Reddy Vennapureddy
2022-9-21
Hi Xing,
Could you delete the matlab_msg_gen folder, rerun the ros2genmsg. Please zip the enire "log" folder in matlab_msg_gen/glnxa64 directory and share it with us.
Please also attach the support file generated by the following command:
ros.internal.generateSupportFile
Thanks,
Karthik Reddy
回答(1 个)
Remo Pillat
2023-11-10
0 个投票
If this issue persists, please contact MATLAB's tech support: https://www.mathworks.com/support/contact_us.html.
类别
在 帮助中心 和 File Exchange 中查找有关 Network Connection and Exploration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!