Could not load library (Poco exception = libMatlabDataArray.so: cannot open shared object file: No such file or directory)

조회 수: 10 (최근 30일)
Hi,
we are using a custom designed ROS topic.
rosgenmsg runs without errors and myTopic is included to rosmsg list.
When calling
rostopic("echo", "myTopic")
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, ...
serverNodeHandle, ...
obj.MessageInfo.path, ...
topic, ...
obj.MessageInfo.subscriberClassName, ...
callbackFcn, ...
bufferSizeSettings,false);
executing this call, the try...catch gets
ex =
MException with properties:
identifier: 'ros:internal:transport:SubscriberError'
message: 'Could not load library (Poco exception = libMatlabDataArray.so: cannot open shared object file: No such file or directory)'
cause: {}
stack: [5×1 struct]
Correction: []
Does anybody know the root-cause of these errors?
libMatlabDataArray.so is included into $LD_LIBRARY_PATH.
We are using Matlab2020b and ROS Melodic.
Thanks

답변 (2개)

Cam Salzberger
Cam Salzberger 2021년 2월 3일
Hello Andreas,
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.
-Cam
  댓글 수: 1
Andreas Schwager
Andreas Schwager 2021년 2월 16일
Dear Cam,
there is a workarround:
calling a standard ROS topic first, e.g.
topicEcho = rostopic("echo", '/rosout');
and the custom designed ROS topic after, the error does no more happen.
Why?
Thanks for yur reply
Andreas

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


Andreas Schwager
Andreas Schwager 2021년 6월 10일
Hi,
after upgrading to R2020b Update 3 there is the error:
ros.internal.utilities.getMessageTypesWithCppKeyword
when calling
app.smP.mtSub = rossubscriber('/myTopic',@myTopicCallback);
These lines were running at R2020b Update 2.
Thanks for your help

카테고리

Help CenterFile Exchange에서 Specialized Messages에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by