Hello Everyone,
i managed to import custom massages via the command ros2genmsg. But now i get allways the error, that some massage type is not recognisable by matlab. Even when i dont use any commands that need the custom commands. See code snippet:
topicName="/sensor_state";
matlabNode = ros2node("matlabNode");
SensorState = ros2subscriber(matlabNode,topicName);
This example gives me now the following error massage:
Error using ros.internal.getEmptyMessage>getMessageDataAndInfo
Unrecognized message type turtlebot3_msgs/SensorState. Use ros2 msg list to see available types.
Error in ros.internal.getEmptyMessage>getCachedMap (line 46)
[structInfo.data,structInfo.info] = getMessageDataAndInfo(msg, msgInfo, rosver);
Error in ros.internal.getEmptyMessage (line 35)
[data,info] = getCachedMap(msgMapROS2,msg,msgInfo,rosver);
Error in ros.internal.utilities.findMsgDepends (line 17)
[msgStruct,info] = ros.internal.getEmptyMessage(msgName,rosver);
Error in ros.internal.utilities.getPathOfDependentDlls (line 14)
pkgNamesMap = ros.internal.utilities.findMsgDepends(msgType,map,rosver);
Error in ros2subscriber/createSubscriber (line 669)
dllPaths = ros.internal.utilities.getPathOfDependentDlls(obj.MessageType,'ros2');
Error in ros2subscriber (line 330)
createSubscriber(obj, ordinalParser.Results.node.ServerNodeHandle, ...
Error in Turtlebot3_Subscription_SensorState (line 21)
SensorState = ros2subscriber(matlabNode,topicName);
I used turtlebot3_msgs/SensorState in the past, but deleted it afterwards because it was not longer necessary in my project. Is there any kind of storage in matlab that i have to reset when i delete packages on my disc?
EDIT: I can subscribe every topic, but not /sensor_state. E.g. /rosout.. Anyone a guess what it could be?
I use Matlab 2022a and ROS Toolbox 1.5.
I would much appreciate your help.
greetings, André