# minigc **Repository Path**: shu-peixuan/minigc ## Basic Information - **Project Name**: minigc - **Description**: minidrone无人机集群地面站 - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-11-17 - **Last Updated**: 2024-10-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # minigc Minigc is a python ground station GUI designed for Minidrone UAV swarm control and state displaying. This GUI is developed using `python3 tkinter`. gui ## Install Environment: **python3**, **ROS1** **noetic**, ubuntu20 - **Method 1 (recommended)** Install from source: ```bash git clone https://gitee.com/bhswift/minigc.git cd minigc/ ### Install dependencies sudo chmod +x install_dependencies.sh install_minimal_dependencies.sh sudo ./install_minimal_dependencies.sh # For minimal dependencies. Make sure this step succeeds. # sudo ./install_dependencies.sh # For UWB/3Dview/Simulation. Make sure this step succeeds. ### Install minigc pip3 install -e . # do not neglect the dot '.' !!! # pip install -e . # if you use ubuntu20 and have no pip3 ``` - **Method 2 (not up-to-date)** Install from PyPI: ```bash ### Install dependencies git clone https://gitee.com/bhswift/minigc.git sudo chmod +x minigc/install_dependencies.sh sudo ./minigc/install_dependencies.sh # Make sure this step succeeds. ### Install minigc pip3 install minigc --upgrade # Install from PyPI online echo "export PATH=\$PATH:~/.local/bin" >> ~/.bashrc ``` To uninstall: ```bash pip3 uninstall minigc ``` ## Usage ### Launch - Set minidrone ip and pose_source, markerset_name or uwb_tag_id in the `minigc/config/minidrone_config.yaml` (You can also change the config file path by clicking minigc browse button). - **Launch the GUI:** ```bash minigc # in a terminal (it will launch roscore if no rosmaster is on) ``` - **Press the number button and connect to the corresponding UAV.** The Yellow means connecting and the Green means connected. Re-clicking the button will reconnect to the UAV. The battery and position status will be display in colors if connected where Green means in good health. - **Right click the number button to perform the arm/disarm/switch modes functions for a single UAV.** You can also execute the commands for all UAVs specified by the 'from-to' number box. ### Positioning source Minigc will forward the position data from either **UWB** or **motion capture system** to the uniform topic `/uav1/mavros/vision_pose/pose (geometry_msgs/PoseStamped)` depending on the `minidrone_config.yaml`. Then `mocap` or `nluwb` bar will turn green if the positioning source is streaming pose data, and it will turn yellow if the positioning source data is not equal to the `mavros/local_position/pose` data, which means the the pose data is not accepted by the PX4 FCU. #### 1. UWB Connect the nooploop UWB console to the computer by USB. Choose the port and baud_rate in the GUI, then click the UWB switch button. It is equal to the following code: ```bash roslaunch linktrack.launch port_name:="/dev/ttyXXX" baud_rate:="xxx" ``` In this UWB positioning mode, the height and orientation quaternion of Minidrones are get from the minidrone onboard sensor. Only x and y UWB data are adpoted by the drones. #### 2. Motion capture system Input the vrpn server IP in the GUI (the IP of the motion capture software computer), then click the vrpn switch button. It is equal to the following code: ```bash # change the vrpn server ip according to your motion capture software computer IP. roslaunch vrpn_client_ros sample.launch server:="192.168.xx.xxx" ``` Check `/uav1/mavros/local_position/pose` to see x, y, z and quaternion of Minidrone1 for example: ```bash rostopic echo /uav1/mavros/local_position/pose ``` ### Simulation Press the sim button and relaunch all the nodes. The simulation is provided by [swarm_sync_sim](https://gitee.com/bhswift/swarm_sync_sim.git). You must install the full dependencies to perform the simulation. ```bash sudo chmod +x install_dependencies.sh sudo ./install_dependencies.sh # Make sure this step succeeds. ``` ### Notice 1. **If the position source is uwb and the minidrones have no magnetometer, align the head of the Minidrone to the world Y axis when powered on** since the PX4 stack will set the initial heading as North (world Y in ENU frame). ### Develop Upload on PyPI: ```bash sudo apt install twine -y python3 setup.py sdist bdist_wheel twine upload dist/* ```