Institut de Robòtica i Informàtica Industrial

GetOdometry

PURPOSE ^

Get the odometry readings witht the different available sensors.

SYNOPSIS ^

function [sr sn]=GetOdometry(R)

DESCRIPTION ^

 Get the odometry readings witht the different available sensors.

 Returns cell arrays with the current odometry readings (sr) and the
 associated noise (sn) for the available odometry sensors.

CROSS-REFERENCE INFORMATION ^

This function calls:
  • ReadSensor Returns the sensor reading for time t.
This function is called by:
  • Simulation Simulates a robot performing Pose SLAM.

SOURCE CODE ^

0001 function [sr sn]=GetOdometry(R)
0002 % Get the odometry readings witht the different available sensors.
0003 %
0004 % Returns cell arrays with the current odometry readings (sr) and the
0005 % associated noise (sn) for the available odometry sensors.
0006 
0007   k=1;
0008   sr={};
0009   sn={};
0010   for i=1:R.nSensors
0011     if isa(R.sensors{i},'RelPosSensor')
0012       [r n]=ReadSensor(R.sensors{i},R.time);
0013       sr{k}=r;
0014       sn{k}=n;
0015       k=k+1;
0016     end
0017   end


Institut de Robòtica i Informàtica Industrial

Generated on Fri 24-Jul-2009 12:32:50 by m2html © 2003