<100 subscribers

In the first week, I recorded the robot’s tip position as (x,y,z)(x, y, z)(x,y,z). However, this approach had some problems:
According to kinematic rules, the robot’s end-effector can reach the same point with different configurations of its joints.
For the simulation, we need the exact pose (position + orientation) of each component, not only the tip position.
Because of this, I changed the coordinate system from purely Cartesian to a more spherical-like representation. Now, the outputs are saved as yaw, pitch, and roll angles (and I still keep the (x,y,z)(x, y, z)(x,y,z) data as well, so you can also check those).
Brief explanations of these angles:
Rotation around the front-to-back axis is called roll.
Rotation around the side-to-side axis is called pitch.
Rotation around the vertical axis is called yaw.

Now, data of the robots are saving as x,y,z,roll,yaw and pitch angles (6 DoF-Degree of Freedom) and thanks to these inputs we can determine gexact points.
I could took the data easily because it has some sensors on each joint point and these sensors create readible data. You can check the updated github repo here for the coding details:
Repo Link: https://github.com/0xemkey/Robot-to-ROS2
I read some articles and watched a video about activation functions as promised, you will find some of the example code samples at the end of this weeks blog.
Each neuron (both in the hidden layers and the output layer) has an activation function.
The general purpose of a neural network is to:
Learn a function from the given inputs.
Compute outputs using this learned function.
Calculate the difference between the predicted values and the actual values.
Optimize the parameters to reduce this difference.
Because we need to fit curves, not just straight lines. Most real-world models are non-linear, so we cannot simply assume a linear relationship.
If we directly used the input as the output (mathematically y=xy = xy=x), we would not be able to create any curvature in our predictions. Activation functions introduce non-linearity, which allows the network to approximate complex functions.
Step Function:

Sigmoid:

ReLU (Rectified Linear Unit):

ReLU is one of the most commonly used activation functions. It allows the model to represent non-linear behavior while requiring relatively low computational power. We can control the point where the function “bends” using the bias, and we can change or “rotate” the shape of the function using the weights.
If we add another neuron, we can shift the function vertically and introduce a second breakpoint (or activation point), which makes the overall function even more flexible.
Example Scneario (I took screenshots from this video you should definitely watch it!)
1- If we add some biases we can relocate the activation point. (added 0.5 and activation point went to the -0.5)

2- If we change the weight of the neuron, the curve will change (x=W*y)

3- We can change the curves alignment with the changing weight. (Even reversely.)

4- If we add second neuron nothing changed with weight=1 and bias=0

5- If we change the bias of the second neuron we can change the activation functions location vertically.

6- If we change the weight of the second neuron we can change the shape of the curve:

Todays transformer structure is based on the Attention Is All You Need article. This paper was written by the Google Brain team in 2017.
The transformer is essentially the core structure that handles storage and learning in many modern neural networks.
As mentioned in last week’s blog, the main learning mechanism is backpropagation. This method has some advantages, but of course also some disadvantages (like all engineering systems). The main disadvantage is that backpropagation is calculated over the entire network.
Nested Learning proposes a different approach: instead of updating the whole network at once, it updates the weights of each layer separately. In this way, layers can be processed in parallel, which can save time and reduce the complexity of the calculations.
With this architecture, a distinction between short-term and long-term knowledge is created. Each layer can represent short-term knowledge. Updating the weights of this short-term knowledge within each layer is much easier than updating the entire network at once. In addition, changes in short-term knowledge (at the n-th cycle) are transferred and reflected in the long-term knowledge in the next cycle (the (n+1)-th).
Resource:
https://abehrouz.github.io/files/NL.pdf

Resource: https://abehrouz.github.io/files/NL.pdf
As mentioned in Week 1, I am following this course to understand the structure of neural networks both mathematically and visually. They provide code samples, and you can find all of them here:
https://github.com/Sentdex/NNfSiX/tree/master/Python
Currently I am only following the Python version, but I will probably expand my knowledge with other languages as well.
I will share my own examples in the coming weeks.
Until then, thanks for reading and see you next week (maybe earlier).
I like it
Thanks @paragraph ! You can read the first 2 weeks' blog here: https://paragraph.com/@0xf8d928467d5531d70afed163bd9ba8f263bdc5f0/week-1 https://paragraph.com/@0xf8d928467d5531d70afed163bd9ba8f263bdc5f0/week-2 More to come, enjoy reading!
@emkey outlines a two-part post: robotics shifts from Cartesian to yaw/pitch/roll for full 6 DoF poses with joint sensors; a GitHub repo is noted. Machine learning covers activation functions (ReLU, sigmoid), Nested Learning, transformer basics, and includes code samples.