Ask your own question, for FREE!
GT ECE 4560 - Intro to Automation & Robotics 14 Online
OpenStudy (anonymous):

I do not understand what Hw 7 problem 1 is asking. Am I suppose to multiply g = (x y theta)^T by the se(2) vector they are both 3x1 matrix. What is special about the * multiplication?

OpenStudy (anonymous):

For #1 I think I should \[g \prime = g * \xi = \left[\begin{matrix}R(\theta) & d \\ 0 & 1\end{matrix}\right] * \left(\begin{matrix}\xi1 \\ \xi2 \\ \xi3 \end{matrix}\right)\]

OpenStudy (anonymous):

Close but not quite...remember last week we defined the transformation*twist vector differently than the regular g.

OpenStudy (anonymous):

\[\left[\begin{matrix}\omega & v \\ 0 & 0\end{matrix}\right]\] where \[\omega = \left[\begin{matrix}0 & -\xi 3 \\ \xi 3 & 0\end{matrix}\right]\]

OpenStudy (anonymous):

No no...what you had was basically right but something is wrong about the g part. One part is there that shouldn't be when you're multiplying g by xi.

OpenStudy (anonymous):

\[d = \left(\begin{matrix}0 \\ 0\end{matrix}\right)\]

OpenStudy (anonymous):

Yeah d should be 0

OpenStudy (anonymous):

why \[d = \left(\begin{matrix}0 \\ 0\end{matrix}\right)\]

OpenStudy (anonymous):

this tells me the derivative of a velocity vector \[\xi \] is just a rotation

OpenStudy (anonymous):

Keep in mind we are just transforming a velocity vector...not taking its derivative. We're simply expressing the velocity vector in a different frame. If you think about it, the distance between the two frames should not affect the representation of the velocity but the rotation should.

OpenStudy (anonymous):

so the distance between two frames does not effect the velocity but the rotation between the frames will. I do understand this. what does the derivative have to do with this problem? And how do you get a set of differential equations from a rotation?

OpenStudy (anonymous):

You can think of the left side as just \[\xi_{new}\]You are just being asked to find it symbolically by multiplying out the right side. g' is just another name for xi.

OpenStudy (anonymous):

for #2 \[\omega \]hat always = 0 so using the Rodregess formula the exp =1

OpenStudy (anonymous):

the magnitude of \[\omega \] hat = 0 not \[\omega \]

OpenStudy (anonymous):

How are you calculating \[mag(\omega)?\]

OpenStudy (anonymous):

I was taking the magnitude of omega hat, which I now know is incorrect. I need to take the magnitude of omega. I know omega is a vector but what vector that I can take a magnitude of?

OpenStudy (anonymous):

You can extract omega from omega_hat by looking at the structure of omega_hat and how it's defined. You should have in your notes a definition of omega_hat in terms of omega1, omega2, and omega3

OpenStudy (anonymous):

Remember in last week's homework you were asked to do that.

OpenStudy (anonymous):

[0 -z y] [z 0 -x] [-y x 0]

OpenStudy (anonymous):

yes so z = omega3 y = omega2 and x = omega1

OpenStudy (anonymous):

so the magnitude is square root of x^2+y^2+z^2

OpenStudy (anonymous):

correct

OpenStudy (anonymous):

is the final answer in the form of a matrix or a number?

OpenStudy (anonymous):

What do you think?

OpenStudy (anonymous):

the answer should be in the form of a matrix.

OpenStudy (anonymous):

Yep

OpenStudy (anonymous):

in problem #3 we just take the ln(R) and the answer is a 3x3 matrix.

OpenStudy (anonymous):

the sin should be in radians

OpenStudy (anonymous):

Yes but to be sure you did it right, you should get something that looks like #2 because the ln is the inverse of the exponential. You should be able to "unhat" it also.

OpenStudy (anonymous):

should the angles be in degrees? I say no they should be in radians.

OpenStudy (anonymous):

Well in the final answer, it should be angular velocity, not angles. It doesn't matter if it's degrees or radians. Your choice

OpenStudy (anonymous):

Actually just stick with radians.

OpenStudy (anonymous):

when you take the sin and cos should the argument be in radians?

OpenStudy (anonymous):

Yes the R is given in radians for sure.

OpenStudy (anonymous):

this applies to #2 as well?

OpenStudy (anonymous):

Yes everything is given in radians.

OpenStudy (anonymous):

thanks

OpenStudy (anonymous):

Np

OpenStudy (anonymous):

And also all Taus are assumed to be 1 if not given

OpenStudy (anonymous):

problem #3 I use [r32-r23] (1/2sin(2tau)) * [r13-r31] [r21-r12]

OpenStudy (anonymous):

I mean [r32-r23] (1/2sin(tau)) * [r13-r31] [r21-r12]

OpenStudy (anonymous):

I tried this and omega is a 3x1 vector. do I hat it to get a 3x3 matrix?

OpenStudy (anonymous):

You should be multiplying the factor out in front by (R-R^T). R-R^T is a 3x3 matrix so the answer also should be.

OpenStudy (anonymous):

for problem #4, in the leftact.m file what does 'type' mean in function x2 = leftact2(g, x, type) ? I do not understand how it is used.

OpenStudy (anonymous):

with the new leftact.m, the program will recognize a 2x1 vector and a 3x1 vector but no other combination.

OpenStudy (anonymous):

Yes this last part makes sense. The leftact operation applies to transformations of points. Do you still need me to clear up the first question?

OpenStudy (anonymous):

yes. what is type for and how is it used? I entered g = SE2([x y], theta) x = [5 6 1]' leftact(g,x) my errors Error in SE2/mtimes (line 13) g.d = g1.d + g1.R * g2.d; Error in SE2/leftact (line 31) x2 = g * x;

OpenStudy (anonymous):

I can multipy a 3x3 matrix by a 3x1 matrix (velocity) using *, but when I do this in leftact.m I get an error say I have violated mtimes.m. why do I need to use mtimes in leftact?

OpenStudy (anonymous):

Ok I'm confused. Let's start from the beginning. did you modify the SE3 file so that it works?

OpenStudy (anonymous):

oh hold on we're doing SE2 still

OpenStudy (anonymous):

What am I looking for in #4?

OpenStudy (anonymous):

>> g = SE2([10 15], pi/3) 0.5000 -0.8660 10.0000 0.8660 0.5000 15.0000 0 0 1.0000 >> x = [5 6 1]' x = 5 6 1 >> leftact2(g,x) Error using * Inner matrix dimensions must agree. Error in SE2/leftact2 (line 31) x2 = g.d + g.R * x;

OpenStudy (anonymous):

So in this case your g.R is 2x2 and your x is 3x1...that's why you're getting the error. you should have code that accounts for the case where the input is a 3x1.

OpenStudy (anonymous):

How do you calculate the new point if the original point is given in homogeneous form?

OpenStudy (anonymous):

I do understand that R is a 2x2 and x is a 3x1. Do i code in leftact.m to partition x into \[\hat \omega\] and v?

OpenStudy (anonymous):

\[\dot x\] \[\dot y \] and \[\dot \theta \]

OpenStudy (anonymous):

\[x = ([\hat \omega ], v)\]

OpenStudy (anonymous):

So leftact can take 3 things for x: 1) A 2x1 vector representing a point 2) A 3x1 vector representing a point(x;y;1) 3) A 3x1 vector representing a velocity(vx;vy;0) In each case it should multiply the g by the x. I think the easiest way to do this for parts 2 and 3 is to make g a homogeneous form matrix(note the difference from SE2 object) and then multiply it by x directly. Then you have a 3x3 times a 3x1 and you'll get a 3x1 homogeneous answer returned.

OpenStudy (anonymous):

Should not the vector point be (x;y;z) and the velocity vector be (x,y,theta)? Why do you put a 1 in place of z and a zero in place of theta?

OpenStudy (anonymous):

This is SE2...homogeneous representation of a point is [x;y;1] what would the z represent. The velocity vector is just linear velocity in homogeneous form, not including angular velocity.

OpenStudy (anonymous):

I see, SE2 is movement or position in 2 space.

OpenStudy (anonymous):

Yes SE2 is special euclidian 2-space and SE3 is special euclidian 3-space.

OpenStudy (anonymous):

The task is not to take x down to a 2x1 but to take g up to a 3x3.

OpenStudy (anonymous):

Yes...in my opinion. The reason is that a star operation would take different forms for point and velocity x. But the matrix operation is the same whether it's a point or velocity.

OpenStudy (anonymous):

the result of g*x is the same but how that result is interpreted determines if the product is a point in 2 space or a velocity in 2 space

OpenStudy (anonymous):

Yes exactly but it's up to the user to interpret the result...you just need to provide the result.

OpenStudy (anonymous):

I will need to figuer out how to turn a 2x2 into a 3x3

OpenStudy (anonymous):

figure

