Developing a robotic application using MATLAB and Gazebo
Until now, we have used MATLAB only to exchange data using ROS topics. In this section, we are going to demonstrate how easy it is to create a robotic application for a mobile robot using MATLAB and Navigation Toolbox. We will design an obstacle avoidance system for a differential mobile robot that allows the TurtleBot robot to navigate a crowded environment without colliding with any obstacles. We will present a MATLAB script that will set the control velocities of the robot to generate a random movement. At the same time, the laser scanner data of the sensor of the robot will be used to avoid obstacles. To implement this behavior, we will rely on the Vector Field Histogram (VFH) algorithm to compute the obstacle-free steering directions of the robot, based on range sensor data. This algorithm is already provided by Navigation Toolbox in the controllerVFH
class. Finally, after some navigation time, some log data will be plotted...