Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

기계공학실험 1

- 로봇 실험 -

담당 교수: 조규진 교수님


담당 조교: 최재령, 유성렬
기타 사항

• 실험 장소: 302동 410-2호

• 보고서 제출: snu.robotexp@gmail.com

• 보고서 제출기한: 실험일로부터 7일

• 보고서 형식
– 워드파일 혹은 pdf (한글로 제출하지 마세요)

– 메일 제목 : [로봇x] x조 xxxx-xxxx 홍길동, ex) [로봇A] 2조 2017-1234 김길동

• 연락처: 880-1663

• E-mail:
– 최재령 (jae.choi.337@gmail.com)
– 유성렬 (joseph.yu2013@gmail.com)

• 질의시간: 문의 후 방문

2
Contents
• 실험 A
– ROS 통신 및 모터 제어 실험 (Motor Control using ROS)
– Torque vs Current

• 실험 B
– 로봇팔 제어 실험 1 (Robotic Manipulator Control 1)
– Forward Kinematics

• 실험 C
– 로봇팔 제어 실험 2 (Robotic Manipulator Control 2)
– Inverse Kinematics
실험 A – ROS 통신 및 모터 제어 실험

Motor Control using ROS


Motor Control using ROS

ROS 란?
ROS is an open-source, meta-operating system for
your robot. It provides the services you would expect
from an operating system, including hardware
abstraction, low-level device control, implementation
of commonly-used functionality, message-passing
between processes, and package management. It
also provides tools and libraries for obtaining,
building, writing, and running code across multiple
computers.
http://www.ros.org/wiki/

6
Motor Control using ROS

ROS 란?
ROS is an open-source, meta-operating system for
your robot. It provides the services you would expect
from an operating system, including hardware
abstraction, low-level device control, implementation
of commonly-used functionality, message-passing
between processes, and package management. It
also provides tools and libraries for obtaining,
building, writing, and running code across multiple
computers.
http://www.ros.org/wiki/

7
Motor Control using ROS

ROS 란?
ROS is an open-source, meta-operating system for
your robot. It provides the services you would expect
from an operating system, including hardware
abstraction, low-level device control, implementation
of commonly-used functionality, message-passing
between processes, and package management. It
also provides tools and libraries for obtaining,
building, writing, and running code across multiple
computers.
http://www.ros.org/wiki/

8
Motor Control using ROS

ROS 란?
ROS is an open-source, meta-operating system for
your robot. It provides the services you would expect
from an operating system, including hardware
abstraction, low-level device control, implementation
of commonly-used functionality, message-passing
between processes, and package management. It
also provides tools and libraries for obtaining,
building, writing, and running code across multiple
computers.
http://www.ros.org/wiki/

9
Motor Control using ROS

ROS 기본 용어
• Node
• 최소 단위의 실행 가능한 프로세서를 가리키는 용어로써 하나의 실
행 가능한 프로그램으로 생각하면 된다. ROS에서는 최소한의 실행
단위로 프로그램을 나누어 작업하게 된다. 각 노드는 메시지 통신으
로 데이터를 주고 받는다.

• Package
• 하나 이상의 노드, 노드 실행을 위한 정보 등을 묶어 놓은 것.

• Message
• 메시지를 통해 노드간의 데이터를 주고 받게 된다. 변수 형태이며
간단한 데이터 구조 및 배열과 같은 구조도 사용 가능.

10
Motor Control using ROS

Topic 통신

Topic

Publisher Subscriber

- Publisher에서 Subscriber로 단방향


- 연속적으로 데이터를 송수신 하는 경우
- 필요에 따라 1:1, 1:N, N:1, N:N 가능

11
Motor Control using ROS

Topic 통신

Master

노드 정보
노드 정보

Publisher 정보
접속 요청
Publisher Subscriber

접속 응답

Message 전송

12
Motor Control using ROS

Service 통신

서비스 요청

서비스 응답

Server Client
- Server와 Client 사이의 양방향 통신
- 요청 처리가 순간적인 현재 상태의 요청 및 응답 등에 사용

13
Motor Control using ROS

Service 통신

Master

노드 정보
노드 정보

Server 정보

접속 요청
Server Client

접속 응답

Service 요청

14
Service 응답
Motor Control using ROS

package.xml CMakeLists.txt Source code

15
Motor Control using ROS
AC Motors vs DC Motors
AC Motor
Rotating magnetic field due to AC cause current at
the rotor, which makes rotor rotate by Lorentz Law

Low cost, Durable, High efficiency

Hard to control

Compressor, machine tool, Fan

DC Motor
DC Current at the coiled rotor and static magnetic
field makes the rotor rotate.

High torque, easy to control

Low durability

Robotics, Toy, Drone

16
Motor Control using ROS
Brushed vs Brushless DC Motors
Brushed DC Motor Low cost, easy control
At fixed speed, no additional controller is needed

At higher speeds, brush friction increases, thus reducing


useful torque

