Robotics CITS3241


Portfolio Specifications

Your portfolio of laboratory work for Robotics is now due 12noon Friday 26th October (extended from Thursday). This is worth 40% of your final assessment for the unit. I will be happy to provide pre-submission feedback on your work in the lab sessions prior to the submission date.

The submission requirements have been reduced so that labs 8 and 9 are only worth bonus marks. The late submission penalty has also been greatly for reduced to 2% for each of the first five days. See this help3241 post.

The portfolio will be submitted as a single Linux tar file or a zip archive file, and deposited through our cssubmit system at this location. Some guidelines on how to construct HTML documents are given here.

Your portfolio will consist of a collection of files all residing in a single directory (call it Robotics3241). This directory should contain all your MATLAB functions plus a file named index.html and associated files and images that form the HTML documentation of your work.

As cssubmit only accepts file submissions, your project directory must be wrapped into a single file. This can be done under Linux using tar, or under windows XP using a zip utility. It is the tar/zip archive of your directory that you must submit.

To tar up your directory first move up to the parent directory that holds your Robotics3241 directory and then use the command

tar cvf Robotics3241.tar ./Robotics3241
If you are not very familiar with unix I am happy to help you do this.

Your files can be submitted at anytime and, if necessary, several times over until you are satisfied with what you have done.

Before the deadline, test your submitted portfolio and check that all relative links work.

When marking I will unwrap your project submission, change into your directory and begin testing your code. I will also read your index.html file using a browser to view your documentation. It is up to you to make sure everything is going work properly when I do this.


What You Must Submit

M files of
  1. rotx, roty, rotz, trans, and plotframe from Lab 2
  2. DHtrans from Lab 3, and puma3dof and stanford3dof in their final form as they ended up in Lab 4
  3. A plot from puma3dof in the zero position, and puma3dof with joint angles (-pi/4, pi/6, -pi/6).
  4. A plot from stanford3dof in the zero position, and stanford3dof with joint parameters (-pi/4, pi/6, 1.0).
  5. bezier and plotbezier from Lab 6 (plus any ancillary functions you created).
  6. Plots:
    • A 1D cubic Bezier curve with 2 control points over the start point and 2 control points over the end point.
    • A 2D curve with 3 control points over the start point, 3 intermediate points, and 3 control points over the end point. Provide a velocity plot as well.
    • An 'interesting' (you design this) 3D bezier curve specified by 9 control points. Provide its velocity plot.
  7. stanford6dof, invstanford6dof from Lab 5 plus the modifications from Lab 7 (plus any ancillary functions you created, such as invht, and perhaps inveuler).
  8. A plot from stanford6dof in the zero position, and stanford6dof with joint values (-pi/4, pi/6, 1.5, 0, pi/4, 0).
  9. Transcript of a MATLAB session testing the correctness of invstanford6dof.
  10. stanfordJointInterp from Lab 6 and a function called testjointinterp that calls stanfordJointInterp and generates an 'interesting' path.
  11. stanfordmrcntrl, plus any other ancillary functions you generated to work with stanfordmrcntrl from Lab 7.
  12. motion.m which should produce an 'interesting' motion rate control trajectory for your robot from Lab 7 to follow.
  13. A plot of the robot motion obtained using motion.m

What Can Submit for Bonus Marks

  1. rot and invrotaxis from Lab 8 and the transcript of a MATLAB session testing the correctness of your rot and invrotaxis functions.
  2. An extended stanfordmrcntrl and twitch, plus any other ancillary functions you generated to work with stanfordmrcntrl from Lab 9.
  3. An extended motion.m which should produce a motion rate control trajectory for your robot from Lab 9.
  4. A plot of the robot motion obtained using motion.m

What am I looking for in your MATLAB code?

  • Reliability: Any code used to control a robot should be safety critical. To test all possible pre and postconditions of your code would make things quite unwieldy. However, your code should test the basic preconditions of the arguments (have the correct number of arguments been supplied, do matrices have the appropriate dimensions? etc). Your code should cope with ill-conditioned cases (or detect them and exit gracefully). For example, what happens if you pass an identity matrix to your 'invrotaxis' code?
  • Documentation: Your ".m" files should have clear documentation headers so that 'help' on each of your files provides useful information.
  • Clarity: Your code should be clear, concise and have a logical layout.
  • Testing: The transcripts of your code tests, as requested above, should demonstrate that you have 'exercised' the code and identified critical input conditions that might result in code failure.

What am I looking for in your HTML documentation?

The aim of the portfolio is to link together all your work and results into the one document. Something you can show Mum and Dad and/or a potential employer!

Your html file can be quite simple, I am assessing you in robotics and not in your html prowess! It can be in the form of one long web page that one scrolls through. You should have a series of links that takes one to each of your MATLAB functions. You will also have images of saved figures from your MATLAB sessions showing the results as specified from the list above. Along with each image will be a title and/or short description of what is being shown.

There is no need to fill your web page with large amounts of descriptive material that would effectively replicate the material that is already in the lab sheets, though you can have links to the lab sheets if you wish.

While there are many tools for creating web pages I personally find it is much simpler to hand roll web pages using an ordinary text editor, such as MATLAB's editor. The MATLAB editor recognises html syntax and will do appropriate highlighting (just make sure you save your files with a .html ending). Some guidelines on how to construct HTML documents are given here.

To get you started here is a simple file you can download and start editing. Make sure you save it as index.html (not as portfoliostart.html)


Some information that may be useful in your final portfolio preparation

Testing scalar values and the validity of homogeneous transforms
If you try to test values of matrix elements against ideal values using the equality operator '==' you are likely to have problems. Numerical roundoff will result in matrix values that are not quite ideal. I suggest you write a function with the following specification:

% TOLEQ
%
% Function to compare matrices allowing for a small error tolerance
%
% Usage:  result = toleq(a,b,tol)
% Where:  a and b are matrices to compare
%         tol is the magnitude of error tolerated between elements 
%             of a and b (say .00000001 or eps).
%
%         result = 1  if a and b are within tolerance
%                = 0  if any element of a and b differ by more than tol
%
Once you have a function like this testing the validity of values will be made simpler. Note that if you write this function for general 2D matrices it will also work for 1D vectors and scalar values.

How to halt your code with an error message:

error('this is an error message')  % prints message and exits to MATLAB shell

warning('this is a warning)        % prints message and code continues.

How to record a transcript of a MATLAB session:

diary file_name        % all subsequent terminal input and output
                       % is copied into file file_name.
...

diary off              % stops recording

Saving figures in MATLAB:

Figures saved under MATLAB can be rather large. One way of saving smaller images of figures in MATLAB is to use the -r option for print.


                 The desired file format, in this case jpeg.
                  /
>> print -rdpi -djpeg  picci.jpg
            \
            The desired dpi for your image

Note that if you specify a too small a value for the dpi the lines in the image will start to break up.

The special dpi value of -r0 will save the figure at screen resolution. This gives a good image that is about 500 pixels wide.


School of Computer Science & Software Engineering,
The University of Western Australia.