Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[01/09/2020] Fixed image and math issues #39

Merged
merged 2 commits into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/mechanical/Forward and Inverse Kinematics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The forward kinematics problem for a serial-chain manipulator is to find the position and orientation of the end-effector relative to the base given the positions of all of the joints and the values of all of the geometric link parameters. Often, a frame fixed in the end-effector is referred to as the tool frame, and while fixed in the final link N, it in general has a constant offset in both position and orientation from frame N. Likewise, a station frame is often located in the base to establish the location of the task to be performed. This frame generally has a constant offset in its pose relative to frame 0, which is also fixed in the base. In practice, the forward kinematics problem is solved by calculating the transformation between a coordinate frame fixed in the end-effector and another coordinate frame fixed in the base, i.e., between the tool and station frames. This is straightforward for a serial chain since the transformation describing the position of the end-effector relative to the base is obtained by
simply concatenating transformations between frames fixed in adjacent links of the chain.

<img src = 'images/forward kinematics.jpg'/>
![](images/forward_kinematics.jpg){: style="height:500px align=centre"}

# Inverse Kinematics

Expand All @@ -12,7 +12,7 @@ two members of a mechanism, find the values of all of the joint positions. This



<img src = 'images/inverse kinematics.png' width = "450px" /><img src = 'images/why ik.png' width = "400px"/>
![](images/Inverse_Kinematics.jpg){: style="width:400px"}![](images/why_ik.png){: style="width:350px"}

To get a more detailed idea of solving inverse and forward kinematics problems for robotic system do checkout this 3 part video series from milfordrobotics

Expand Down
46 changes: 21 additions & 25 deletions docs/mechanical/Introduction to Dynamics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

For many applications with fixed-based robots we need to find a multi-body dynamics formulated as:

$$ M(q)\ddot{q} + b(q,\dot{q}) + g(q) = \tau \: + J_{c}(q)^{T}F_{c} $$
$$ M(q)\ddot{q} + b(q,\dot{q}) + g(q) = \tau \: + J_{c}(q)^{T}F_{c} $$

consisting of the following components:

$$M(q)$$ $$\epsilon$$ $$\mathbf{R}$$ $$^{n_{q}Xn_{q}}$$ Generalized Mass matrix(orthogonal)
$M(q)$ $\epsilon$ $\mathbf{R}$ $^{n_{q}Xn_{q}}$ Generalized Mass matrix(orthogonal)

$$q, \dot{q}, \ddot{q}$$ $$\epsilon$$ $$\mathbf{R}^{n_{q}}$$ Generalized position, velocity and acceleration vectors
$q, \dot{q}, \ddot{q}$ $\epsilon$ $\mathbf{R}^{n_{q}}$ Generalized position, velocity and acceleration vectors

$$b(q, \dot{q})$$ $$\epsilon$$ $$\mathbf{R}^{n_{q}}$$ Coriolis and centrifugal terms.
$b(q, \dot{q})$ $\epsilon$ $\mathbf{R}^{n_{q}}$ Coriolis and centrifugal terms.

$$g(q)$$ $$\epsilon$$ $$\mathbf{R}^{n_{q}}$$ Gravitational terms.
$g(q)$ $\epsilon$ $\mathbf{R}^{n_{q}}$ Gravitational terms.

$$\tau$$ $$\epsilon$$ $$\mathbf{R}^{n_{q}}$$ External generalized forces.
$\tau$ $\epsilon$ $\mathbf{R}^{n_{q}}$ External generalized forces.

$$F_{c}$$ $$\epsilon$$ $$\mathbf{R}^{n_{q}}$$ External Cartesian forces (e.g. from contacts)
$F_{c}$ $\epsilon$ $$\mathbf{R}^{n_{q}}$ External Cartesian forces (e.g. from contacts)

$$J_{c}(q)$$ $$\epsilon$$ $$\mathbf{R}^{n_{q}Xn_{q}}$$ Geometric Jacobian corresponding to the external forces.
$J_{c}(q)$ $\epsilon$ $\mathbf{R}^{n_{q}Xn_{q}}$ Geometric Jacobian corresponding to the external forces.



Expand All @@ -32,50 +32,46 @@ to understand better how problems related to dynamics in robotics are tackled do

