top of page

WEEK 2

DESIGNING - MODELLING - PROTOTYPING

linear-mobile-software-development-vecto

Firstly, let's consider the last week's plan for this week:

  • Learn Computer Vision in Matlab

  • Learn ROS in Matlab

  • Learn how to simulate a UR3 Robot Arm in Matlab

Only one out of those three tasks has been completed this week. I have successfully simulated the UR3 Robot in Matlab, which is a powerful computational tool for such a difficult task. To be able to gain such an achievement, it took me two days to look at the lecture materials and try the Matlab exercises for each week. It was quite tricky for me at first because of the ideas behind the transformations of the reference frames. I could not understand the mathematical methods completely lied behind those ideas at the beginning, so I had to spend one more days to review from the beginning, the transformation matrix, forward kinematics, inverse kinematics, basically every main section used to model and control a robot manipulator.

 

image.png

Peter Corke's toolbox was really helpful in illustrating and visualizing the model and movement of the robot in general and each link in particular. From those movements, the user can understand how the robot behaves based on the information fed to the system, and develop a way to control the robot as he/she wants. As for me, I believed that if I wanted to show the ability to maneuver the UR3 completely, I should have the robot to move in a particular trajectory, for example, a square or circle. That was my plan for the rest of the week, have the UR3 to draw for me a circle and a square.

3.PNG

There are several problems that I encountered during the progress of programming the control algorithm for the UR3.

The first problem was with the joint limits. In the beginning, I did not set the parameter 'qlim' for joint limits, and because of that, the arm moved randomly, with the second link and third link rotated without any constraint and of course, it is not practical. After adding the qlim for all joints and using the 'ikcon' function instead of 'ikine,' I finally had the arm to move the way I anticipated. The different between "ikine" and "ikcon" is that "ikine" uses only numerical iterations while "ikcon" uses optimization to find the optimal solution for the joint configurations.

The second problem was the interpolation part. I had the UR3 simulation to draw for me a square. It did draw a square, but the side edges were not straight. The reason was the distances between the given points were too significant. The arm only moved from one point to another, it did not care whether the trajectory was straight or not. To fix the problem, I had to add more points that would result in a straight line between the given points, so that the trajectory would be straight.

4.PNG
5.PNG

A square drawn by the UR3 simulation. Hopefully I can get it to work with the real robot.

The plan for next week is:

  • Continue to work on the control of the UR3.

  • Work on the Computer Vision to classify blocks based on colors.

  • Work on the Visual Servoing to locate a point in space with the camera.

2.PNG

And here is a circle

Capture.PNG
bottom of page