Poor heat dissipation due to internal rotor construction

Higher rotor inertia which limits the dynamic characteristics

Brush Arcing will generate noise causing EMI

High efficiency, no voltage drop across brushes


Brushless DC (BLDC) Motor
High output power/frame size.

Because BLDC has the windings on the stator, which is


connected to the case, the heat dissipation is better

Higher speed range - no mechanical limitation imposed by


brushes/commutator

Higher cost of construction


Electric Controller is required to keep the motor running
17
Motor Control using ROS
DC motor Curve
Nominal Torque : Torque at Maximum Efficiency
Stall Torque : Maximum Torque(zero speed)
No Load Speed : Maximum Speed(zero torque)

18
Motor Control using ROS
Experiment Equipment

OpenCM Board
Dynamixel Pro

Features of Dynamixel Pro

19
Motor Control using ROS

Quiz

20
실험 B – 로봇팔 제어 실험 1
Robotic Manipulator Experiment 1
Robotic Manipulator Experiment 1
Forward Kinematics
• Forward kinematics
– Use the kinematic equations of a robot to compute the position of the end-effector
from specified values for the joint parameters

1  X=FK(θ) x 
   y
 2  
  z 
   3 X  
 4   
 5   
θ =IK(X)  
 
 6   

Joint Space Task Space


• Closed loop : T12T23...T(n-1)n = I

22
Robotic Manipulator Experiment 1
Forward Kinematics
• Example : 3-R joint articulated robot manipulator

A ∶ 0,0, 𝑙1
B ∶ 𝐵𝑧 = 𝐴 + 𝑙2 𝑐𝑜𝑠𝜃2 , 𝐵𝜃1 = 𝑙2 𝑠𝑖𝑛𝜃2
𝑙2 𝑠𝑖𝑛𝜃2 𝑐𝑜𝑠𝜃1 , 𝑙2 𝑠𝑖𝑛𝜃2 𝑠𝑖𝑛𝜃1 , 𝑙1 + 𝑙2 𝑐𝑜𝑠𝜃2
C ∶ 𝑥 = 𝑙2 𝑠𝑖𝑛𝜃2 + 𝑙3 cos 𝜃3 − 90° − 𝜃2 𝑐𝑜𝑠𝜃1
𝑦 = 𝑙2 𝑠𝑖𝑛𝜃2 + 𝑙3 cos 𝜃3 − 90° − 𝜃2 𝑠𝑖𝑛𝜃1
𝑧 = 𝑙1 + 𝑙2 𝑐𝑜𝑠𝜃2 − 𝑙3 sin 𝜃3 − 90° − 𝜃2

23
Robotic Manipulator Experiment 1
Denavit-Hartenberg Parameter Forward Kinematics
• Denavit-Hartenberg notation ① 𝜃𝑖 (Angle): Angle about 𝑧𝑖 from 𝑥𝑖−1 to 𝑥𝑖
– Widely used in the transformation of ② 𝑑𝑖 (Offset): Offset along to the common
coordinate systems of linkages and normal 𝑧𝑖 axis, distance between 𝑥𝑖−1
robot mechanisms. axis and 𝑥𝑖 axis
– It can be used to represent the ③ 𝛼𝑖 (Twist): Angle about common normal
transformation matrix between links. 𝑥𝑖 axis, from 𝑧𝑖 axis to 𝑧𝑖+1 axis
– Minimal representation: Requiring ④ 𝑎 (Length): Distance between two feet 𝑧𝑖
the smallest possible number of axis and 𝑧𝑖+1 axis of the common
parameters to describe the robot’s perpendicular 𝑥𝑖 axis
kinematic structure

24
Robotic Manipulator Experiment 1
Denavit-Hartenberg Parameter Forward Kinematics

25
Robotic Manipulator Experiment 1
Manipulator Forward Kinematics

Forward kinematics is obtained


by sequentially multiplying all the
link transformations 𝑇𝑖−1,𝑖

26
Robotic Manipulator Experiment 1
z

z5
z4’ z6

x5 x6
z4 x4’
x4

i αi-1 ai-1 di θi
T36 = T34 ∙ T44′ ∙ T4’5 ∙ T56
4 -90 0 0 Θ4
𝑥 0
4’ 90 0 0 90
5 0 1 0 -90+Θ5 ( )𝑦
𝑧
1
= T36 ∙ ( )
0
0
1
6 -90 0 1 θ6

27
Robotic Manipulator Experiment 1
D-H parameter in 6-axes robot manipulator

i 1
Ai  Rot z ,i Trans z , di Trans x , ai Rot x , ai

i 𝛼𝑖−1 𝒂 𝑑𝑖 𝜃𝑖
1 0 0 L1 θ1
2 -90º L3 L2 θ2
3 180º L4 0 θ3
4 -90º L6 L5 θ4
5 90º 0 L7 θ5
6 -90º L8 0 θ6

28
Robotic Manipulator Experiment 1
Experiment Equipment

