$30
COMP 417
Assignment 1: Kinematics and Path Planning
Submission Instructions:
Prepare your answers as a single PDF file. You don’t have to re-produce these questions, just
start each answer as 1., 2., 3.a) etc, and then state your response. It’s OK to write with pen and
paper and scan/take photos, but then please merge those into a PDF using Word/GoogleDocs
etc. You could also type your answers using any online tool you like. Hand-in on My Courses.
There will be roughly 100 points on Assignments over the full term. A1 is worth 12.
Question #1: 2D Rotation Transform (3 points)
In the lectures, we stated a matrix form to express the kinematics of a body rotating in 2D
about the ICC with rotation rate 𝜔 radians per second for 𝛿𝑡 seconds is:
𝑥(𝑡 + 1) = 𝑅(𝜔𝛿𝑡)𝑥(𝑡) + [
0
0
𝜔𝛿𝑡
]
Where the state vector, x, has 3 components:
𝑥(𝑡) = [
𝑥
𝑦
𝜃
]
The 3x3 “rotation matrix” 𝑅(𝜙) that represents the change in x,y position after rotating 𝜙
radians about the ICC is:
𝑅(𝜙) = [
cos(𝜙) −sin(𝜙) 0
sin(𝜙) cos(𝜙) 0
0 0 1
]
Explain in words, with back-up from drawings or math where possible why this is correct.
Hint: there are many good explanations for this online (e.g., the recommended text, Wikipedia,
and hundreds more). You may use any of these resources to inform yourself. This question is
mainly just to prompt you to spend some time reading/thinking on this topic if you’ve not seen
it before. Once you find an explanation that makes sense to you, try to re-state it in your own
words to make sure you really understood.
For challenge/honor: First try to derive this yourself from basic geometry without help!
Question #2: Forward and Inverse Kinematics (4 points)
Consider the two-link arm above that operates in the 2D plane defined by this page. Assuming:
• the origin of the global frame is at the arm’s anchor point with the table (thicker blue
rectangle), with y-axis upwards and x-axis pointing to the right,
• the arm has one motor in each joint (indexed by theta one and two as shown),
• the joint angles have zero angles for their respective theta when the arm is straight
upwards,
• the joints have limits,
o the first link cannot rotate through the table (max 𝜃1 =
𝜋
2
, min 𝜃1 =
−𝜋
2
),
o the second link cannot rotate through the first link (max 𝜃2 = 𝜋, min 𝜃2 = −𝜋),
• collisions are not allowed (the arm cannot poke into or through the table),
• the tasks all involve the end-effector, that is the orange/yellow ball at the end of the
arm, and
• each “link” in the arm has length one.
Write the:
a) state space,
b) action space,
c) forward kinematics function and,
d) inverse kinematics function
for this robot. For spaces, use vector notation. For the functions, give the “specs” (return value
and function arguments), as well as pseudo-code or some simple equations for the function
body.
Recommended reference: The recommended textbooks by Craig (starting from Chapter 2
onwards) or Lavalle (Chapter 3).
𝜃2
𝜃1
Question #3: Choose the Algorithm (5 points)
Consider the map and plan shown here, with green
indicating start, red indicating end, the blue line
showing the states along the path and the
black/white background showing free space and
obstacles in the map.
Could this path have been produced by:
a) The Bug #1 Algorithm (with right-hand rule)?
b)The Bug #2 Algorithm (with right-hand rule)?
c) Dijkstra’s algorithm?
d)The A* algorithm?
e) The RRT algorithm?
For each, briefly state (in 1-2 key sentences, maybe a quick sketch) why you believe the planner
is (or is not) likely to be the source of this path. Note, we’ll cover RRTs on Tuesday Sept 22nd
.
The Lecture 5 slides are already posted for you to read about this method, or else you can wait
one day to be able to answer this question.
Recommended reference: I hope you can do this one from the course notes and lectures.