Hello Tristan,
If the "receive" call is timing out, that is because it did not receive any data within the timeout period. First, check the obvious:
- Are messages being sent on that specified topic continuously?
- Are the messages being sent frequently enough that the timeout period would cover at least two messages?
- Are you able to see messages being sent on that topic by running "rostopic echo" in another terminal on the machine sending the messages?
If it seems like messages are being published correctly, then the issue is the connection between the machines. First check that the topic is visible to MATLAB by doing "rostopic list" (before creating any subscribers or publishers in MATLAB). If you can see the topic with introspection, but not receive any messages on it, the issue is usually with the environment (usually ROS_IP) on the machine sending the messages. See here for a detailed answer.
-Cam