Closed mael25 closed 3 years ago
Hello @stefaniapedrazzi, so I have checked in more details where the error happens:
lib/controller/matlab/launcher.m
(l.150)
projects/robots/kuka/youbot/controllers/youbot_matlab/youbot_matlab.m
(l.14)
projects/robots/kuka/youbot/controllers/youbot_matlab/passive_wait.m
(l.4)
resources/projects/plugins/robot_windows/generic/generic.c
(l.16):
So basically, the error occurs the first time wb_robot_step()
is called inside the Matlab controller. Then, it looks in libgeneric.so
(generated from resources/projects/plugins/robot_windows/generic/generic.c
) for wb_robot_window_step()
. Finally, inside wb_robot_window_step()
, it fails to find libgeneric_robot_window.so
(generated from resources/projects/libraries/generic_robot_window/generic.c
) necessary to use wbu_generic_robot_window_handle_messages()
and the other generic window functions.
I guess it might be because it looks inside the wrong place for libgeneric_robot_window.so
, but I have trouble to find where/how to define the search location of the library... Do you have any idea ?
Thanks!
Something to check could be to hardcode the path to libgeneric_robot_window.so
using RPATH, by adding the following lines in the resources/projects/plugins/robot_windows/generic/Makefile
(just after LIBRARIES = -lgeneric_robot_window
).
ifeq ($(OSTYPE),linux)
LIBRARIES += -Wl,-rpath,$(WEBOTS_HOME_PATH)/lib/controller
endif
Thanks, it has solved the problem!
Describe the Bug The MATLAB controllers crash in the develop branch, because they fail to load the generic window library (see Screenshots).
Steps to Reproduce
nao_matlab.wbt
oryoubot_matlab.wbt
Expected behavior The library loads correctly and the controller does not crash.
Screenshots
System
Additional context I think the issue might be due to the fact that the files of the new robot window in
include/controller/c/webots/plugins/robot_window
are not included inlib/controller/matlab/allincludes.h
and not mentioned inlib/controller/matlab/launcher.m
.