자율주행/ROS기반 자율주행모형차 개발
(4) raspberry pi 에 아두이노 설치후 rosserial 사용
Hagler
2018. 7. 4. 06:21
※ raspberry pi ubuntu mate 기준
sudo apt-get install arduino arduino-core
아두이노 설치
sudo apt-get install ros-kinetic-rosserial-arduino
sudo apt-get install ros-kinetic-rosserial
rosserial 설치
sudo usermod -a -G dialout your_user_here
your_user_here에 자신의 리눅스 계정명 입력
ex) sudo usermod -a -G dialout hagler
cd sketchbook/libraries
rosrun rosserial_arduino make_library.py .
ros_lib 설치
라즈베리파이에 아두이노 연결후

HelloWorld 예제 업로드
rosserial 정상작동확인
roscore
rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=57600
rostopic echo chatter
data: hello world!가 반복해서 뜨면 정상작동하는것이다.
※ https://blog.naver.com/PostView.nhn?blogId=chandong83&logNo=220851270328&categoryNo=62&parentCategoryNo=0&viewDate=¤tPage=1&postListTopCurrentPage=1&from=postView&userTopListOpen=true&userTopListCount=20&userTopListManageOpen=false&userTopListCurrentPage=1 참고