-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
목차
초 록 --------------------------------------------------- 4
Ⅰ. 서 론 ----------------------------------------------- 5
1. 개발동기 ---------------------------------------------- 5
2. Indoor GPS 정의 -------------------------------------- 5
3. 선행연구 ---------------------------------------------- 6
Ⅱ. 본 론 --------------------------------------------- 9
1. 시스템구성 -------------------------------------------- 9
1.1 초음파센서 ------------------------------------------ 9
1.2 DSP보드 -------------------------------------------- 11
1.3 모터제어부 ------------------------------------------ 11
1.4 통신모듈 -------------------------------------------- 14
2. 통신프로토콜 ------------------------------------------ 15
2.1 통신프로토콜의 개요 ----------------------------------- 15
2.2 DSP와 Main PC간 통신프로토콜 ------------------------- 15
3. 작동원리 ----------------------------------------------- 16
3.1 송신기배치 ------------------------------------------- 16
3.2 Zigbee 간 무선통신 ------------------------------------ 17
4. 인터페이스 --------------------------------------------- 18
4.1 MFC 다이얼로그 -------------------------------------- 18
4.2 장애물 설정 및 확인 ----------------------------------- 19
5. 주행알고리즘 ------------------------------------------- 21
5.1 장애물회피 ------------------------------------------- 21
5.2 블록다이어그램 ---------------------------------------- 22
Ⅲ. 결 론 ----------------------------------------------- 23
Ⅳ. 참고문헌 ------------------------------------------------ 23
Ⅴ. 부 록 ------------------------------------------------ 24
Ⅰ. 서 론 ----------------------------------------------- 5
1. 개발동기 ---------------------------------------------- 5
2. Indoor GPS 정의 -------------------------------------- 5
3. 선행연구 ---------------------------------------------- 6
Ⅱ. 본 론 --------------------------------------------- 9
1. 시스템구성 -------------------------------------------- 9
1.1 초음파센서 ------------------------------------------ 9
1.2 DSP보드 -------------------------------------------- 11
1.3 모터제어부 ------------------------------------------ 11
1.4 통신모듈 -------------------------------------------- 14
2. 통신프로토콜 ------------------------------------------ 15
2.1 통신프로토콜의 개요 ----------------------------------- 15
2.2 DSP와 Main PC간 통신프로토콜 ------------------------- 15
3. 작동원리 ----------------------------------------------- 16
3.1 송신기배치 ------------------------------------------- 16
3.2 Zigbee 간 무선통신 ------------------------------------ 17
4. 인터페이스 --------------------------------------------- 18
4.1 MFC 다이얼로그 -------------------------------------- 18
4.2 장애물 설정 및 확인 ----------------------------------- 19
5. 주행알고리즘 ------------------------------------------- 21
5.1 장애물회피 ------------------------------------------- 21
5.2 블록다이어그램 ---------------------------------------- 22
Ⅲ. 결 론 ----------------------------------------------- 23
Ⅳ. 참고문헌 ------------------------------------------------ 23
Ⅴ. 부 록 ------------------------------------------------ 24
본문내용
p();
Sleep(50);
Final_x=500;
Final_y=700;// 목표물
Select_x=0;
for (;(Select_x!=Final_x)||(Select_y!=Final_y);)
{
Select();
Compa();
}
// Parking2();
}
장애물 좌표 설정
void CRobotCtlDlg::OnMap()
{
UpdateData (true);
// TODO: Add your control notification handler code here
OBSTACLE obsta;
int obsta_check;
obsta_check = obsta.DoModal ();
if (obsta_check == IDOK)
{
fir_x1 = obsta.m_fir_x1;
fir_x2 = obsta.m_fir_x2;
fir_y1 = obsta.m_fir_y1;
fir_y2 = obsta.m_fir_y2;
sec_x1 = obsta.m_sec_x1;
sec_x2 = obsta.m_sec_x2;
sec_y1 = obsta.m_sec_y1;
sec_y2 = obsta.m_sec_y2;
CWnd* MyWnd = this->GetDlgItem(IDC_PICTUREOUTPUT);
CDC* My_pDC = MyWnd->GetDC();
CRect MyRect;
MyWnd->GetClientRect(MyRect);
My_pDC->FillSolidRect(MyRect,RGB(255,255,255));
ReleaseDC(My_pDC);
MapDisplay();
}
DrawBackGround();
}
장애물 그리기
void CRobotCtlDlg::MapDisplay()
{
OBSTACLE obsta;
obs1_1x = (int) ((double) fir_x1 / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
obs1_2x = (int) ((double) fir_x2 / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
obs1_1y = (int) (- (double) fir_y1 / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
obs1_2y = (int) (- (double) fir_y2 / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
CDC* pDC = GetDC();
pDC -> SelectObject(&RedPen);
pDC -> SelectObject(&GreenBrush);
pDC -> Rectangle (obs1_1x,obs1_1y,obs1_2x,obs1_2y);
obs2_1x = (int) ((double) sec_x1 / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
obs2_2x = (int) ((double) sec_x2 / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
obs2_1y = (int) (- (double) sec_y1 / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
obs2_2y = (int) (- (double) sec_y2 / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
pDC -> SelectObject(&RedPen);
pDC -> SelectObject(&BlueBrush);
pDC -> Rectangle (obs2_1x,obs2_1y,obs2_2x,obs2_2y);
SelectDisplay();
}
SELECT점 그리기
void CRobotCtlDlg::SelectDisplay()
{
if(Select_x != 0 && Select_y != 0)
{
select_1x = (int) ((double) (Select_x-50) / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
select_2x = (int) ((double) (Select_x+50) / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
select_1y = (int) (- (double) (Select_y-50) / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
select_2y = (int) (- (double) (Select_y+50) / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
CDC* pDC = GetDC();
pDC -> SelectObject(&BlackPen);
pDC -> SelectObject(&GreenBrush);
pDC -> Rectangle (select_1x,select_1y,select_2x ,select_2y);
}
}
로봇 주차
void CRobotCtlDlg::Parking()
{
Sensing();
for (;(geta >=5) && (geta <=355);Sensing())
{
if ((geta>=3)&&(geta<180))
{
go_right();
}
else if((geta<=357)&&(geta>=180))
{
go_left();
}
}
m_iLeftSpeed=50;
m_iRightSpeed=50;
OnButtonforward();
Sleep(1500);
OnButtonstop();
Sleep(50);
}
Sleep(50);
Final_x=500;
Final_y=700;// 목표물
Select_x=0;
for (;(Select_x!=Final_x)||(Select_y!=Final_y);)
{
Select();
Compa();
}
// Parking2();
}
장애물 좌표 설정
void CRobotCtlDlg::OnMap()
{
UpdateData (true);
// TODO: Add your control notification handler code here
OBSTACLE obsta;
int obsta_check;
obsta_check = obsta.DoModal ();
if (obsta_check == IDOK)
{
fir_x1 = obsta.m_fir_x1;
fir_x2 = obsta.m_fir_x2;
fir_y1 = obsta.m_fir_y1;
fir_y2 = obsta.m_fir_y2;
sec_x1 = obsta.m_sec_x1;
sec_x2 = obsta.m_sec_x2;
sec_y1 = obsta.m_sec_y1;
sec_y2 = obsta.m_sec_y2;
CWnd* MyWnd = this->GetDlgItem(IDC_PICTUREOUTPUT);
CDC* My_pDC = MyWnd->GetDC();
CRect MyRect;
MyWnd->GetClientRect(MyRect);
My_pDC->FillSolidRect(MyRect,RGB(255,255,255));
ReleaseDC(My_pDC);
MapDisplay();
}
DrawBackGround();
}
장애물 그리기
void CRobotCtlDlg::MapDisplay()
{
OBSTACLE obsta;
obs1_1x = (int) ((double) fir_x1 / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
obs1_2x = (int) ((double) fir_x2 / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
obs1_1y = (int) (- (double) fir_y1 / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
obs1_2y = (int) (- (double) fir_y2 / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
CDC* pDC = GetDC();
pDC -> SelectObject(&RedPen);
pDC -> SelectObject(&GreenBrush);
pDC -> Rectangle (obs1_1x,obs1_1y,obs1_2x,obs1_2y);
obs2_1x = (int) ((double) sec_x1 / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
obs2_2x = (int) ((double) sec_x2 / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
obs2_1y = (int) (- (double) sec_y1 / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
obs2_2y = (int) (- (double) sec_y2 / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
pDC -> SelectObject(&RedPen);
pDC -> SelectObject(&BlueBrush);
pDC -> Rectangle (obs2_1x,obs2_1y,obs2_2x,obs2_2y);
SelectDisplay();
}
SELECT점 그리기
void CRobotCtlDlg::SelectDisplay()
{
if(Select_x != 0 && Select_y != 0)
{
select_1x = (int) ((double) (Select_x-50) / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
select_2x = (int) ((double) (Select_x+50) / (double) m_iMaxX * (double) (m_rect.right - m_rect.left) + m_rect.left);
select_1y = (int) (- (double) (Select_y-50) / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
select_2y = (int) (- (double) (Select_y+50) / (double) m_iMaxY * (double) (m_rect.bottom - m_rect.top) + m_rect.bottom);
CDC* pDC = GetDC();
pDC -> SelectObject(&BlackPen);
pDC -> SelectObject(&GreenBrush);
pDC -> Rectangle (select_1x,select_1y,select_2x ,select_2y);
}
}
로봇 주차
void CRobotCtlDlg::Parking()
{
Sensing();
for (;(geta >=5) && (geta <=355);Sensing())
{
if ((geta>=3)&&(geta<180))
{
go_right();
}
else if((geta<=357)&&(geta>=180))
{
go_left();
}
}
m_iLeftSpeed=50;
m_iRightSpeed=50;
OnButtonforward();
Sleep(1500);
OnButtonstop();
Sleep(50);
}
추천자료
- 동력과제
- 『우리에게 다가온 홈네트워킹 시대』
- 839 전략
- IT 839 전략분석
- IT 839와 관련 산업에 관한 레포트
- IT 839 전략
- [MIS A+] web 2.0(웹 2.0) , web 3.0(웹 3.0)정의와 특징 및 활용사례 분석
- (2016 인간과과학) 인공지능의 발달이 인류사회를 어떻게 변화시킬 수 있을지 생각해 보시오,...
- (인간과과학 공통) 인공지능의 발달이 인류사회를 어떻게 변화시킬 수 있을지 생각해 보시오
- [농학과] [인간과 과학 공통] 인공지능의 발달이 인류사회에 어떤 영향을 미치고, 사회를 어...
- 4차 산업시대가 도래하면서 기업들이 이에 대비하는 차원에서의 경영혁신은 어떻게 하는 것이...
- [비교 실버산업 이해] 노인 스포츠 케어 산업
- 【비교실버산업이해】 노인 스포츠 케어 산업
소개글