Inverse Kinematics - Velocity control
From the previous task you can acquire an estimation of the joint states and
the location of the correct target. With this information we can construct
a Jacobian on how the robot's state will change given changes to the joints.
Therefore, through combining these two pieces of information, we can use a
technique called Inverse Kinematics (IK) to tell the robot how to reach the
Simply put, given the joint angles of the links, where is the end eec-
tor's position, and how does the change in these angles aect the end
eector's position minimise the error between actual and desired locations.
This part will involve implementing IK of the four link robot. As
stated in section A, two of the links rotate around the y-axis and the other
two around the z -axis. In the labs you constructed Jacobians that used
the rotation matrix for the z -axis, and here you will also need to use the
rotation matrix corresponding to the y-axis.
You should focus rst on implementing this in the velocity control
mode. This can be done by setting the mode via:
The whole aim will to be to reach the right target and remain stable
until the target (the star target) moves to a new location.
Inverse Kinematics - Gravity compensated torque con-
Once you have implemented IK, you will add gravity. This will mean that
you will need to calculate the torques required to overcome gravity. Each
link has a weight of 1kg.
Uncomment line 34 to include gravity:
[login to view URL]((0,0,-9.81))
This will set gravity to be in the z -axis
You should reimplement the IK as a task space proportional-derivative (PD)
controller with gravity compensation to reach the same target using the
To do this you will have to enable gravity by adding this before the
loop in the go method:
[login to view URL] gravity(True)
It is best to rst nd the torques needed to move the robot to the
correct position without gravity initially. Once the robot is performing IK
successfully then enable gravity as above and add the additional torque
You can then explore this system by adjusting the parameters of the
PD controller to observe if you can speed up the system without reducing
Diculty with vision
If you had diculty with the previous section, you may use the ground
truths instead of your estimated values to test your controller. These values
[login to view URL] truth joint angles
[login to view URL] truth joint velocities
[login to view URL] valid target
You will need to report if you are using these values instead.
By the end your robot should be moving to the correct target. Not only this
you should be able to report quantitatively:
Accuracy of the arm movement
Time it takes to reach the target
Dierences with and without gravity
The aects of the PD parameters
For some of the above points it is perhaps best to use graphs to illustrate
potential trends within the data. You can see how many times your arm
reaches the valid target with:
[login to view URL]
And the number of times your robot goes for the invalid target with:
[login to view URL]
To get a measurement of time you should multiply the step size with the
number of timesteps. In your code it should look like this:
number of timesteps*[login to view URL]
The output will be in seconds.
4 фрилансеров(-а) в среднем готовы выполнить эту работу за $188
Hello! I am a python developer. I looked at your project and it seems interesting. I have all necessary skills required for this project. Ping me to discuss in detail.
Hi, sir. I studied your proposal in detail. I would like to know whether this project is for simulation or practice. I want to chat about your project in detail. Thanks.