a very well known formulation formed by Newton and Euler using law of angular and linear momentum is :

​ $$\dot{\mathsf{p}} _{S}$$ = $$F_{ext,S}$$
​ $\dot{\mathsf{p}} _{S}$ = $F_{ext,S}$

​ $$\dot{\mathbf{N}}_{S}$$ = $$T_{ext}$$
​ $\dot{\mathbf{N}}_{S}$ = $T_{ext}$

where $$F_{ext,S}$$ are the resultant external forces that act through the COG and $$T_{ext}$$ are the resultant external torques. External forces which do not act through the COG need to be shifted to an equivalent force/moment pair of which the force acts through the COG.
where $F_{ext,S}$ are the resultant external forces that act through the COG and $T_{ext}$ are the resultant external torques. External forces which do not act through the COG need to be shifted to an equivalent force/moment pair of which the force acts through the COG.

### Newton-Euler for Multi-Body Systems

When dealing with multi-body systems, a valid approach is to separate all bodies at the joints as depicted in and to consider every body as a single unit. Thereby, the constraint forces F$$_{i}$$ at the joints must be introduced as external forces acting on each of the bodies when cut free. For all these bodies, we must then apply conservation of linear and angular momentum in all DoFs, subject to external forces (which now include the joint forces F$$_{i}$$ , too). For a general 3D case and a fixed base, this results in a 6$$n_{j}$$ -dimensional systems of equations. Additionally, there are 5 $$n_{j}$$ motion constraint due to the ideal joints. They ensure that the two connected bodies only move along the direction of the joint but don’t move in all other directions that are blocked by the joint.
When dealing with multi-body systems, a valid approach is to separate all bodies at the joints as depicted in and to consider every body as a single unit. Thereby, the constraint forces F$_{i}$ at the joints must be introduced as external forces acting on each of the bodies when cut free. For all these bodies, we must then apply conservation of linear and angular momentum in all DoFs, subject to external forces (which now include the joint forces F$_{i}$ , too). For a general 3D case and a fixed base, this results in a 6$n_{j}$ -dimensional systems of equations. Additionally, there are 5 $n_{j}$ motion constraint due to the ideal joints. They ensure that the two connected bodies only move along the direction of the joint but don’t move in all other directions that are blocked by the joint.

![multi-body system](images/link 1.png)
![](images/link_1.png){: style="height:350px align=centre"}

## Lagrange Method

This method is centered around three fundamental concepts:

1. The definition of generalized coordinates$$ q$$ and generalized velocities $$\dot{q}$$ , which may or may not encode the information regarding the constraints applicable to the system.
1. The definition of generalized coordinates$ q$ and generalized velocities $\dot{q}$ , which may or may not encode the information regarding the constraints applicable to the system.

2. . A scalar function called the Lagrangian function $$\mathcal{L}$$. For mechanical systems, it is exactly the difference between the total kinetic energy $$\mathcal{T}$$ and the total potential energy $$\mathcal{U}$$, of the system at each instant:
2. . A scalar function called the Lagrangian function $\mathcal{L}$. For mechanical systems, it is exactly the difference between the total kinetic energy $\mathcal{T}$ and the total potential energy $\mathcal{U}$, of the system at each instant:

​ $$\mathcal{L} = \mathcal{T} - \mathcal{U}$$
​ $\mathcal{L} = \mathcal{T} - \mathcal{U}$



3. The so-called Euler-Lagrange equation, also known as the Euler-Lagrange of the second kind, which applies to the Lagrangian function $$\mathcal{L}$$ and to the total external generalized forces $$\tau$$ :
3. The so-called Euler-Lagrange equation, also known as the Euler-Lagrange of the second kind, which applies to the Lagrangian function $\mathcal{L}$ and to the total external generalized forces $\tau$ :

​ $$\frac{d}{dt} (\frac{\partial{\mathcal{L}}}{\partial{\dot{q}}} )$$ - $$(\frac{\partial{L}}{\partial{\dot{q}}})$$ = $$\tau$$
​ $\frac{d}{dt} (\frac{\partial{\mathcal{L}}}{\partial{\dot{q}}} )$ - $(\frac{\partial{L}}{\partial{\dot{q}}})$ = $\tau$

