본문 바로가기
RobotGrasping

[FRANKA EMIKA] 초기 세팅

by 모짜렐라까망베르 2023. 4. 27.

현재 인턴을 하고 있는 연구실에서는 FRANKA EMIKA를 이용해서 대부분의 연구를 진행한다.

어쩌다보니 박사과정 학생과 함께 FRANKA EMIKA 초기 세팅을 하게 되어서 그 기록을 조금이라도 남겨놓으려고 한다.

 

 

예전 다른 연구실에 있을때, 초기세팅을 아무것도 모르는 학부생들끼리 해야해서 굉장히 어려웠는데...... 확실히 사수가 있으니까 한결 편했다... 분명 에러가 발생하면 구글에 쳐보는 건 똑같은데, 신기하게도 사수분들은 훨씬 빠르게 문제를 해결한다. 나는 삽질을 엄청 해야하는데.... 나도 그런 짬이 생기면 좋겠다.....ㅎ그나마 한가지 위로가 되었던 점은... user guide를 그대로 따라해도 error가 발생하는 것은... 나만 그런 것이 아니라는 것....! 박사님도... 그러더라....!

 

또 중간중간 다른 문제들도 많이 생겼는데... 예를 들면 로봇을 동작시키면 갑자기 데스크탑 인터넷이 끊긴다던지..... 이런 문제들을 연구실 박사님, 연구원님, 석사과정학생, 박사과정 학생이 우루루와서 해결하는 것이 아주 좋았다......!!!!! 물론 나도 해결하고자 노력은 했지만, 역시 연륜은... 못 이긴다....

지금 눈독 들이고 있는 자대 랩실이... 신생랩인데... 이런 걸 생각하면 조금 대규모 랩실을 가고 싶기도......!!!

 

대부분 desktop으로 진행을 해서 중간중간 캡처는 못해놨지만, 큰 틀이라도 기록해놓으면 어디엔가 도움이 되겠지.....

사실 아래 페이지에 있는 걸 그대로 따라하긴 했지만...그래도..중간에 어떤 에러가 떴었는지라도 적어놓자!

https://frankaemika.github.io/docs/index.html

 

Franka Control Interface Documentation — Franka Control Interface (FCI) documentation

The Franka Control Interface (FCI) can be accessed via several open source components which we provide on GitHub. We welcome contributions and suggestions for improvements. Note Using a robot with system version 4.2.0 or higher requires to enable the FCI m

frankaemika.github.io

1. 우분투 설치

데스크탑에 unbuntu 20.04를 설치했다.

 

2. real-time kernel 설치

우리는 libfranka를 이용해 franka를 제어할 예정이기 때문에 real-time kernel을 setting했다.

아래 url의 setting up the real-time kernel을 쭉 따라서 하면된다.

https://frankaemika.github.io/docs/installation_linux.html

 

Installation on Linux — Franka Control Interface (FCI) documentation

Hint These packages might not always be up-to-date, as they are only synced at certain intervals. Read the changelog at https://frankaemika.github.io to find out which libfranka version is required for a particular robot software version. If this doesn’t

frankaemika.github.io

분명 그대로 따라했는데, 중간중간 문제가 발생하긴 했다.

 

첫번째 문제: curl이 없음 -> 이건 그냥 sudo apt upgrade랑 sudo apt install curl로 해결되었다.

두번째 문제:Unable to boot RT kernel at grub -> 사실 처음에 grub이 안 나타나기까지 했어서 bios에 진입해서 secure boot mode를 disable하고 sudo gedit /etc.default/grub에 들어가서 두 가지 항목의 값을 바꿔줬다...(아래링크 참고)

https://askubuntu.com/questions/668049/grub-menu-at-boot-time-holding-shift-not-working

 

Grub menu at boot time... "holding shift" not working

I read here at this thread that holding Shift during boot can bring up the GRUB menu. However I try holding one or the other Shift keys, tapping, tapping then holding, nothing works. Am I missing

askubuntu.com

 

3. Network 세팅

로봇이랑 Controller, desktop을 연결한 다음 아래 페이지를 따라서 network를 세팅한다.

controller adress에 맞춰서 desktop에서 ethernet connection을 설정해주면 된다.

https://frankaemika.github.io/docs/getting_started.html

 

Getting started — Franka Control Interface (FCI) documentation

This section describes how to set up a static IP address on Ubuntu 16.04 using the GUI. Follow the official Ubuntu guide if you prefer to use the command line. First, go to Network Connection widget. Select the wired connection you will be using and click

frankaemika.github.io

 

4. ip 주소 접속

network 세팅이 제대로 되었다면, controller의 ip adress에 접속했을때 desk가 나온다.

처음 로봇을 연결하면 노란색 불빛이 깜박인다.

brake를 unlock하고 activation device를 잠긴 상태로 두면 흰색 불빛이 켜진다.

(desk에서 joints의 unlock을 클릭해서 brake unlock)

흰색 불빛 상태일 때, 버튼을 누르면서 로봇을 직접 움직일 수 있다.

 

 

5. libfranka Build하기

아래 링크의 "Building libfranka"를 따라하면 된다.

https://frankaemika.github.io/docs/installation_linux.html#building-libfranka

 

Installation on Linux — Franka Control Interface (FCI) documentation

Hint These packages might not always be up-to-date, as they are only synced at certain intervals. Read the changelog at https://frankaemika.github.io to find out which libfranka version is required for a particular robot software version. If this doesn’t

frankaemika.github.io

 

6. 테스트 해보기

~/libfranka/build/examples에서 아래와 같은 코드로 예제를 실행할 수 있다.

이를 위해서는 먼저 desk에서 FCI를 active하고 아래 사진의 저 검정버튼을 당겨서 파란불빛이 켜지도록 해야한다.

그런 다음 아래 코드를 실행하면 examples을 돌려볼 수 있다.

./joint_impedance_control 192.xxx.x.xxx

나는 joint_impedance_control과 cartesian_impedance_control 두 개를 실행해보았다.

joint_impedance_control은 end-effector가 원을 그리는 예제였고, catesian_impedance_control은 사람이 end-effector를 다른 위치로 밀쳐도 다시 제자리로 돌아오는 예제였다.

 

추가로 불빛색깔에 대한 몇 가지 정보를 더 적어놓자면, 핑크색은 썩 좋지 않은 신호... 빨간색은 큰일난 것 이라고 하셨다...! emergency라구.... 빨간불빛이 켜지면 바로 선임연구원님을 부르라고 하셨다...!

 

7. 종료하기

사실 종료는 별 거 없긴한데...혹시나해서...ㅎ

desk에서 brake 다시 lock하고, shut down하면된다. 

이때 주의해야할 점은 shut down을 눌렀다고 해서 바로 controller의 스위치를 끄면 안 된다.

controller의 fan이 멈출 때까지 기다려야한다.

 

 

 

tmi: 박사과정 학생이 왜 이 로봇이름이 FRANKA EMIKA인지 알려줬다. 현재 내가 있는 연구실은 TUM의 MIRMI인데, 여기 대장...? 느낌의 Sami Haddadin 교수님의 딸 이름이라고 한다...ㅎ