티스토리 뷰

 

<< ros 설치는 되어있는 상태로 시작하였습니다.

 

1, brisbaneroboticsclub.id.au/install-mavros-in-nvidia-nano/

 

Install MavRos in Nvidia Nano | Brisbane Robotics Club

Resources https://github.com/mavlink/mavros https://github.com/mavlink/mavros/blob/master/mavros/README.md#installation Installation Notes. ROS melodic is compatible with Nvidia Nano. First install ROS melodic using the bash script from Jetson Hacks github

brisbaneroboticsclub.id.au

 

첫번째로 위에 나와있는 링크로 들어가 마브로스를 설치합니다.

 

두번째로 아래 나와있는 링크로 들어가 마브로스 설치를 마무리합니다.

dev.px4.io/master/en/ros/mavros_installation.html

 

 

MAVROS (MAVLink on ROS) · PX4 Developer Guide

No results matching ""

dev.px4.io

위 두 과정을 진행하여 마브로스를 설치하는것은 성공하였습니다.

 

 

 

-------------------+ 위에 나와있는 과정은 16.04 LTS 우분투 버전에 맞추어져 있습니다.

 

저는 18.04 LTS 버전을 사용하였으므로 처음 설치하는 부분인

 

sudo apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras 

 

이 부분을

 

 

sudo apt-get install ros-melodic-mavros ros-melodic-mavros-extras

 

으로 변경하여 설치하여야 합니다.

 

 

**catkin init 명령어시  command not found 오류가뜬다면 다다음줄에 있는

sudo apt-get install python-catkin-tools python-rosinstall-generator -y

를 먼저 실행하고 다시 

 

catkin init부터 하시면됩니다.

 

 

진행하다가 아래 부분도 kinetic 이 아닌 melodic 으로 변경하여야 합니다.

 

 

rosinstall_generator --rosdistro kinetic mavlink | tee /tmp/mavros.rosinstall

rosinstall_generator --rosdistro melodic mavlink | tee /tmp/mavros.rosinstall

 

요점은 16.04 버전은 kinetic 으로 설치하고 18.04 버전은 melodic 으로 설치한다는 것 입니다 .이 점 유의하시면 되겠습니다.

 

또한 마지막부분

 

catkin build 빌드과정에서 오류가 생길 수 있는데, 이 오류시에 위 버전을 잘못 설치하였거나 이전에 빌드한 것들과 충돌이 일어난 것입니다

 

이럴땐 

 

catkin clean

명령어를 통해 빌드를 삭제한 후

 

 

catkin build

다시 진행하면 잘 되는것을 확인하였습니다.

 

 

 

mavros 에 관련된 데이터는 아래 링크에 나와있습니다.

 

wiki.ros.org/mavros/Plugins

 

mavros/Plugins - ROS Wiki

3dr_radio Publish 3DR Radio status to diagnostics and topic. Published Topics ~radio_status (mavros_msgs/RadioStatus) Status received from modem, same as RADIO_STATUS message. actuator_control Sends acruator commands to FCU. Subscribed Topics ~actuator_con

wiki.ros.org

 

 

예를들어

제가 원하는 데이터는 gps의 값이므로 

 

사진에 나와있는 부분에서 찾아볼 수 있을 것입니다.

 

명령어 rostopic list  를 통해서도 어떠한 토픽을 받을 수 있는지 짐작할 수 있을 것입니다.

 

mavros를 이용한 px4와의 연결은 

 

roslaunch mavros px4.launch fcu_url:=/dev/ttyUSB0:921600

 

명령어를 통해 할 수 있다는데 저는 계속 안되네요... 연구해보도록 하겠습니다. 

 

연결에 대한 내용은 다음 포스팅에서 서술하겠습니다

댓글
최근에 올라온 글
최근에 달린 댓글
250x250