Note
Switch to ROS1 branch here
To use the Abhiswarming ROS package, ensure you have the following software installed:
- MicroXRCE
- ArduPilot
- Gazebo8
- MAVProxy
- ROS2 - Iron
These components are essential for proper functionality. Additionally, clone the following repository into your workspace directory:
git clone https://github.com/micro-ROS/micro-ROS-Agent.git ~/workspace_dir
Before proceeding, run colcon build
.
cd ~/ros2_ws
source /opt/ros/humble/setup.bash
sudo apt update
rosdep update
rosdep install --from-paths src --ignore-src -r
Warning: Ensure JAVA is installed MicroXRCE requires Java to function properly.
git clone --recurse-submodules https://github.com/ardupilot/Micro-XRCE-DDS-Gen.git
cd Micro-XRCE-DDS-Gen
./gradlew assemble
Navigate to the home directory:
cd ~
sudo apt install git
git clone https://github.com/ArduPilot/ardupilot.git
cd ardupilot
git checkout Copter-3.6
git submodule update --init --recursive
Install required dependencies:
sudo apt install python-matplotlib python-serial python-wxgtk3.0 python-wxtools python-lxml python-scipy python-opencv ccache gawk python-pip python-pexpect
Install Python packages:
sudo pip install future pymavlink MAVProxy
Append the following lines to the end of either ~/.bashrc
or ~/.zshrc
:
export PATH=$PATH:$HOME/ardupilot/Tools/autotest
export PATH=/usr/lib/ccache:$PATH
-
Install required dependencies:
sudo apt install libgz-sim8-dev rapidjson-dev
-
Set up Gazebo workspace:
mkdir -p gz_ws/src && cd gz_ws/src git clone https://github.com/ArduPilot/ardupilot_gazebo
-
Build ArduPilot Gazebo plugin:
export GZ_VERSION=harmonic cd ardupilot_gazebo mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo make -j4
To ensure ArduPilot functions correctly, create a symbolic link for python
:
ln -s /usr/bin/python3 /usr/bin/python
This command creates a soft link named python
pointing to /usr/bin/python3
.
source ~/ros2_ws/install/setup.bash
# See the node appear in the ROS graph
ros2 node list
# See which topics are exposed by the node
ros2 node info /ardupilot_dds
# Echo a topic published from ArduPilot
ros2 topic echo /ap/geopose/filtered
mavproxy.py --console --map --aircraft test --master=:14550
Following these instructions will ensure the successful setup and operation of the Abhiswarming ROS package.