For hw 3 in question 1, is d = (x^2 + y^2)^.5 with a direction vector? What is that direction vector?
You're overthinking it... d is just the displacement vector. It's essentially given in the problem statement except that it's not in vector form. Just for reference though...you can express polar coordinates from rectangular as follows: r is what you wrote above and \[\theta = \tan^{-1} (y/x)\]. Here is a reference: http://www.teacherschoice.com.au/maths_library/coordinates/polar_-_rectangular_conversion.htm
I think I have figured out problem #1. I used the first two numbers to be my x, y for d {x} {y} and I used the angle in the rotation vector for R. cos -sin sin cos
I think you got it.
I am on number 5 now. I think it is just an extra rotation. Can you see if I am correct?
I think I did it right, my answer sounds good.
What was your strategy for solving it?
I included the angle due to the bump to the rotation angle of ref frame A and thus created a new ref frame A'. qOA' = gOA' * q
How do I use the SE2 code to plot and display for #6?
Once you put the folder from T-Square into your Matlab directory (The folder @SE2 should be visible on the left side), start by typing help SE2 in the command window. Let me know if this doesn't help too much.
I see the result when I type help @SE2. I am still unclear as to how to proceed. Say I want to plot gOA. I have gOA = ({x y}, [cos b -sin b; sin b cos b]). Where do I go? plot.m display.m or SE2.m
@SE2 is a class. The files inside the folder are functions you can apply to the class. To make an object of class SE2, just define the variable like gOA = SE2(d,theta) where d is the displacement vector of the frame and theta is the rotation. Once you do that, you can apply functions to that object like plot(gOA), etc.
Should I write a program that plots all of these on the same graph?
I was able to send gOA to SE2 and to plot(gOA)
Yes plot everything in the same figure
My program is not working
I typed it in as if I were typing it into the Command window gOO = SE2([0,0], 0); plot(gOO) hold on; but I get the error Undefined variable "SE2" or function "SE2.BDD_Hw3_6".
Is the @SE2 folder in the same place that your m file is in? Matlab has to be able to see the class
I have my m file in the @SE2 folder
I pulled out my m file to put it in the same location as my @SE2 folder and the program work perfectly. I did not include my code as part of the homework I turned in. I did not see as question # 6 asked for the code, is it required for the homework?
Nope the script isn't required, just the plots. Yeah the m file should be in the same folder as the @SE2 folder, but not inside the @SE2 folder.
Join our real-time social learning platform and learn together with your friends!