- First, ensure that the dimensions of your MATLAB map match the dimensions of the Gazebo map for the Turtlebot3. If they don't match, you'll need to rescale your MATLAB map to match the size of the Turtlebot3's map.
- You can use the "imresize" function in MATLAB to resize your map. For example, if your MATLAB map is 20x20m and the Turtlebot3's map is 10x10m, you can resize your MATLAB map to match the Turtlebot3's map size using:
- Make sure to adjust the resolution of your map accordingly, so that it matches the resolution of the Turtlebot3's map.
- You can read more about the "imresize" function here. https://www.mathworks.com/help/matlab/ref/imresize.html
- The Turtlebot3 can be controlled using the "/cmd_vel" topic, which accepts "geometry_msgs/Twist" messages for both linear and angular velocities.
- To make the Turtlebot3 move, you need to publish Twist messages with appropriate linear and angular velocities to the "/cmd_vel" topic.
- Here are a few MATLAB Answers that might help you to understand and resolve your query. https://www.mathworks.com/matlabcentral/answers/537435-i-can-t-move-the-turtlebot3-with-matlab-and-ros https://www.mathworks.com/matlabcentral/answers/119559-why-is-the-ros-subscriber-callback-in-matlab-not-triggered-when-messages-are-published-from-an-exter