In the most general case, the Lagrangian is a function of the generalized coordinates and velocities q and q˙ , and it may also have an explicit dependence on time t, hence we redefine the aforementioned scalar energy functions as $$\mathcal{T} = \mathcal{T}(t, q, \dot{q})$$ and $$\mathcal{U} = \mathcal{U}(t,q)$$, thus $$\mathcal{L} = \mathcal{L}(t,q,\dot{q})$$ .
In the most general case, the Lagrangian is a function of the generalized coordinates and velocities q and q˙ , and it may also have an explicit dependence on time t, hence we redefine the aforementioned scalar energy functions as $\mathcal{T} = \mathcal{T}(t, q, \dot{q})$ and $\mathcal{U} = \mathcal{U}(t,q)$, thus $\mathcal{L} = \mathcal{L}(t,q,\dot{q})$ .

In the end, one of the most notable properties of this formulation is the capacity to eliminate all internal reaction forces of the system from the final EoM, in contrast to the Newton-Euler formulation where there they are explicitly accounted for.



to get a more detailed insight on how to formulate Newton-Euler equation and Lagrange equation for different robot system check out this [lecture]() by IIT Delhi prof S.K SAHA .


To get a more detailed insight on how to formulate Newton-Euler equation and Lagrange equation for different robot system check out this [lecture]() by IIT Delhi prof S.K SAHA

some of the other resources you can checkout to know more about kinematics and dynamics involved in robotics are:

1. A Mathematical Introduction to Robotic Manipulation by Richard Murray
2. Robot dynamics and control by Mark Spong
2. Robot dynamics and control by Mark Spong
3. Springer Handbook on Robotics by Oussama Khatib


8 changes: 4 additions & 4 deletions docs/mechanical/Joint Kinematics.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ variables.

# Geometric Representation

The geometry of a robotic mechanism is conveniently defined by attaching coordinate frames to each link. While these frames could be located arbitrarily, it is advantageous both for consistency and computational efficiency to adhere to a convention for locating the frames on the links. A commonly used convention for selecting frames of reference in robotic applications is the Denavit-Hartenberg, or D-H convention. In this convention, each homogeneous transformation $$A_{i}$$ is represented as a product of four basic transformations
The geometry of a robotic mechanism is conveniently defined by attaching coordinate frames to each link. While these frames could be located arbitrarily, it is advantageous both for consistency and computational efficiency to adhere to a convention for locating the frames on the links. A commonly used convention for selecting frames of reference in robotic applications is the Denavit-Hartenberg, or D-H convention. In this convention, each homogeneous transformation $A_{i}$ is represented as a product of four basic transformations

![geometric representation](images\link 2.png)
![](images/link_2.png){: style="height:250px"}

where the four quantities $$\theta_{i} , a_{i} , d_{i} , \alpha_{i}$$ are parameters associated with link i and joint i. The four parameters $$a_{i} ,\alpha_{i} ,d_{i} , and \: \theta_{i}$$ in (3.10) are generally given the names link length, link twist, link offset, and joint angle, respectively, three of the above four quantities are constant for a given link, while the fourth parameter, $$\theta i$$ for a revolute joint and $$d_{i}$$ for a prismatic joint, is the joint variable.
where the four quantities $\theta_{i} , a_{i} , d_{i} , \alpha_{i}$ are parameters associated with link i and joint i. The four parameters $a_{i} ,\alpha_{i} ,d_{i} , and \: \theta_{i}$ in are generally given the names link length, link twist, link offset, and joint angle, respectively, three of the above four quantities are constant for a given link, while the fourth parameter, $\theta i$ for a revolute joint and $d_{i}$ for a prismatic joint, is the joint variable.

Check out this [video](https://www.youtube.com/watch?v=FiKEAdednuo) to know more about how to use DH parameters for geometric representation or go [here](https://robotacademy.net.au/lesson/denavit-hartenberg-notation/) for know about DH notation in more detail.

![dh parameters](images\dh parameters.jpg)
![](images/dh_parameters.jpg){: style="height:350px align:center"}

67 changes: 0 additions & 67 deletions docs/mechanical/POSITION AND ORIENATION REPRESENTATION.md

This file was deleted.

Binary file added docs/mechanical/images/Inverse_Kinematics.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/mechanical/images/inverse kinematics.png
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes