



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




These problems are from the textbook by Spong et al.^1 , which is the textbook for the ECE569 this Fall 2015 semester. As such, many of the problem statements are taken verbatim from the text; however, others have been reworded for reasons of efficiency or instruction. Solutions are mine. Any errors are mine and should be reported to me, [email protected], rather than to the textbook authors.
5-10 Derive the equations needed to compute the shortest distance from a point p to a polygon in three dimensions with vertices ai, i ∈ [n] := { 1 , 2 ,... , n}. Solution: This question is ambiguous. I assume that “in three dimensions” modifies “polygon” (the closest noun) and that by “polygon in three dimensions” the author meant polytope. For the vertices, we select dp = mini∈[n] ‖p−ai‖ 2 , where we have chosen the Euclidean distance as the norm. For the edge from ai to aj , we calculate the distance from p to ap along a normal to the line containing the edge. If ap is on the line segment, the distance from p to the edge is ‖p − ap‖. Otherwise it is the smaller of the distances from p to the endpoints of the edge. This distance was already considered above. To find ap we proceed as follows: If the segment from ap to p is normal to the edge, then the dot product (aj − ai) · (ap − p) = 0. We can express the point ap as ai + tpaj , so we have
(aj − ai) · ((ai − p) + tp(aj − p)) = 0.
Then so long as ai and aj are distinct, and if they weren’t, there would be no edge, we select one of the x, y, or z components, that is nonzero. Let us assume without loss of generality that the x component qualifies. Then we can solve the above equation for tp, obtaining
tp =
(px − aix)(px − ajx) (aix − ajx)^2
We need to identify each ap with the associated edge so let’s call this one ap,ij. We have that tp we can find ap and compute the distance ‖p − ap,ij‖. For the edges we find de = min i,j∈[n]
‖p − ap,ij ‖ 2 ,
(^1) Spong, M., S. Hutchinson, and M. Vidyasagar, Robot Modeling and Control, John Wiley & Sons,
The last set of distances we must calculate are the distances from p to the faces. Number the faces 1 through ℓ. Each face connects at least 3 vertices and is contained in a plane containing those vertices. The distance from p to the plane containing face m will be the distance ‖p − ap,m‖. The point of intersection will be on the line containing p and normal to the plane. If the point of intersection is on the face, then we use the distance to that point. If not, the closest point of the face will be a vertex or on an edge, in which case we have already considered it.
To find the normal, we take the cross product of two edges of the face, consider without loss of generality, a face m with vertices ai, aj , and ak. The normal can be obtained by computing (ai − aj ) × (ai − ak). Then we construct a line through p along that normal, just as we did in the case of an edge. Numbering the faces arbitrarily f 1 through fℓ, we select
df = min m∈[ℓ]
‖p − ap,m‖ 2 ,
.
The distance from p to the polyhedron is then min{dp, de, df }.
closest point of the robot, (1, 1), is a distance of two from the closest point obstacle at (3, 3).
With ρ 0 = 3, the workspace repulsive force for the obstacle at (− 3 , −3) is zero, but the workspace repulsive force from the other obstacle is given by
Frep, 1 = η 1
ρ(p 1 (q))
ρ 0
ρ^2 (p 1 (q))
∇ρ(p 1 (q))
so
Frep, 1 =
acting toward the origin on v 3.
With ρ = 5, both obstacles repel the robot. The forces sum so we have
Frep = Frep, 1 + Frep, 2 ,
where
Frep, 1 =
acts on v 1 in the direction (− 1 , −1) and
Frep, 2 =
acts on v 1 in the direction (1, 1). Thus, the net workspace repulsive force is
3 40
acting on the c.m. of the robot in the direction (− 1 , −1).
5-19 Find the cubic polynomial trajectory ˙qid (t) for revolute joint Ji that is at rest at position q 0 at time t 0 and reaches position q 1 in two seconds with a final velocity of 1 rad/s. Sketch the trajectory. Solution The trajectory will have the form
q(t) = b 0 + b 1 t + b 2 t^2 + b 3 t^3 , t ≥ 0 (2)
or equivalently
q(t) = a 0 + a 1 (t − t 0 ) + a 2 (t − t 0 )^2 + a 3 (t − t 0 )^3 , t ≥ t 0 , (3)
where the ai and bi are real coefficients. For this problem we will use the second form. Our constraints involve both positions and velocities, so we will need the derivative of (3), which is
q˙(t) = a 1 + 2a 2 (t − t 0 ) + 3a 3 (t − t 0 )^2 , t ≥ t 0. (4)
The given constraints are then Evaluating (3) at time t 0 , we see that a 0 = q 0.
Constraint Text q ˙(t 0 ) = 0 “begins at rest” q(t 0 ) = q 0 “at position q 0 at time t 0 ” q(t 0 + 2) = q 1 “reaches position q 1 in 2 seconds” q˙(t 0 + 2) = 1 “final velocity of 1 radian/sec”.
Similarly, evaluating (4) at time t 0 , we see that a 1 = 0. The remaining coefficients, a 2 and a 3 will require more work. We can represent the trajectory constraints for (2) as a linear equation of the form Ax = b, namely
1 t 0 t^20 t^30 0 1 2 t 0 3 t^20 1 tf t^2 f t^3 f 0 1 2 tf 3 t^2 f
a 0 a 1 a 2 a 3
q(t 0 ) q˙(t 0 ) q(tf ) q˙(tf )
For our problem, using (3), Ax = b is
1 (t − t 0 ) (t − t 0 )^2 (t − t 0 )^3 0 1 2(t − t 0 ) 3(t − t 0 )^2 1 (tf − t 0 ) (tf − t 0 )^2 (tf − t 0 )^3 0 1 2(tf − t 0 ) 3(tf − t 0 )^2
a 0 a 1 a 2 a 3
q(t 0 ) q˙(t 0 ) q(tf ) q˙(tf )