# offboard_python_dasa **Repository Path**: cloudkernel-tech/offboard_python_dasa ## Basic Information - **Project Name**: offboard_python_dasa - **Description**: offboard control demo for DASA system - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: dev_kerlouddasa - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-02-08 - **Last Updated**: 2024-11-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: dasa ## README # Intro The repo is a sample demo for controlling a drone in offboard mode via python. It is designed to support various vehicles (uav, flying rover and rover) in DASA system proposed by Cloudkernel Technologies (Shenzhen) Co.,Ltd. More information: - offboard control: - Kerloud DASA system: # Environment Requirements Recommended environment is Ubuntu 18.04, ROS melodic and python 3.6.9. The repo also supports Ubuntu 16.04 with ROS kinetic, but the setting is not tested rigorously. Dependencies: * mavros (dev_kerlouddasa branch): * mavlink (dev_kerlouddasa branch): python module requirements: python3 -m pip install rospkg pyquaternion We assume that the DASA localization workspace is located in ~/DASA_space/catkinws_dasa by default, and users can install other prerequisites simply by running setup.sh # How to run ## Simulation test (single vehicle only) Note that DASA localization workspace is required to be located in the same directory of current repository. # Attention: users have to start STIL simulation for Kerloud vehicles in virtual environment first # uav case: cd ~/DASA_space/virtual_simulation/sitl_space_kerloud_uav bash sitl_run.sh $PWD/bin/px4 none gazebo kerloud300 # flying rover case: # cd ~/DASA_space/virtual_simulation/sitl_space_kerloud_flyingrover # bash sitl_run.sh $PWD/bin/px4 none gazebo kerloud_fr_scorpion # rover case: # cd ~/DASA_space/virtual_simulation/sitl_space_kerloud_rover # bash sitl_run.sh $PWD/bin/px4 none gazebo kerloud_rover # terminal 1 # source the mavros workspace in dasa locolization workspace cd ~/DASA_space/offboard_python_dasa source ../catkinws_dasa/devel/setup.bash # launch the mavros node for simulation roslaunch mavros px4.launch fcu_url:="udp://:14540@127.0.0.1:14557" # terminal 2: start the commander interface # source the mavros workspace in dasa locolization workspace cd ~/DASA_space/offboard_python_dasa source ../catkinws_dasa/devel/setup.bash # start demo programs for a specific vehicle type python3 uav_demo.py --flag_dasa False # python3 flyingrover_demo.py --flag_dasa False # python3 rover_demo.py --flag_dasa False # terminal 3: start the control interface # source the mavros workspace in dasa locolization workspace source ../catkinws_dasa/devel/setup.bash python3 px4_mavros_run.py --sim True --flag_dasa False --vehicle uav # python3 px4_mavros_run.py --sim True --flag_dasa False --vehicle flyingrover # python3 px4_mavros_run.py --sim True --flag_dasa False --vehicle rover Or simply use convenience scripts: bash scripts/start_uav_sitldemo.sh # uav case bash scripts/start_flyingrover_sitl_demo.sh # flyingrover case bash scripts/start_rover_sitl_demo.sh # rover case ## Real flight in DASA environment # terminal 1: start DASA localization nodes # source the mavros workspace in dasa locolization workspace cd ~/DASA_space/catkinws_dasa && source devel/setup.bash # launch nodes for dasa localization bash scripts/single_case/.sh # terminal 2: start the control interface # source the mavros workspace in dasa locolization workspace cd ~/DASA_space/offboard_python_dasa source ../catkinws_dasa/devel/setup.bash python3 px4_mavros_run.py --sim False --flag_dasa True --vehicle # terminal 3: start the commander interface # source the mavros workspace in dasa locolization workspace cd ~/DASA_space/offboard_python_dasa source ../catkinws_dasa/devel/setup.bash # start demo programs for a specific vehicle type python3 uav_demo.py --flag_dasa True # python3 flyingrover_demo.py --flag_dasa True # python3 rover_demo.py --flag_dasa True # then users can arm and set offboard mode with a transmitter to start the mission Or simply use convenience scripts and then operate with the transmitter by arming and setting offboard mode for DASA vehicles: bash scripts/run_uav_demo.sh # uav case bash scripts/run_flyingrover_demo.sh # flyingrover case bash scripts/run_rover_demo.sh # rover case # References: https://dev.px4.io/master/en/ros/mavros_offboard.html https://github.com/PX4/PX4-Autopilot/tree/master/integrationtests/python_src/px4_it/mavros https://pypi.org/project/mavros-python-examples/ https://github.com/mavlink/mavros/tree/master/mavros#installation