Share MATLAB spider robot simulation file – Hexapod simulation in MATLAB

posted in: Matlab | 0

Principles

1. Forward kinematic (FK)

The robot frame will form a skeleton system, this system is demarcated by hierarchies and each joint component will be operated in sequence with separate rotating axes to control the direction of movement of each joint in the system. this skeleton system.

This is a method close to the way living things move. For example, when we want to move our hands: we will rotate the shoulder blades first, then the elbows, then the hands and fingers, these movements are performed in order from high to low. Similar to the robot, the servo placed on the higher-order body will rotate first, then the foot servo.




2. Vector rotation in space

When rotating a vector with origin O(0; 0) in the plane of Oxy by an angle

Figure 1. Rotate vector in the Oxy plane

The coordinates after rotation (x’, y’) of the point (x, y) are:

displaystyle begin{bmatrix} x'\ y' end{bmatrix} =begin{bmatrix} cos theta  &  -sin theta \ sin theta  & cos theta  end{bmatrix}begin{bmatrix} x\ y end{bmatrix}

Similarly when we rotate a vector with origin O (0; 0) in Oxyz space according to angles α (On the Oxy plane), β (On the Oxz plane) and γ (On the Oyz plane)

We have the matrix R:

displaystyle R=R_{z}( alpha ) R_{y}( beta ) R_{z}( gamma ) =begin{bmatrix} cos alpha  & -sin alpha  & 0\ sin alpha  & cos alpha  & 0\ 0 & 0 & 1 end{bmatrix}begin{bmatrix} cos beta  & 0 & sin beta \ 0 & 1 & 0\ -sin beta  & 0 & cos beta  end{bmatrix}begin{bmatrix} 1 & 0 & 0\ 0 & cos gamma  & -sin gamma \ 0 & sin gamma  & cos gamma  end{bmatrix}

The coordinates after rotation (x’, y’, z’) of the point (x, y, z) are:

displaystyle begin{bmatrix} x'\ y'\ z' end{bmatrix} =Rbegin{bmatrix} x\ y\ z end{bmatrix}

3. Center of gravity of solid body

Consider a solid as a set of n elements with weights P 1 , P 2 , … P n . The gravity Pi form a parallel force system. The center of this system of particle weights is called the center of gravity of the body. Thus, the center of gravity of an object is a point on the object that sums the weight of the whole object passing when we rotate the object in any dimension in space.

Calling C the center of gravity of the object, the coordinates of point C are determined by the following expressions:

displaystyle begin{array}{l} X_{c} =frac{sum _{i=1}^{n} P_{i} X_{i}}{P}\ Y_{c} =frac{sum _{i=1}^{n} P_{i} Y_{i}}{P}\ Z_{c} =frac{sum _{i=1}^{n} P_{i} Z_{i}}{P} end{array}

Where Pi is the weight of the i-th element in the object, and the weight of the whole object, and x i , y i , z i are the coordinates of the i-th element.

For simplicity, we divide the robot mass into 2 parts, leg mass and body mass, and treat each part as a homogeneous block (Weight at each point is equal). العب اون لاين مجانا

4. The six-legged robot’s pillar

Trụ của robot sáu chân trên một mặt phẳng là phần diện tích của hình tạo bởi các đường nối tất cả các chân chạm mặt phẳng đó của robot.

The cylinder of a six-legged robot on a plane is the area of ​​the figure formed by the lines connecting all the legs touching that plane of the robot.

In order for the robot not to fall, it must satisfy the condition that the projection of the center of gravity of the robot on the moving plane is not outside its cylinder. 

Go straight: Download

Rotate: Download

Hello: Download

Leave a Reply

Your email address will not be published.