<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hades.mech.northwestern.edu//index.php?action=history&amp;feed=atom&amp;title=ME_449_Assignment_1_%28Archive_2020%29</id>
	<title>ME 449 Assignment 1 (Archive 2020) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://hades.mech.northwestern.edu//index.php?action=history&amp;feed=atom&amp;title=ME_449_Assignment_1_%28Archive_2020%29"/>
	<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1_(Archive_2020)&amp;action=history"/>
	<updated>2026-04-10T02:48:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1_(Archive_2020)&amp;diff=26155&amp;oldid=prev</id>
		<title>Lynch: Created page with &quot;&#039;&#039;&#039;Introduction&#039;&#039;&#039;  In Chapter 4, we will study the forward kinematics  problem for open-chain robots: finding the configuration of the robot&#039;s end-effector &lt;math&gt;T_{sb}(\thet...&quot;</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1_(Archive_2020)&amp;diff=26155&amp;oldid=prev"/>
		<updated>2021-10-05T16:35:27Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;  In Chapter 4, we will study the forward kinematics  problem for open-chain robots: finding the configuration of the robot&amp;#039;s end-effector &amp;lt;math&amp;gt;T_{sb}(\thet...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In Chapter 4, we will study the forward kinematics  problem for open-chain robots: finding the configuration of the robot&amp;#039;s end-effector &amp;lt;math&amp;gt;T_{sb}(\theta) \in SE(3)&amp;lt;/math&amp;gt; given the vector of joint positions &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;.  The forward kinematics problem is easy to solve using a formula called the &amp;quot;product of exponentials,&amp;quot; which uses the matrix exponential of this chapter.  In this project, CoppeliaSim will solve the forward kinematics for you.&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to test your understanding of the matrix log for rotations, to give you a little practice using the MR library of functions, and to familiarize you with CoppeliaSim.&lt;br /&gt;
