Could not load library (Poco exception = libMatlabDataArray.so: cannot open shared object file: No such file or directory)
55 views (last 30 days)
we are using a custom designed ROS topic.
rosgenmsg runs without errors and myTopic is included to rosmsg list.
there is the error:
Failed to create a ROS subscriber with topic name myTopic and message type myMsgType.
Stepping into rostopic, debugging ends at Subscriber.m Line 547:
returnCall = addSubscriber(obj.InternalNode, ...
executing this call, the try...catch gets
MException with properties:
message: 'Could not load library (Poco exception = libMatlabDataArray.so: cannot open shared object file: No such file or directory)'
stack: [5×1 struct]
Does anybody know the root-cause of these errors?
libMatlabDataArray.so is included into $LD_LIBRARY_PATH.
We are using Matlab2020b and ROS Melodic.
Cam Salzberger on 3 Feb 2021
This may be because you have conflicting libraries on your platform's library path. It may be related to this bug, or this one, that were both fixed in R2020b Update 3. Try getting the latest update and see if that resolves the issue.
Also see here for a similar issue with suggested resolutions. Though that question is regarding ROS 2, similar issues may be found in ROS 1.
General advice: If you have defined something outside of MATLAB to explicitly include libMatlabDataArray.so into your LD_LIBRARY_PATH, that may not be the best course of action (especially if you upgrade your MATLAB installation). It's recommended to allow MATLAB to add its own libraries to the path as needed.