www.gusucode.com > robotics 案例源码程序 matlab代码 > robotics/GetAdditionalPurePursuitObjectNnformationExample.m
%% Get Additional |PurePursuit| Object Information % Use the |info| method to get more information about a |PurePursuit| object. % |info| returns two fields, |RobotPose| and |LookaheadPoint|, which % correspond to the current position and orientation of the robot and the % point on the path used to compute outputs from the last |step| call. %% % Create a PurePursuit object. pp = robotics.PurePursuit; %% % Assign waypoints. pp.Waypoints = [0 0;1 1]; %% % Compute control commands using the |step| method. [v, w] = step(pp, [0 0 0]); %% % Get additional information. s = info(pp)