&lt;br /&gt;
You will submit &amp;#039;&amp;#039;&amp;#039;a single pdf file&amp;#039;&amp;#039;&amp;#039; to Canvas.  The file name should be FamilyName_GivenName_asst1.pdf (for me, it would be Lynch_Kevin_asst1.pdf).  You will have to concatenate all your responses into a single pdf file. &lt;br /&gt;
&lt;br /&gt;
All assignments will be graded based on correctness, how clearly you organize your homework (the grader should easily find all of your solutions), and how well you follow the instructions.  You will lose points if you don&amp;#039;t follow the instructions or if the assignment is difficult for the grader to grade.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 1: CoppeliaSim Simulation and Exploration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Open Scene 1 for interactive manipulation of the Universal Robots UR5 robot, a popular 6R robot. (You can go to the [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] to download Scene 1, or [http://hades.mech.northwestern.edu/index.php/Getting_Started_with_the_CoppeliaSim_Simulator this page] for a refresher on getting started with CoppeliaSim.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with two tabs:  &amp;quot;Enter Config and SE(3) Value&amp;quot; and &amp;quot;Joint Angle Sliders&amp;quot;. Go to the &amp;quot;Joint Angle Sliders&amp;quot; tab, move the sliders corresponding to the six joints, and watch how the robot moves.  Also try using the controls at the top of the window to zoom the camera in and out, pan the camera, etc.&lt;br /&gt;
&lt;br /&gt;
A CoppeliaSim scene may include [https://www.coppeliarobotics.com/helpFiles/en/objects.htm objects] (like [https://www.coppeliarobotics.com/helpFiles/en/shapes.htm shapes], [https://www.coppeliarobotics.com/helpFiles/en/joints.htm joints], or sensors) and one or more [https://www.coppeliarobotics.com/helpFiles/en/models.htm models].  A model consists of a number of objects connected to each other.  In this scene, for example, there is a model of a UR5 robot, which consists of a collection of [https://www.coppeliarobotics.com/helpFiles/en/joints.htm joints] connecting shapes (links), from the base out to the end-effector.&lt;br /&gt;
&lt;br /&gt;
A scene also includes a [https://www.coppeliarobotics.com/helpFiles/en/mainScript.htm main script], which handles the simulation loop.  At each simulation step, the main script calls (a) &amp;quot;actuation&amp;quot; functions that simulate the motion of the system and (b) &amp;quot;sensing&amp;quot; functions that simulate the sensors.  Generally this main script should not be edited. &lt;br /&gt;
&lt;br /&gt;
A scene also may include one or more [https://www.coppeliarobotics.com/helpFiles/en/childScripts.htm child scripts].  A child script can be threaded (which creates a new computation thread; this is generally discouraged) or non-threaded.  A non-threaded script defines the &amp;quot;actuation&amp;quot; and &amp;quot;sensing&amp;quot; functions for an object or model, and these functions are invoked by the main script at each simulation step.  More information can be found at Coppelia&amp;#039;s webpage on  [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm main and child scripts], the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual], and the [https://forum.coppeliarobotics.com/ CoppeliaSim forum].&lt;br /&gt;
&lt;br /&gt;
Make sure your scene 1 simulation is stopped so you can open up a script.  Click the &amp;quot;Scripts&amp;quot; button on the toolbar on the left side of the screen (shown below) to see the scripts being run by the scene.&lt;br /&gt;
&lt;br /&gt;
[[File:CoppeliaSim_scripts.PNG]]&lt;br /&gt;
&lt;br /&gt;
Double-click the &amp;quot;Non-threaded child script (UI_Script)&amp;quot; to open it.  You will see a script written in the Lua programming language.  Early in the file, you might notice that some functions look similar to functions written in the Modern Robotics Library. For example, &amp;#039;&amp;#039;so3andp2se3(R,p)&amp;#039;&amp;#039; in this script resembles &amp;#039;&amp;#039;RpToTrans(R,p)&amp;#039;&amp;#039; in the Modern Robotics Library.&lt;br /&gt;
&lt;br /&gt;
Scroll down to line 242.  From here to the end of the file, this code examines the type of &amp;quot;call&amp;quot; to the child script by the main script and performs the appropriate functions.  For example, if the sim_call_type is sim.syscb_init, the simulation has started and the user interface should be generated.  (There is a lot of XML code here defining the user interface.)  If the sim_call_type is sim.syscb_actuation, then the joint angles entered by the user in the UI are applied to the UR5 model, the UI is updated, and the transformation matrix for the end-effector is calculated.  If the sim_call_type is sim.syscb_sensing, nothing happens, and if it is sim.syscb_cleanup, the UI is destroyed as the simulation ends.&lt;br /&gt;
&lt;br /&gt;
The XML code for the UI starts on line 251. This XML code controls the appearance of the Custom UI, including the layout and content of text boxes, sliders, tab  titles, and font size. The XML syntax can be found at [https://www.coppeliarobotics.com/helpFiles/en/customUIPluginXMLSyntax.htm Custom UI Plugin XML Syntax]. For this specific scene, the different text boxes and sliders are arranged in different groups. Each group has a layout which determines how the objects inside the group will be displayed and label text which determines what text will be displayed and how it will be displayed.  If you&amp;#039;d like, you can consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Your task:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Modify the  non-threaded child script (UI_Script) to change an aspect of the  scene. For example, you can choose  to change  the Custom UI layout, change the titles and words of the Custom UI, or change  font sizes in the Custom UI. Some example changes include:&lt;br /&gt;
&lt;br /&gt;
*Changing the  layout: consult the XML syntax and change &amp;lt;group layout=&amp;quot;vbox&amp;quot;&amp;gt; to another type (hbox,form, grid,  none). Using line 257, changing &amp;lt;group layout=&amp;quot;vbox&amp;quot;&amp;gt; to &amp;lt;group layout=&amp;quot;hbox&amp;quot;&amp;gt; changes the  orientation of the items in the  group containing &amp;quot;Configuration Entry&amp;quot;, &amp;quot;Current configuration&amp;quot;, and &amp;quot;Messages&amp;quot; on the  &amp;quot;Enter Config and SE(3) Value&amp;quot; tab of the Custom UI from vertically arranged to horizontal.&lt;br /&gt;
&lt;br /&gt;
*Changing the  words: Find the text you want to change in the XML code. The text will be surrounded by quotation marks and have &amp;lt;nowiki&amp;gt;&amp;lt;big&amp;gt; and &amp;lt;/big&amp;gt;&amp;lt;/nowiki&amp;gt; on its sides. For example, &amp;lt;nowiki&amp;gt;line 258 &amp;quot;label text=&amp;quot;&amp;lt;big&amp;gt; Configuration Entry:&amp;lt;/big&amp;gt;&amp;quot;&amp;lt;/nowiki&amp;gt; controls the  text &amp;quot;Configuration Entry&amp;quot; on the &amp;quot;Enter Config and SE(3) Value&amp;quot; tab of the Custom UI. Change the words &amp;quot;Configuration Entry&amp;quot; to change the text displayed in that specific section.&lt;br /&gt;
&lt;br /&gt;
*Changing the font: Using line 258 &amp;lt;nowiki&amp;gt;label text=&amp;quot;&amp;lt;big&amp;gt;Configuration  Entry:&amp;lt;/big&amp;gt;&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
**The font can be changed to small  using: &amp;lt;nowiki&amp;gt;label text=&amp;quot;&amp;lt;small&amp;gt;Configuration Entry:&amp;lt;/small&amp;gt;&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
** The font can be changed to a specific size using: &amp;lt;nowiki&amp;gt;label text=&amp;quot;&amp;lt;font size=20&amp;gt;Configuration Entry:&amp;lt;/font&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;quot;, where 20 is the desired font size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Your submission should be a screenshot of the original scene and then a screenshot that shows what was changed. Additionally, you should include a screenshot of the code you modified. For example, if you change the font size of the text in the Custom UI, you would include a screenshot of the Custom UI before any changes were made, a screenshot of the Custom UI with the font size change, and a screenshot of the XML code where you made the modification.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 2: Joint Angle Calculations&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The 6R UR5 robot is shown below at its home configuration. Eight frames are defined:  the fixed frame {s} at the base, frames {1} through {6} attached to links 1 through 6, and the end-effector frame {b} which is fixed relative to link 6.  (The frame {b} is not shown in the image.)  The red arrow is the x-axis, the green arrow is the y-axis, and the blue arrow is the z-axis.  Frames {s} and {1}-{6} are aligned when the robot is at its home configuration, i.e., each rotation matrix &amp;lt;math&amp;gt;R_{ij}&amp;lt;/math&amp;gt; (where &amp;lt;math&amp;gt;i, j&amp;lt;/math&amp;gt; could be &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; or any number 1 through 6) is the identity matrix.  &lt;br /&gt;
&lt;br /&gt;
[[File:UR5 Home.PNG]]&lt;br /&gt;
&lt;br /&gt;
The rotation axes for joint &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, defined in frame {&amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;}, are &amp;lt;math&amp;gt;\hat{\omega}_1 =(0,0,1), \hat{\omega}_2 = \hat{\omega}_3 = \hat{\omega}_4 = \hat{\omega}_6 = (0,1,0), \hat{\omega}_5 = (0,0,-1)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For some set of joint angles &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt;, we have the following relations between the orientations of the joint frames:&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;13&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = [[0, 0, -1]; [0, 1, 0]; [1, 0, 0]]&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;s2&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = [[0, -1, 0]; [-0.5, 0, -0.866]; [0.866, 0, -0.5]]&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;15&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = [[-0.3536, -0.3536, 0.866]; [-0.7071, 0.7071, 0]; [-0.6124, -0.6124, -0.5]]&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;12&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = [[-0.5, 0, -0.866]; [0, 1, 0]; [0.866, 0, -0.5]]&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;34&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = [[-0.866, 0, -0.5]; [0, 1, 0]; [0.5, 0, -0.866]]&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;s6&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = [[-0.3536, -0.7071, 0.6124]; [-0.5732, -0.3536, -0.7392]; [0.7392, -0.6124, -0.2803]]&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;6b&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = [[-1, 0, 0]; [0, 0, 1]; [0, 1, 0]]&lt;br /&gt;
&lt;br /&gt;
where {b} is the end-effector frame not shown in the figure. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Your task:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* Find the six-vector of joint angles &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; given the &amp;lt;math&amp;gt;R_{ij}&amp;lt;/math&amp;gt; above.  (You will likely want to calculate the rotation matrices &amp;lt;math&amp;gt;R_{i,i+1}&amp;lt;/math&amp;gt; and use the MR code library, e.g., MatrixLog3.)&lt;br /&gt;
* Enter the joint angles you found into Scene1_UR5 in CoppeliaSim to see the configuration of the robot.  &lt;br /&gt;
* Calculate &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;sb&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; using the information given, and verify that your joint angle vector &amp;lt;math&amp;gt;\theta&amp;lt;/math&amp;gt; is correct by entering the joint angles into the scene and comparing your &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;sb&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; to the rotation matrix portion of the &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;sb&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; calculated by the scene under the &amp;quot;Enter Config and SE(3) Value&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;What to turn in to Canvas:&amp;#039;&amp;#039;&amp;#039; A single pdf file.  The file name should be FamilyName_GivenName_asst1.pdf (for me, it would be Lynch_Kevin_asst1.pdf).  This file should have:&lt;br /&gt;
* The list of the six joint angles you calculated and a brief explanation of the method (including the MR code) you used to calculate them. &lt;br /&gt;
* A screenshot of the scene, clearly showing the modified UI, the SE(3) calculation, and the robot at the correct configuration.  &lt;br /&gt;
* A screenshot of your changed code in the child script.  Explain what you changed about the scene/UI.  (A small change suffices.)&lt;br /&gt;
&lt;br /&gt;
If you do not know how to take a screenshot, you can use one of the following:  &lt;br /&gt;
*&amp;#039;&amp;#039;Mac&amp;#039;&amp;#039;: Cmd-Shift-3 and look for the screenshot on your desktop.  &lt;br /&gt;
*&amp;#039;&amp;#039;Windows&amp;#039;&amp;#039;: Use the PrtScn button (or Windows Key + PrtScn or Alt _ PrtScn, etc.). You can also search for the Snipping Tool. &lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;/div&gt;</summary>
		<author><name>Lynch</name></author>
	</entry>
</feed>