https://github.com/mavlink/mavros/tree/ros2/mavros

Installation (follow the binary installation steps; replace foxy with humble):

https://github.com/mavlink/mavros/tree/ros2/mavros#installation

  1. Use apt for installation:

    sudo apt install ros-humble-mavros
    
  2. Then install GeographicLib datasets by running the install_geographiclib_datasets.sh script:

    ros2 run mavros install_geographiclib_datasets.sh
    
    1. If you get This script require root privileges! error:

      wget <https://raw.githubusercontent.com/mavlink/mavros/ros2/mavros/scripts/install_geographiclib_datasets.sh>
      chmod +x ./install_geographiclib_datasets.sh
      sudo ./install_geographiclib_datasets.sh
      

      Then it will install:

      Installing GeographicLib geoids egm96-5
      Installing GeographicLib gravity egm96
      Installing GeographicLib magnetic emm2015