6-DOF Robotic Manipulator configuration

29
실험 C – 로봇팔 제어 실험 2
Robotic Manipulator Experiment 2
Robotic Manipulator Experiment 2
Jacobian Matrix
• Relation between joint velocity and cartesian velocity.
• Jacobian matrix J(θ)

Joint Space Task Space

31
Robotic Manipulator Experiment 2
Jacobian Matrix (x , y)
• Example : 2-DOF Planar robot arm
– Given l1, l2 , Find: Jacobian
2 l
2
 x  l1 cos1  l2 cos(1   2 )   h1 (1 , 2 ) 
 y    l sin   l sin(   )   h ( , ) 
  1 1 2 1 2   2 1 2 

l1
1

 h1 h1 
   2   l1 sin 1  l2 sin(1   2 )  l2 sin(1   2 )
J  1 
 h2 h2   l1 cos1  l2 cos(1   2 ) l2 cos(1   2 ) 
 1  2 
32
Robotic Manipulator Experiment 2
Kinematic Singularity : Definition

• Mathematical definition : A singular posture of a robot arm is one in which the


Jacobian loses rank
• The inverse of the jacobian matrix cannot be calculated when
det [J(θ)] = 0
• Singular points are such values of θ that cause the determinant of the Jacobian
to be zero
– rank(J)<n : Jacobian Matrix is less than full rank
– Jacobian is non-invertable
– Boundary Singularities: occur when the tool tip is on the surface of the work
envelop.
– Interior Singularities: occur inside the work envelope when two or more of
the axes of the robot form a straight line, i.e., collinear

33
Robotic Manipulator Experiment 2
Kinematic Singularity : Example
• Find the singularity configuration of the 2-DOF planar robot arm

determinant(J)=0 Not full rank

V (x , y)

 l1 sin 1  l2 sin(1   2 )  l2 sin(1   2 )


J  
 1
l cos  1  l 2 cos(1   2 ) l 2 cos(1   2 
) l2
Y
2 =0
Det(J)=0
1 l1
2  0
x
34
Robotic Manipulator Experiment 2
Kinematic Singularity : Characteristics
• At Singularities:
– the manipulator end effector can not move in certain directions.
– Bounded End-Effector velocities may correspond to unbounded joint velocities.
– Bounded joint torques may correspond to unbounded End-Effector forces and
torques.

35
Robotic Manipulator Experiment 2
Inverse Kinematics

• Given a kinematic chain (serial linkage), the position/orientation of one end


relative to the other (closed chain), find the values of the joint parameters

1  X=FK(θ) x 
   y
 2  
 3  z 
   X  
 4   
 5   
θ =IK(X)  
 
 6   

Joint Space Task Space

36
Robotic Manipulator Experiment 2
Inverse Kinematics : Example

• Example 1. end-effector position(x,y) joint variables(θ,S)


IK

P joint y
Finding θ : θ  arctan( )
x
(x , y) : End effector
position
Y Finding S: S  (x2  y2 )
R joint S
θ
X

37
Robotic Manipulator Experiment 2
Inverse Kinematics : Example

• Example 2. end-effector position(x,y), l1, l2 joint variables(θ1 , θ2 )


IK
(x , y)

Redundancy: A unique solution to this problem


2 l does not exist. Notice, that using the “givens” two
solutions are possible.
2
Sometimes no solution is possible.

(x , y)

l1
1

38
Robotic Manipulator Experiment 2
Inverse Kinematics : Example

• Example 2. end-effector position(x,y), l1, l2 joint variables(θ1 , θ2 )


IK
(x , y)
c 2  a 2  b 2  2ab cos C
( x 2  y 2 )  l1  l2  2l1l2 cos(180  θ 2 )
2 2

2 l cos(180  θ 2 )   cos(θ 2 )
2
x 2  y 2  l1  l2
2 2

cos(θ 2 ) 
2l1l2
 x 2  y 2  l12  l2 2 
θ 2  arccos 

l1
1  2l1l2 

Redundant since 2 could be in the


first or fourth quadrant.

39
Robotic Manipulator Experiment 2
Inverse Kinematics : Example

• Example 2. end-effector position(x,y), l1, l2 joint variables(θ1 , θ2 )


IK
(x , y) sin 𝐵 sin 𝐶
=
𝑏 𝑐
sin 𝜃1 sin 180 − 𝜃2 sin 𝜃2
2 l 𝑙2
=
2
𝑥 +𝑦 2
=
𝑥2 + 𝑦2
2
𝑙2 sin 𝜃2
𝜃1 = arcsin( )
2
𝑥 +𝑦 2
𝑦
𝜃1 + 𝜃1 = arctan
𝑥
l1
1 𝑦
𝜃1 = arctan − arcsin(
𝑙2 sin 𝜃2
)
𝑥 2
𝑥 +𝑦 2

Redundancy caused since 2 has two


possible values
40
Thank You

http://biorobotics.snu.ac.kr

You might also like