#19 omorobot_r1mini 주행
1. ros melodic 잘 다운되었는지 확인
2. omorobot 설치
cd ros_catkin_ws/src
git clone https://github.com/omorobot/omo_r1mini
3. rplidar melodic버전 설치
git clone https://github.com/Slamtec/rplidar_ros.git
***오류
=>해결
cd ros_catkin_ws/src/rplidar_ros 패키지에 Cmakefiles에 저 단락에 + std_srvs를 추가해준다.
https://github.com/Slamtec/rplidar_ros/pull/27
fix missing std_srv dependency when compiling in isolation by phil123456 · Pull Request #27 · Slamtec/rplidar_ros
when compiling with catkin_build_isolated or build tools, std_srvs dependency was missing
github.com
4. catkin_make
catkin_make
***오류
=>해결
sudo chown $USER: -R /home/pi/ros_catkin_ws
catkin_make #안되면 catkin_make_isolated
아마 이게 새로운 작업공간에 빌드,,? 하게 해주는 것 같다.
***roscore에서 생기는 오류
ERROR: cannot launch node of type [rosout/rosout]: Cannot locate node of type [rosout] in package [rosout]. Make sure file exists in package path and permission is set to executable (chmod +x)
=>해결
nano ~/.bashrc에 들어가서 확인
source /opt/ros/melodic/setup.bash
source ~/ros_catkin_ws/devel_isolated/setup.bash
이렇게 설정 되어 있어야 한다.
5. 로봇 주행
USB연결로 TX/RX통신이 가능하다.
아래 사진처럼
연결되어있는 USB port를 확인 teleop시행 시 뒤에 이곳에 연결하라는 커밋 달아주어야함.
1) terminal 1 : roscore시행
roscore
2) terminal 2 : teleop //USB일때
roslaunch omo_r1mini_bringup omo_r1mini_bringup.launch set_port:=/dev/ttyUSB0
3) terminal 3 : keyboard
roslaunch omo_r1mini_teleop omo_r1mini_teleop_key.launch