I am having an issue with subscribing to px4 topics using MATLAB’s ROS toolbox. I have generated the PX4 custom messages in MATLAB. It appears no message is actually passed through.
node1 = ros2node('matlab');
node2 = ros2subscriber(node1,'/fmu/out/sensor_combined')
Above results in "ros2subscriber with properties:
TopicName: '/fmu/out/vehicle_odometry'
LatestMessage: []
MessageType: 'px4_msgs/VehicleOdometry'
NewMessageFcn: []
History: 'keeplast'
Depth: 10
Reliability: 'reliable'
Durability: 'volatile'"
LatestMessage should probably have :[1x1 struct] or something along those lines. Does anyone have an idea of what the issue is? Is there a px4_msgs download specifically for custom messages in the ROS toolbox ?