Automated Parking Valet with ROS 2 in Simulink example errors out during model update

5 次查看(过去 30 天)
I open the model from Automated Parking Valet with ROS 2 in Simulink example and use "Ctrl+D" to update it. However, I got the following error:
=== Simulation (null) === Error:Making simulation target ROS2ValetPathPlannerExample_sfun. /usr/local/MATLAB/R2022b/bin/mex -R2018a -c @ROS2ValetPathPlannerExample_sfun.mol /usr/bin/ld: /tmp/_halideRuntime.o: in function `halide_default_get_symbol': posix_allocator.cpp:(.text.halide_default_get_symbol+0xb): undefined reference to `dlsym' /usr/bin/ld: /tmp/_halideRuntime.o: in function `halide_default_load_library': posix_allocator.cpp:(.text.halide_default_load_library+0xc): undefined reference to `dlopen' /usr/bin/ld: posix_allocator.cpp:(.text.halide_default_load_library+0x19): undefined reference to `dlerror' /usr/bin/ld: /tmp/_halideRuntime.o: in function `halide_default_get_library_symbol': posix_allocator.cpp:(.text.halide_default_get_library_symbol+0x6): undefined reference to `dlsym' collect2: error: ld returned 1 exit status gmake: *** [ROS2ValetPathPlannerExample_sfun.mexa64] Error 255
I am using MATLAB R2022b on Ubuntu 20.04

采纳的回答

Josh Chen
Josh Chen 2023-2-10
编辑:Josh Chen 2023-2-10
Recent change in GNU turned "--as-needed" for ld as default, which causes this issue.
To address this, open the model "ROS2ValetPathPlannerExample.slx", navigate to "Configuration Setting->Simulation Target->Linker flags" in and add "-Wl,--no-as-needed" (No quote)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Publishers and Subscribers 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by