x    Assume are given the laser scan above and assume the Tu…

x    Assume are given the laser scan above and assume the Turtlebot robot is positioned at (0,0). Also, assume the robot is circular inshape and it is 1.0 meter wide (diameter). The sensor is located at center of robot. All units are meters.  What is the value of (Xc, Yc) of the robot center when the robot encounters the first obstacle (assume meters)?  (Assume plot is fixed as shown as robot moves.)

X                                         Y Assume are given…

X                                         Y Assume are given the laser scan above and assume the Turtlebot robot is positioned at (0,0).   What is the MATLAB code to calculate the midpoint of the scan line along the Y axis?  An example is given above with midpoint  at Y = 0 but your code should work for any single horizontal line located anywhere in the lidar scan.  Assume x = data(:, 1) and y = data(:, 2)