-
Notifications
You must be signed in to change notification settings - Fork 38
FPS DataStream
FPSDataStream Definition of FPS and frame rate: (Frames per Second) frame rate is the frequency (rate) at which an imaging device produces unique consecutive images called frames. Frame rate is most often expressed in frames per second (FPS).
http://www.google.com/url?source=imglanding&ct=img&q=http://habitualfilms.files (example of frame per second in movie)
Frames per Second Data Stream file:
file name/location: /Lib/Util/Matlab/stream_fps.m( in ur robocup folder).You can run this script on a robot to display the frames per second for Naoqi and Cognition Processes.
To start, open a new terminal in your VM or 9.10system:
(Step1)Type in: ssh [email protected] in your terminal.
(make sure you know how to connect with a robot, please check this link: https://fling.seas.upenn.edu/~robocup/wiki/index.php?n=Team.ConnectNao , if you still have no idea how to use Linux or download robocup basic software, please check: https://fling.seas.upenn.edu/~robocup/wiki/index.php?n=Team.Gettingstarted (“getting start”) http://www.linux-tutorial.info/ (Linux tutorial) http://www.ee.surrey.ac.uk/Teaching/Unix/ (A beginners guide to the Unix and Linux operating system.) )
(Step2)Type in: cd Player/ (go to Player folder) *(ls can check everything inside Player folder)
(Step3)Type in: opt/naoqi/bin/naoqi (Feb 11th.2012 ...I try t connect NAO RED3....this line failed) (By the way, please check how many terminals you have before run naoqi; just type in screen –ls, then do killall screen, killall espeak, and …….do screen –ls again ,,,make sure no useless screen in your terminal)
(Step4)Type in: Open a new terminal please: and go to Player folder cd Player ls (check file in Player folder) lua run_cognition.lua (run cognition.lua file)
Now use “Ctrl+A+D” lead you to your old terminal (running naoqi)
(Step5)Type in : cd .. (leave Player folder) cd matlab (cd to matlab folder) run matlab –jvm ( open matlab) run stream_fps.m (if the graph doesn’t show up, open matlab again, Please)
before you run naoqi &cog.lua please send all ur file from your PC to Nao robot. About update Lua!: https://fling.seas.upenn.edu/~robocup/wiki/index.php?n=Team.UpdateNao This wiki page have two parts: first! Update Lua! (“rsync -avr --exclude="." ./Player/* [email protected]:Player/”) and Update Nao. REMEMBER! NEVER UPDATE NAO… if you want ask why please contact Senior member of robo team. I will put my code on this wiki page later! Wish u good luck with this…
For more information about FPS and Linux : http://www.100fps.com/how_many_frames_can_humans_see.htm (fps..) Linux https://www.linux.com/ (linux basic) http://linuxsurvival.com/ (Linux survival guide) Matlab http://www.math.utah.edu/lab/ms/matlab/matlab.html (matlab tutorial) http://www.math.ufl.edu/help/matlab-tutorial/matlab-tutorial.html#SEC2 Nao robot: http://www.aldebaran-robotics.com/ http://www.youtube.com/watch?v=2STTNYNF4lk
robocup humanoid robot mailing list(Georgia Institute of Technology); https://mailman.cc.gatech.edu/mailman/listinfo/robocup-humanoid
Matlab SC:
% Ashleigh Thomas, Mark Zhu, and Liz Fedalei % November 2011
% Run this script on a robot to show the fps of the Naoqi and cognition % processes for debugging purposes % No.3 % Plots 'top' number of data points at a time to get a scrolling view of us data that runs indefinitely fps = shm('mcmFps263nao');
top = 50; % max number of data points displayed at a time
% clear old figure and create new one clf; figure(1);
subplot(2,1,1); title('FPS for Cognition Processes'); xlabel('Real Time'); ylabel('FPS (1/s)');
subplot(2,1,2); title('FPS for Naoqi'); xlabel('Real Time'); ylabel('FPS (1/s)');
% create vectors to store fps data fps_cognition _data = zeros(top,1); fps_naoqi _data = zeros(top,1);
x = 1:1:top;
while(1)
% retieve and store cognition data c = fps.get_cog(); fps_cognition _data = circshift(fps_cognition _data,-1); % film... fps_cognition _data(top,:) = c;
% retrieve and store naoqi data n = fps.get_naoqi(); fps_naoqi _data = circshift(fps_naoqi _data,-1);% film... fps_naoqi _data(top,:) = n;
% plot data subplot(2,1,1); plot(x,fps_cognition _data(:,1),':or'); subplot(2,1,2); plot(x,fps_naoqi _data(:,1),':ob');
pause(.1);
end