<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hades.mech.northwestern.edu//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LinLiu</id>
	<title>Mech - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://hades.mech.northwestern.edu//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LinLiu"/>
	<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php/Special:Contributions/LinLiu"/>
	<updated>2026-04-21T23:33:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25929</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25929"/>
		<updated>2020-10-01T02:35:47Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, 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 2 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.&lt;br /&gt;
&lt;br /&gt;
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;
The main script and any child scripts will be displayed. There is a default main script that controls the simulation loop, and this main script should not be edited.  At each simulation step, the main script calls (1) &amp;quot;actuation&amp;quot; functions that simulate the motion of the system and (2) &amp;quot;sensing&amp;quot; functions that simulate the sensors. &lt;br /&gt;
&lt;br /&gt;
Each object in the scene has an associated child script. The child script contains actuation and sensing functions for the object, written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that are called by the main script.  A threaded child script creates a new computation thread, and threaded child scripts are typically discouraged relative to non-threaded scripts that are controlled by the main script.  &lt;br /&gt;
&lt;br /&gt;
More information can be found at Coppelia&amp;#039;s webpage on  [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm main and child scripts]. &lt;br /&gt;
&lt;br /&gt;
Note that the simulation must be stopped before you can open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts control the simulation.&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;#039;&amp;#039;&amp;#039;Your submission will include a screenshot of the changed UI and a screenshot of the changed code in the script.&amp;#039;&amp;#039;&amp;#039;&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;
&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. Seven frames are defined:  the fixed frame {s} at the base and frames {1} through {6} on links 1 through 6.  The red arrow is the x-axis, the green arrow is the y-axis, and the blue arrow is the z-axis.  All frames 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;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds to an end-effector frame fixed relative to link 6 and is 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 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;.  (Use the MR 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;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify your results (including your joint angles) are correct by comparing to &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&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;
* Your list of the six joint angles you calculated.  &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.  &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>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25926</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25926"/>
		<updated>2020-10-01T02:32:34Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, 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. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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.&lt;br /&gt;
&lt;br /&gt;
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;
The main script and any child scripts will be displayed. There is a default main script that controls the simulation loop, and this main script should not be edited.  At each simulation step, the main script calls (1) &amp;quot;actuation&amp;quot; functions that simulate the motion of the system and (2) &amp;quot;sensing&amp;quot; functions that simulate the sensors. &lt;br /&gt;
&lt;br /&gt;
Each object in the scene has an associated child script. The child script contains actuation and sensing functions for the object, written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that are called by the main script.  A threaded child script creates a new computation thread, and threaded child scripts are typically discouraged relative to non-threaded scripts that are controlled by the main script.  &lt;br /&gt;
&lt;br /&gt;
More information can be found at Coppelia&amp;#039;s webpage on  [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm main and child scripts]. &lt;br /&gt;
&lt;br /&gt;
Note that the simulation must be stopped before you can open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts control the simulation.&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;#039;&amp;#039;&amp;#039;Your submission will include a screenshot of the changed UI and a screenshot of the changed code in the script.&amp;#039;&amp;#039;&amp;#039;&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;
&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. Seven frames are defined:  the fixed frame {s} at the base and frames {1} through {6} on links 1 through 6.  The red arrow is the x-axis, the green arrow is the y-axis, and the blue arrow is the z-axis.  All frames 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;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds to an end-effector frame fixed relative to link 6 and is 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 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;.  (Use the MR 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;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify your results (including your joint angles) are correct by comparing to &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&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;
* Your list of the six joint angles you calculated.  &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.  &lt;br /&gt;
&lt;br /&gt;
If you do not know how to take a screenshot, you can use one of the following:  &amp;#039;&amp;#039;Mac&amp;#039;&amp;#039;: Cmd-Shift-3 and look for the screenshot on your desktop.  &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. &amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25924</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25924"/>
		<updated>2020-10-01T02:32:05Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, 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. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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.&lt;br /&gt;
&lt;br /&gt;
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;
The main script and any child scripts will be displayed. There is a default main script that controls the simulation loop, and this main script should not be edited.  At each simulation step, the main script calls (1) &amp;quot;actuation&amp;quot; functions that simulate the motion of the system and (2) &amp;quot;sensing&amp;quot; functions that simulate the sensors. &lt;br /&gt;
&lt;br /&gt;
Each object in the scene has an associated child script. The child script contains actuation and sensing functions for the object, written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that are called by the main script.  A threaded child script creates a new computation thread, and threaded child scripts are typically discouraged relative to non-threaded scripts that are controlled by the main script.  &lt;br /&gt;
&lt;br /&gt;
More information can be found at Coppelia&amp;#039;s webpage on  [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm main and child scripts]. &lt;br /&gt;
&lt;br /&gt;
Note that the simulation must be stopped before you can open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts control the simulation.&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;
```Your submission will include a screenshot of the changed UI and a screenshot of the changed code in the script.```&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;
&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. Seven frames are defined:  the fixed frame {s} at the base and frames {1} through {6} on links 1 through 6.  The red arrow is the x-axis, the green arrow is the y-axis, and the blue arrow is the z-axis.  All frames 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;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds to an end-effector frame fixed relative to link 6 and is 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 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;.  (Use the MR 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;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify your results (including your joint angles) are correct by comparing to &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&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:&amp;#039;&amp;#039;&amp;#039; Your list of the six joint angles you calculated.  A screenshot of the scene, clearly showing the modified UI, the SE(3) calculation, and the robot at the correct configuration.  A screenshot of your changed code in the child script.  &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;
&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;
&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;
&lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25923</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25923"/>
		<updated>2020-10-01T02:30:35Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, 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. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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.&lt;br /&gt;
&lt;br /&gt;
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;
The main script and any child scripts will be displayed. There is a default main script that controls the simulation loop, and this main script should not be edited.  At each simulation step, the main script calls (1) &amp;quot;actuation&amp;quot; functions that simulate the motion of the system and (2) &amp;quot;sensing&amp;quot; functions that simulate the sensors. &lt;br /&gt;
&lt;br /&gt;
Each object in the scene has an associated child script. The child script contains actuation and sensing functions for the object, written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that are called by the main script.  A threaded child script creates a new computation thread, and threaded child scripts are typically discouraged relative to non-threaded scripts that are controlled by the main script.  &lt;br /&gt;
&lt;br /&gt;
More information can be found at Coppelia&amp;#039;s webpage on  [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm main and child scripts]. &lt;br /&gt;
&lt;br /&gt;
Note that the simulation must be stopped before you can open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts control the simulation.&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;
Your submission will include a screenshot of the changed UI and a screenshot of the changed code in the script.&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;
&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. Seven frames are defined:  the fixed frame {s} at the base and frames {1} through {6} on links 1 through 6.  The red arrow is the x-axis, the green arrow is the y-axis, and the blue arrow is the z-axis.  All frames 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;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds to an end-effector frame fixed relative to link 6 and is 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 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;.  (Use the MR 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;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify your results (including your joint angles) are correct by comparing to &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&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:&amp;#039;&amp;#039;&amp;#039; Your list of the six joint angles you calculated.  A screenshot of the scene, clearly showing the modified UI, the SE(3) calculation, and the robot at the correct configuration.  A screenshot of your changed code in the child script.  &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;
&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;
&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;
&lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25922</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25922"/>
		<updated>2020-10-01T02:28:38Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, 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. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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.&lt;br /&gt;
&lt;br /&gt;
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;
The main script and any child scripts will be displayed. There is a default main script that controls the simulation loop, and this main script should not be edited.  At each simulation step, the main script calls (1) &amp;quot;actuation&amp;quot; functions that simulate the motion of the system and (2) &amp;quot;sensing&amp;quot; functions that simulate the sensors. &lt;br /&gt;
&lt;br /&gt;
Each object in the scene has an associated child script. The child script contains actuation and sensing functions for the object, written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that are called by the main script.  A threaded child script creates a new computation thread, and threaded child scripts are typically discouraged relative to non-threaded scripts that are controlled by the main script.  &lt;br /&gt;
&lt;br /&gt;
More information can be found at Coppelia&amp;#039;s webpage on  [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm main and child scripts]. &lt;br /&gt;
&lt;br /&gt;
Note that the simulation must be stopped before you can open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts control the simulation.&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;quot;&amp;lt;big&amp;gt; and &amp;lt;/big&amp;gt;&amp;quot; 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;
Your submission will include a screenshot of the changed UI and a screenshot of the changed code in the script.&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;
&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. Seven frames are defined:  the fixed frame {s} at the base and frames {1} through {6} on links 1 through 6.  The red arrow is the x-axis, the green arrow is the y-axis, and the blue arrow is the z-axis.  All frames 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;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds to an end-effector frame fixed relative to link 6 and is 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 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;.  (Use the MR 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;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify your results (including your joint angles) are correct by comparing to &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&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:&amp;#039;&amp;#039;&amp;#039; Your list of the six joint angles you calculated.  A screenshot of the scene, clearly showing the modified UI, the SE(3) calculation, and the robot at the correct configuration.  A screenshot of your changed code in the child script.  &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;
&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;
&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;
&lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25918</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25918"/>
		<updated>2020-10-01T02:22:43Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, we will address 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 yourself 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 your assignment is not obvious 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. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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.&lt;br /&gt;
&lt;br /&gt;
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;
The main script and any child scripts will be displayed. There is a default main script that controls the simulation loop, and this main script should not be edited.  At each simulation step, the main script calls (1) &amp;quot;actuation&amp;quot; functions that simulate the motion of the system and (2) &amp;quot;sensing&amp;quot; functions that simulate the sensors. &lt;br /&gt;
&lt;br /&gt;
Each object in the scene has an associated child script. The child script contains actuation and sensing functions for the object, written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that are called by the main script.  A threaded child script creates a new computation thread, and threaded child scripts are typically discouraged relative to non-threaded scripts that are controlled by the main script.  &lt;br /&gt;
&lt;br /&gt;
More information can be found at Coppelia&amp;#039;s webpage on  [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm main and child scripts]. &lt;br /&gt;
&lt;br /&gt;
Note that the simulation must be stopped before you can open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts run the  simulation.&lt;br /&gt;
&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;big&amp;gt; and &amp;lt;/big&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;#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;
&lt;br /&gt;
&lt;br /&gt;
You should use the screenshot command appropriate for your operating system:&lt;br /&gt;
&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;
&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;
&lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;br /&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. Seven frames are defined:  the fixed frame {s} at the base and frames {1} through {6} on links 1 through 6.  The red arrow is the x-axis, the green arrow is the y-axis, and the blue arrow is the z-axis.  All frames 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.  &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, you know 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;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Lin:  I got rid of any reference to an undrawn frame {e}.  I want to leave it out.  Please check that everything still works.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds to the end-effector frame and is not shown in the figure.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Use the MR library, e.g., MatrixLog3, to find the six joint angles.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* Find the joint angles in this  configuration.&lt;br /&gt;
** Hint: A joint angle corresponds to the orientation of one joint frame with respect to the orientation of the previous joint frame.&lt;br /&gt;
* Input the joint angles you found into Scene1_UR5 in CoppeliaSim and take a screenshot of the robot at that configuration.&lt;br /&gt;
* Find &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify  your result by  comparing it with the  given  &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; under the &amp;quot;Enter Config and SE(3) Value&amp;quot; tab.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25917</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25917"/>
		<updated>2020-10-01T02:22:07Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, we will address 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 yourself 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 your assignment is not obvious for the grader to grade.&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. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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.&lt;br /&gt;
&lt;br /&gt;
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;
The main script and any child scripts will be displayed. There is a default main script that controls the simulation loop, and this main script should not be edited.  At each simulation step, the main script calls (1) &amp;quot;actuation&amp;quot; functions that simulate the motion of the system and (2) &amp;quot;sensing&amp;quot; functions that simulate the sensors. &lt;br /&gt;
&lt;br /&gt;
Each object in the scene has an associated child script. The child script contains actuation and sensing functions for the object, written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that are called by the main script.  A threaded child script creates a new computation thread, and threaded child scripts are typically discouraged relative to non-threaded scripts that are controlled by the main script.  &lt;br /&gt;
&lt;br /&gt;
More information can be found at Coppelia&amp;#039;s webpage on  [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm main and child scripts]. &lt;br /&gt;
&lt;br /&gt;
Note that the simulation must be stopped before you can open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts run the  simulation.&lt;br /&gt;
&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;big&amp;gt; and &amp;lt;/big&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;#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;
&lt;br /&gt;
&lt;br /&gt;
You should use the screenshot command appropriate for your operating system:&lt;br /&gt;
&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;
&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;
&lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;br /&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. Seven frames are defined:  the fixed frame {s} at the base and frames {1} through {6} on links 1 through 6.  The red arrow is the x-axis, the green arrow is the y-axis, and the blue arrow is the z-axis.  All frames 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.  &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, you know 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;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Lin:  I got rid of any reference to an undrawn frame {e}.  I want to leave it out.  Please check that everything still works.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds to the end-effector frame and is not shown in the figure.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Use the MR library, e.g., MatrixLog3, to find the six joint angles.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* Find the joint angles in this  configuration.&lt;br /&gt;
** Hint: A joint angle corresponds to the orientation of one joint frame with respect to the orientation of the previous joint frame.&lt;br /&gt;
* Input the joint angles you found into Scene1_UR5 in CoppeliaSim and take a screenshot of the robot at that configuration.&lt;br /&gt;
* Find &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify  your result by  comparing it with the  given  &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; under the &amp;quot;Enter Config and SE(3) Value&amp;quot; tab.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25901</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25901"/>
		<updated>2020-09-30T15:14:06Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, we will address the forward kinematics  problem for open-chain robots: finding the configuration of the robot&amp;#039;s end-effector in &amp;#039;&amp;#039;T(0) ∈ SE(3)&amp;#039;&amp;#039; given the vector of joint positions.&lt;br /&gt;
&lt;br /&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.&lt;br /&gt;
&lt;br /&gt;
In this rather simple project, you will let the robot simulation software CoppeliaSim solve the forward kinematics for you. The goal of this project is to gain familiarity with CoppeliaSim and to confirm its calculation of the forward kinematics by visual inspection. You will submit a screenshot of the UR5 robot at a specific configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Review Criteria&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The assignment consists  of the following:&lt;br /&gt;
* A screenshot of the robot at its  final configuration.&lt;br /&gt;
* A list of reported joint angles.&lt;br /&gt;
* A list of rotation matrices giving the orientation of each joint relative to the previous joint (&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;s1&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;12&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;23&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, etc.)&lt;br /&gt;
* Reported value of &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; (Rotation matrix giving the orientation of end-effector frame {&amp;#039;&amp;#039;e&amp;#039;&amp;#039;} relative to the world frame {&amp;#039;&amp;#039;s&amp;#039;&amp;#039;}.&lt;br /&gt;
* Screenshots of the CoppeliaSim UI modifications you performed.&lt;br /&gt;
&lt;br /&gt;
All reported values should be in a single pdf. This pdf  and all screenshots should be submitted in a &amp;#039;&amp;#039;&amp;#039;SINGLE&amp;#039;&amp;#039;&amp;#039; .zip file labeled &amp;quot;lastname_firstname_assignment1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 1: Joint Angle Calculations&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The UR5 robot in its home configuration is shown. When all of its joints are at 0°, the frames located at the joints and the world frame are parallel (i.e. &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;ij&amp;lt;/sub&amp;gt; = I; j ∈ {s,1,2,3,4,5,6}&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
[[File:UR5 Home.PNG]]&lt;br /&gt;
&lt;br /&gt;
The rotation axes of each joint in their own coordinate frames are as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;2&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;3&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;4&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;5&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,-1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;6&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At an unkown configuration, the following relations between the joint frames are given:&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&amp;gt;,{-.5,0,-.866},{.866,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; = {{-.3536,-.3536,.866},{-.7071,.7071,0},{-.6124,-.6124,-.5}}&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;12&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = {{-.5,0,-.866},{0,1,0},{.866,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; = {{-.866,0,-.5},{0,1,0},{.5,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; = {{-.3536,-.7071,.6124},{-.5732, -.3536,-.7392},{.866,0,-.5}}&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds tothe end-effector frame and is not shown in the figure.&lt;br /&gt;
&lt;br /&gt;
* Find the joint angles in this  configuration.&lt;br /&gt;
** Hint: A joint angle corresponds to the orientation of one joint with respect to the orientation of the previous joint.&lt;br /&gt;
* Input the joint angles you found into Scene1_UR5 in CoppeliaSim and take a screenshot of the robot at that configuration.&lt;br /&gt;
* Find &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify  your result by  comparing it with the  given  &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; under the &amp;quot;Enter Config and SE(3) Value&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 2: CoppeliaSim Simulation and Exploration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Open the CoppeliaSim scene for interactive manipulation of the Universal Robots UR5 robot, a popular 6-joint robot. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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 6 joints and watch how the robot moves.&lt;br /&gt;
&lt;br /&gt;
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;
The Main script and  any child scripts will be displayed. There is a default main script that contains  the basic code the simulation needs to run and usually doesn&amp;#039;t need to be edited. The main script contains the  simulation&amp;#039;s loop code. Each object in the scene has an  associated child script. The child script is typically used to control the model and contains functions written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that happen every step in the simulation. Threaded child scripts  contain system callback functions that are called once at the beginning of the  simulation. Non-threaded child scripts are preferred over threaded since threaded child scripts are more resource-intensive, can waste some processing time, and can be less responsive to the simulation stop command. For more details on non-threaded and threaded child scripts, see [https://www.coppeliarobotics.com/helpFiles/en/childScripts.htm Child Scripts].&lt;br /&gt;
&lt;br /&gt;
For more information about the main script and child scripts, see [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm Main  and Child Scripts]. The simulation must be stopped before you can make any edits to or open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child  script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts run the  simulation.&lt;br /&gt;
&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;big&amp;gt; and &amp;lt;/big&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;#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;
&lt;br /&gt;
&lt;br /&gt;
You should use the screenshot command appropriate for your operating system:&lt;br /&gt;
&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;
&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;
&lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25900</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25900"/>
		<updated>2020-09-30T15:13:21Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, we will address the forward kinematics  problem for open-chain robots: finding the configuration of the robot&amp;#039;s end-effector in &amp;#039;&amp;#039;T(0) ∈ SE(3)&amp;#039;&amp;#039; given the vector of joint positions.&lt;br /&gt;
&lt;br /&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.&lt;br /&gt;
&lt;br /&gt;
In this rather simple project, you will let the robot simulation software CoppeliaSim solve the forward kinematics for you. The goal of this project is to gain familiarity with CoppeliaSim and to confirm its calculation of the forward kinematics by visual inspection. You will submit a screenshot of the UR5 robot at a specific configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Review Criteria&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The assignment consists  of the following:&lt;br /&gt;
* A screenshot of the robot at its  final configuration.&lt;br /&gt;
* A list of reported joint angles.&lt;br /&gt;
* A list of rotation matrices giving the orientation of each joint relative to the previous joint (&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;s1&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;12&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;23&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, etc.)&lt;br /&gt;
* Reported value of &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; (Rotation matrix giving the orientation of end-effector frame {&amp;#039;&amp;#039;e&amp;#039;&amp;#039;} relative to the world frame {&amp;#039;&amp;#039;s&amp;#039;&amp;#039;}.&lt;br /&gt;
* Screenshots of the CoppeliaSim UI modifications you performed.&lt;br /&gt;
&lt;br /&gt;
All reported values should be in a single pdf. This pdf  and all screenshots should be submitted in a &amp;#039;&amp;#039;&amp;#039;SINGLE&amp;#039;&amp;#039;&amp;#039; .zip file labeled &amp;quot;lastname_firstname_assignment1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 1: Joint Angle Calculations&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The UR5 robot in its home configuration is shown. When all of its joints are at 0°, the frames located at the joints and the world frame are parallel (i.e. &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;ij&amp;lt;/sub&amp;gt; = I; j ∈ {s,1,2,3,4,5,6}&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
[[File:UR5 Home.PNG]]&lt;br /&gt;
&lt;br /&gt;
The rotation axes of each joint in their own coordinate frames are as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;2&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;3&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;4&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;5&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,-1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;6&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At an unkown configuration, the following relations between the joint frames are given:&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&amp;gt;,{-.5,0,-.866},{.866,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; = {{-.3536,-.3536,.866},{-.7071,.7071,0},{-.6124,-.6124,-.5}}&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;12&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = {{-.5,0,-.866},{0,1,0},{.866,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; = {{-.866,0,-.5},{0,1,0},{.5,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; = {{-.3536,-.7071,.6124},{-.5732, -.3536,-.7392},{.866,0,-.5}}&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds tothe end-effector frame and is not shown in the figure.&lt;br /&gt;
&lt;br /&gt;
* Find the joint angles in this  configuration.&lt;br /&gt;
** Hint: A joint angle corresponds to the orientation of one joint with respect to the orientation of the previous joint.&lt;br /&gt;
* Input the joint angles you found into Scene1_UR5 in CoppeliaSim and take a screenshot of the robot at that configuration.&lt;br /&gt;
* Find &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify  your result by  comparing it with the  given  &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; under the &amp;quot;Enter Config and SE(3) Value&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 2: CoppeliaSim Simulation and Exploration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Open the CoppeliaSim scene for interactive manipulation of the Universal Robots UR5 robot, a popular 6-joint robot. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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 6 joints and watch how the robot moves.&lt;br /&gt;
&lt;br /&gt;
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;
The Main script and  any child scripts will be displayed. There is a default main script that contains  the basic code the simulation needs to run and usually doesn&amp;#039;t need to be edited. The main script contains the  simulation&amp;#039;s loop code. Each object in the scene has an  associated child script. The child script is typically used to control the model and contains functions written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that happen every step in the simulation. Threaded child scripts  contain system callback functions that are called once at the beginning of the  simulation. Non-threaded child scripts are preferred over threaded since threaded child scripts are more resource-intensive, can waste some processing time, and can be less responsive to the simulation stop command. For more details on non-threaded and threaded child scripts, see [https://www.coppeliarobotics.com/helpFiles/en/childScripts.htm Child Scripts].&lt;br /&gt;
&lt;br /&gt;
For more information about the main script and child scripts, see [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm Main  and Child Scripts]. The simulation must be stopped before you can make any edits to or open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child  script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts run the  simulation.&lt;br /&gt;
&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;big&amp;gt; and &amp;lt;/big&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;, where 20 is the desired font size.&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
You should use the screenshot command appropriate for your operating system:&lt;br /&gt;
&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;
&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;
&lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25899</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25899"/>
		<updated>2020-09-30T15:12:38Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, we will address the forward kinematics  problem for open-chain robots: finding the configuration of the robot&amp;#039;s end-effector in &amp;#039;&amp;#039;T(0) ∈ SE(3)&amp;#039;&amp;#039; given the vector of joint positions.&lt;br /&gt;
&lt;br /&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.&lt;br /&gt;
&lt;br /&gt;
In this rather simple project, you will let the robot simulation software CoppeliaSim solve the forward kinematics for you. The goal of this project is to gain familiarity with CoppeliaSim and to confirm its calculation of the forward kinematics by visual inspection. You will submit a screenshot of the UR5 robot at a specific configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Review Criteria&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The assignment consists  of the following:&lt;br /&gt;
* A screenshot of the robot at its  final configuration.&lt;br /&gt;
* A list of reported joint angles.&lt;br /&gt;
* A list of rotation matrices giving the orientation of each joint relative to the previous joint (&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;s1&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;12&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;23&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, etc.)&lt;br /&gt;
* Reported value of &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; (Rotation matrix giving the orientation of end-effector frame {&amp;#039;&amp;#039;e&amp;#039;&amp;#039;} relative to the world frame {&amp;#039;&amp;#039;s&amp;#039;&amp;#039;}.&lt;br /&gt;
* Screenshots of the CoppeliaSim UI modifications you performed.&lt;br /&gt;
&lt;br /&gt;
All reported values should be in a single pdf. This pdf  and all screenshots should be submitted in a &amp;#039;&amp;#039;&amp;#039;SINGLE&amp;#039;&amp;#039;&amp;#039; .zip file labeled &amp;quot;lastname_firstname_assignment1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 1: Joint Angle Calculations&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The UR5 robot in its home configuration is shown. When all of its joints are at 0°, the frames located at the joints and the world frame are parallel (i.e. &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;ij&amp;lt;/sub&amp;gt; = I; j ∈ {s,1,2,3,4,5,6}&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
[[File:UR5 Home.PNG]]&lt;br /&gt;
&lt;br /&gt;
The rotation axes of each joint in their own coordinate frames are as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;2&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;3&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;4&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;5&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,-1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;6&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At an unkown configuration, the following relations between the joint frames are given:&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&amp;gt;,{-.5,0,-.866},{.866,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; = {{-.3536,-.3536,.866},{-.7071,.7071,0},{-.6124,-.6124,-.5}}&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;12&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = {{-.5,0,-.866},{0,1,0},{.866,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; = {{-.866,0,-.5},{0,1,0},{.5,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; = {{-.3536,-.7071,.6124},{-.5732, -.3536,-.7392},{.866,0,-.5}}&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds tothe end-effector frame and is not shown in the figure.&lt;br /&gt;
&lt;br /&gt;
* Find the joint angles in this  configuration.&lt;br /&gt;
** Hint: A joint angle corresponds to the orientation of one joint with respect to the orientation of the previous joint.&lt;br /&gt;
* Input the joint angles you found into Scene1_UR5 in CoppeliaSim and take a screenshot of the robot at that configuration.&lt;br /&gt;
* Find &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify  your result by  comparing it with the  given  &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; under the &amp;quot;Enter Config and SE(3) Value&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 2: CoppeliaSim Simulation and Exploration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Open the CoppeliaSim scene for interactive manipulation of the Universal Robots UR5 robot, a popular 6-joint robot. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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 6 joints and watch how the robot moves.&lt;br /&gt;
&lt;br /&gt;
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;
The Main script and  any child scripts will be displayed. There is a default main script that contains  the basic code the simulation needs to run and usually doesn&amp;#039;t need to be edited. The main script contains the  simulation&amp;#039;s loop code. Each object in the scene has an  associated child script. The child script is typically used to control the model and contains functions written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that happen every step in the simulation. Threaded child scripts  contain system callback functions that are called once at the beginning of the  simulation. Non-threaded child scripts are preferred over threaded since threaded child scripts are more resource-intensive, can waste some processing time, and can be less responsive to the simulation stop command. For more details on non-threaded and threaded child scripts, see [https://www.coppeliarobotics.com/helpFiles/en/childScripts.htm Child Scripts].&lt;br /&gt;
&lt;br /&gt;
For more information about the main script and child scripts, see [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm Main  and Child Scripts]. The simulation must be stopped before you can make any edits to or open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child  script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts run the  simulation.&lt;br /&gt;
&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;big&amp;gt; and &amp;lt;/big&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; table 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;, where 20 is the desired font size.&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
You should use the screenshot command appropriate for your operating system:&lt;br /&gt;
&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;
&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;
&lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25898</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25898"/>
		<updated>2020-09-30T15:11:48Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, we will address the forward kinematics  problem for open-chain robots: finding the configuration of the robot&amp;#039;s end-effector in &amp;#039;&amp;#039;T(0) ∈ SE(3)&amp;#039;&amp;#039; given the vector of joint positions.&lt;br /&gt;
&lt;br /&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.&lt;br /&gt;
&lt;br /&gt;
In this rather simple project, you will let the robot simulation software CoppeliaSim solve the forward kinematics for you. The goal of this project is to gain familiarity with CoppeliaSim and to confirm its calculation of the forward kinematics by visual inspection. You will submit a screenshot of the UR5 robot at a specific configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Review Criteria&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The assignment consists  of the following:&lt;br /&gt;
* A screenshot of the robot at its  final configuration.&lt;br /&gt;
* A list of reported joint angles.&lt;br /&gt;
* A list of rotation matrices giving the orientation of each joint relative to the previous joint (&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;s1&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;12&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;23&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039;, etc.)&lt;br /&gt;
* Reported value of &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; (Rotation matrix giving the orientation of end-effector frame {&amp;#039;&amp;#039;e&amp;#039;&amp;#039;} relative to the world frame {&amp;#039;&amp;#039;s&amp;#039;&amp;#039;}.&lt;br /&gt;
* Screenshots of the CoppeliaSim UI modifications you performed.&lt;br /&gt;
&lt;br /&gt;
All reported values should be in a single pdf. This pdf  and all screenshots should be submitted in a &amp;#039;&amp;#039;&amp;#039;SINGLE&amp;#039;&amp;#039;&amp;#039; .zip file labeled &amp;quot;lastname_firstname_assignment1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 1: Joint Angle Calculations&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The UR5 robot in its home configuration is shown. When all of its joints are at 0°, the frames located at the joints and the world frame are parallel (i.e. &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;ij&amp;lt;/sub&amp;gt; = I; j ∈ {s,1,2,3,4,5,6}&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
[[File:UR5 Home.PNG]]&lt;br /&gt;
&lt;br /&gt;
The rotation axes of each joint in their own coordinate frames are as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;2&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;3&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;4&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,1,0)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;5&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,-1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\hat{w}&amp;lt;/math&amp;gt;&amp;lt;sub&amp;gt;&amp;#039;&amp;#039;6&amp;#039;&amp;#039;&amp;lt;/sub&amp;gt; = (0,0,1)&amp;lt;sup&amp;gt;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At an unkown configuration, the following relations between the joint frames are given:&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&amp;gt;,{-.5,0,-.866},{.866,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; = {{-.3536,-.3536,.866},{-.7071,.7071,0},{-.6124,-.6124,-.5}}&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;12&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; = {{-.5,0,-.866},{0,1,0},{.866,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; = {{-.866,0,-.5},{0,1,0},{.5,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; = {{-.3536,-.7071,.6124},{-.5732, -.3536,-.7392},{.866,0,-.5}}&lt;br /&gt;
*&amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;6e&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 &amp;#039;&amp;#039;e&amp;#039;&amp;#039; corresponds tothe end-effector frame and is not shown in the figure.&lt;br /&gt;
&lt;br /&gt;
* Find the joint angles in this  configuration.&lt;br /&gt;
** Hint: A joint angle corresponds to the orientation of one joint with respect to the orientation of the previous joint.&lt;br /&gt;
* Input the joint angles you found into Scene1_UR5 in CoppeliaSim and take a screenshot of the robot at that configuration.&lt;br /&gt;
* Find &amp;#039;&amp;#039;R&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and verify  your result by  comparing it with the  given  &amp;#039;&amp;#039;T&amp;lt;sub&amp;gt;se&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; under the &amp;quot;Enter Config and SE(3) Value&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 2: CoppeliaSim Simulation and Exploration&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Open the CoppeliaSim scene for interactive manipulation of the Universal Robots UR5 robot, a popular 6-joint robot. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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 6 joints and watch how the robot moves.&lt;br /&gt;
&lt;br /&gt;
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;
The Main script and  any child scripts will be displayed. There is a default main script that contains  the basic code the simulation needs to run and usually doesn&amp;#039;t need to be edited. The main script contains the  simulation&amp;#039;s loop code. Each object in the scene has an  associated child script. The child script is typically used to control the model and contains functions written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that happen every step in the simulation. Threaded child scripts  contain system callback functions that are called once at the beginning of the  simulation. Non-threaded child scripts are preferred over threaded since threaded child scripts are more resource-intensive, can waste some processing time, and can be less responsive to the simulation stop command. For more details on non-threaded and threaded child scripts, see [https://www.coppeliarobotics.com/helpFiles/en/childScripts.htm Child Scripts].&lt;br /&gt;
&lt;br /&gt;
For more information about the main script and child scripts, see [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm Main  and Child Scripts]. The simulation must be stopped before you can make any edits to or open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child  script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts run the  simulation.&lt;br /&gt;
&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;big&amp;gt; and &amp;lt;/big&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; table 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;, where 20 is the desired font size.&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
You should use the screenshot command appropriate for your operating system:&lt;br /&gt;
&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;
&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;
&lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
	<entry>
		<id>https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25892</id>
		<title>ME 449 Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://hades.mech.northwestern.edu//index.php?title=ME_449_Assignment_1&amp;diff=25892"/>
		<updated>2020-09-30T14:33:45Z</updated>

		<summary type="html">&lt;p&gt;LinLiu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Introduction&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
In the next chapter, we will address the forward kinematics  problem for open-chain robots: finding the configuration of the robot&amp;#039;s end-effector in &amp;#039;&amp;#039;T(0) ∈ SE(3)&amp;#039;&amp;#039; given the vector of joint positions.&lt;br /&gt;
&lt;br /&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.&lt;br /&gt;
&lt;br /&gt;
In this rather simple project, you will let the robot simulation software CoppeliaSim solve the forward kinematics for you. The goal of this project is to gain familiarity with CoppeliaSim and to confirm its calculation of the forward kinematics by visual inspection. You will submit a screenshot of the UR5 robot at a specific configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Review Criteria&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The assignment consists  of the following:&lt;br /&gt;
* A screenshot of the robot at its  final configuration.&lt;br /&gt;
* A list of reported joint angles.&lt;br /&gt;
* A list of rotation matrices giving the orientation of each joint relative to the previous joint (RS1, R12, R23, etc.)&lt;br /&gt;
* Reported value of &amp;#039;&amp;#039;Rse&amp;#039;&amp;#039; (Rotation matrix giving the orientation of end-effector frame {&amp;#039;&amp;#039;e&amp;#039;&amp;#039;} relative to the world frame {&amp;#039;&amp;#039;s&amp;#039;&amp;#039;}.&lt;br /&gt;
* Screenshots of the CoppeliaSim UI modifications you performed.&lt;br /&gt;
&lt;br /&gt;
All reported values should be in a single pdf. This pdf  and all screenshots should be submitted in a &amp;#039;&amp;#039;&amp;#039;SINGLE&amp;#039;&amp;#039;&amp;#039; .zip file labeled &amp;quot;lastname_firstname_assignment1.zip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Part 1: Joint Angle Calculations&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
The UR5 robot in its home configuration is shown. When all of its joints are at 0°, the frames located at the joints and the world frame are parallel (i.e. &amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step-By-Step Assignment Instructions&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Open the CoppeliaSim scene for interactive manipulation of the Universal Robots UR5 robot, a popular 6-joint robot. (See the instructions about CoppeliaSim in the first module of week 1, or go directly to [http://hades.mech.northwestern.edu/index.php/CoppeliaSim_Introduction CoppeliaSim Introduction] and download Scene 1.)&lt;br /&gt;
&lt;br /&gt;
When  you run this scene you will see a window with 2 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 6 joints and watch how the robot moves.&lt;br /&gt;
&lt;br /&gt;
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;
The Main script and  any child scripts will be displayed. There is a default main script that contains  the basic code the simulation needs to run and usually doesn&amp;#039;t need to be edited. The main script contains the  simulation&amp;#039;s loop code. Each object in the scene has an  associated child script. The child script is typically used to control the model and contains functions written in the Lua programming language. Child scripts can be non-threaded or threaded. Non-threaded child scripts contain system callback functions that happen every step in the simulation. Threaded child scripts  contain system callback functions that are called once at the beginning of the  simulation. Non-threaded child scripts are preferred over threaded since threaded child scripts are more resource-intensive, can waste some processing time, and can be less responsive to the simulation stop command. For more details on non-threaded and threaded child scripts, see [https://www.coppeliarobotics.com/helpFiles/en/childScripts.htm Child Scripts].&lt;br /&gt;
&lt;br /&gt;
For more information about the main script and child scripts, see [https://www.coppeliarobotics.com/helpFiles/en/mainAndChildScripts.htm Main  and Child Scripts]. The simulation must be stopped before you can make any edits to or open a script.&lt;br /&gt;
&lt;br /&gt;
For Scene 1, we will be looking at the &amp;quot;Non-threaded child  script (UI_Script).&amp;quot; Double-click this script and another window containing the code will pop up. You might notice some of the 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. The code for the Custom UI that appears when the simulation starts is written in XML and 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. Consult the XML syntax for the attributes each element can have. &lt;br /&gt;
&lt;br /&gt;
More information on CoppeliaSim can  be found in the [https://www.coppeliarobotics.com/helpFiles/index.html CoppeliaSim User Manual]. There is also a [https://forum.coppeliarobotics.com/ CoppeliaSim forum]. You can take a look at the scripts of the included example scenes and  demos  to see how their functions and UIs were defined and to get a better idea of how the  scripts run the  simulation.&lt;br /&gt;
&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 theXML 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;big&amp;gt; and &amp;lt;/big&amp;gt; on its sides. For example, line 258 &amp;quot;label text=&amp;quot;&amp;lt;big&amp;gt; Configuration Entry:&amp;lt;/big&amp;gt;&amp;quot; controls the  text &amp;quot;Configuration Entry&amp;quot; on the &amp;quot;Enter Config and SE(3) Value&amp;quot; table 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;, where 20 is the desired font size.&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
You should use the screenshot command appropriate for your operating system:&lt;br /&gt;
&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;
&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;
&lt;br /&gt;
*&amp;#039;&amp;#039;Linux&amp;#039;&amp;#039;: you can use Screenshot or PrtScrn.&lt;/div&gt;</summary>
		<author><name>LinLiu</name></author>
	</entry>
</feed>