OpenStudy (anonymous):

You know how to construct a homogeneous matrix in SE2 yes?

OpenStudy (anonymous):

That is not fresh in my mind

OpenStudy (anonymous):

g in matrix form is \[\left[\begin{matrix}R & d \\ 0 & 1\end{matrix}\right]\]

OpenStudy (anonymous):

yes. I meant on the Matlab side

OpenStudy (anonymous):

[g.R g.d; 0 0 1]

OpenStudy (anonymous):

Also what if I enter x as a point (x,y,1). R = [cos(1) -sin(1)] {sin(1) cos(1)] This does not translate well

OpenStudy (anonymous):

x is not an SE2 object...x is a vector. x = [x;y;1]

OpenStudy (anonymous):

I would be using code similar to SE2.m in creating x.R and x.d. I would need to enter x in as x = SE2([x y], 1); this is as if I were entering another g

OpenStudy (anonymous):

No. x is a point, not an SE2 object. SE2 objects can be thought of as frames and transformations. g is an SE2 object. x is a vector

OpenStudy (anonymous):

x has no rotation. Here's the multiplication you want to do: \[\left[\begin{matrix}g.R & g.d \\ 0 & 1\end{matrix}\right]*\left(\begin{matrix}v1 \\ v2 \\ v3\end{matrix}\right)\]

OpenStudy (anonymous):

Where the vector in the right is either \[\left(\begin{matrix}x \\ y \\ 1\end{matrix}\right)\]or \[\left(\begin{matrix}v_x \\ v_y \\ 0\end{matrix}\right)\]

OpenStudy (anonymous):

I see, I do not creat an x.R or an x.d

OpenStudy (anonymous):

No

OpenStudy (anonymous):

My x is a 3x1 vector and it stays a 3x1 vector. Thanks for your patience

OpenStudy (anonymous):

No problem

OpenStudy (anonymous):

I got in running. Thanks

OpenStudy (anonymous):

Cool

OpenStudy (anonymous):

I do the same for updating the adjoint.m file

OpenStudy (anonymous):

Write out what you plan to multiply to get that adjoint.

OpenStudy (anonymous):

if (isa(x,'SE2')) % if x is a Lie group, then deal with properly. z = g*x*inv(g); elseif ( (size(x,1) == 3) && (size(x,2) == 1) ) % if x is vector form of Lie algebra, then deal with properly. a = [g.R g.d; 0 0 1]; z = g*x*inv(g); elseif ( (size(x,1) == 3) && (size(x,2) == 3) ) % if x is a homogeneous matrix form of Lie algebra, ... a = [g.R g.d; 0 0 1]; z = g*x*inv(g); end end

OpenStudy (anonymous):

You're defining a but never using it. Also in the second case, where x is a 3x1...think about what you're multiplying.

OpenStudy (anonymous):

if (isa(x,'SE2')) % if x is a Lie group, then deal with properly. z = g*x*inv(g); elseif ( (size(x,1) == 3) && (size(x,2) == 1) ) % if x is vector form of Lie algebra, then deal with properly. a = [g.R g.d; 0 0 1]; z = a*x*inv(a); elseif ( (size(x,1) == 3) && (size(x,2) == 3) ) % if x is a homogeneous matrix form of Lie algebra, ... a = [g.R g.d; 0 0 1]; z = a*x*inv(a); end end In case 2 and 3, I am multiplying a*x*inv(a). a is a 3x3, x is a 3x1 and inv(a) is a 3x3. That is a bad order to multiply matrices. I will have to do a*inv(a)*x.

OpenStudy (anonymous):

a*inv(a) is just the identity. You !cannot! move around matrices arbitrarily. Matrix multiplication is not commutative in general. You need to find another solution.

OpenStudy (anonymous):

In part 3 x is a 3x3 so that actually makes sense right.

OpenStudy (anonymous):

[0 -z y] [z 0 -x] [-y x 0]

OpenStudy (anonymous):

x is a transformation. You want to describe a transformation as a 3x3 matrix.

OpenStudy (anonymous):

For the second part

OpenStudy (anonymous):

\[x = \left[\begin{matrix}R(-\theta) & -R(-\theta)d \\ 0 & 1\end{matrix}\right]\]

OpenStudy (anonymous):

why?

OpenStudy (anonymous):

You seem to have written the inverse of a transformation. x is just a transformation.

OpenStudy (anonymous):

\[x = \left[\begin{matrix}R & d \\ 0 & 1\end{matrix}\right]\]

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!