Repository Summary
Checkout URI | https://gitlab.pdmfc.com/drones/ros1/heifu.git |
VCS Type | git |
VCS Version | debian |
Last Updated | 2021-01-13 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
heifu_battery | 0.7.2 |
heifu_bringup | 0.7.2 |
heifu_description | 0.7.2 |
heifu_diagnostic | 0.7.2 |
heifu_mavros | 0.7.2 |
heifu_msgs | 0.7.2 |
heifu_safety | 0.7.2 |
heifu_simple_waypoint | 0.7.2 |
heifu_tools | 0.7.2 |
sensors_node | 0.7.2 |
README
Installation
ROS packages dependences: * gazebo-ros * mavros here * mavlink * geographic-msgs * tf2-eigen * control-toolbox * ros_utils here * GNSS_utils here
GeographicLib dependeces:
sudo apt-get install libgeographic-dev
sudo apt-get install geographiclib-tools
Run the script in: install_geographiclib_datasets.sh
Compile this directory in your ROS workspace.
Then copy the already configured files to the mavros directory:
cd ${YOUR_ROS_WORKSPACE}/src/heifu/heifu_scripts_firmware
cp apm_config.yaml $(rospack find mavros)/launch/
cp apm.launch $(rospack find mavros)/launch/
cp node.launch $(rospack find mavros)/launch/
NOTE: Adjust the yaml loader script to deal with the argument substitution in the roslaunch of yaml files:
cd ${YOUR_ROS_WORKSPACE}/src/heifu/heifu_scripts_firmware
cp loader.py /opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/
Dont forget to add gimbal and mavros to the source folder and run catkin build
To run the nodes with a real drone:
Just launch - Heifu_bringup
roslaunch heifu_bringup heifu_bringup.launch
Launch Input arguments:
argSafety - Activates the safety zone mode and run the node heifu_safety.
argTakeOffAltitude - Defines the Takeoff altitude.
argSim - Activates the simulation mode. Loads Gazebo and a pre-configured world with the drone HEIFU.
argSecredas - Activates the Secredas Usecases. (Needs extra packages secredas).
argUseCase - Defines witch usecase of Secredas will be loaded.
argPlanners - Loads the Planners nodes with static colision avoidance (Needs extra packages Planners).
Heifu Simulation:
First make sure that the ArduPilot firmware is correctly installed, by following the steps described here.
To open the simulation:
1st terminal - Launch Heifu_bringup
roslaunch heifu_bringup heifu_bringup.launch argSim:=true
2nd terminal - Launch ArduPilot firmware
cd ~/ardupilot/ArduCopter/
sim_vehicle.py -v ArduCopter -f gazebo-heifu -I1
3rd terminal - Launch Client Interface (Only to work on Beyond Skyline app)
cd ~/heifu_ws/src/heifu/heifu_interface
python heifu_interface.py
To load Multples drones in simulation: 1st terminal - Launch Heifu_bringup
where that arguments must be unique: - DRONE_NAME: Drone namespace - DRONE_NUMBER: Drone ID number to simulated firmware (must be the same value launched in ArduPilot Firmware argument "-I") - LOCAL_POSITION_X: Local position X that the drone will be spawned in meters - LOCAL_POSITION_Y: Local position Y that the drone will be spawned in meters
Run Gazebo first:
roslaunch heifu_description gazebo.launch
Script to launch a drone in simulation:
cd ~/heifu_ws/src/heifu/scripts
sh spawn_drone.sh DRONE_NAME DRONE_ID DRONE_POSITION_X DRONE_POSITION_Y
Without script:
roslaunch heifu_bringup heifu_bringup.launch argSim:=true argNamespace:=DRONE_NAME argID:=DRONE_NUMBER xi:=LOCAL_POSITION_X yi:=LOCAL_POSITION_Y gazebo:=false
2nd terminal - Launch ArduPilot firmware The argument -I must be the same DRONE_NUMBER
cd ~/ardupilot/ArduCopter/
sim_vehicle.py -v ArduCopter -f gazebo-heifu -IDRONE_NUMBER
3rd terminal - Launch Client Interface The argument DRONE_NAME must be the same on Heifu_bringup
cd ~/heifu_ws/src/heifu/heifu_interface
python heifu_interface.py DRONE_NAME
Example to 2 drones in simulation: Launch Gazebo:
roslaunch heifu_description gazebo.launch
Launch drone 1: 1st terminal - Launch Heifu_bringup DRONE 1
roslaunch heifu_bringup heifu_bringup.launch argSim:=true argNamespace:=heifu argID:=1 xi:=10 yi:=5 gazebo:=false
2nd terminal - Launch ArduPilot firmware DRONE 1
cd ~/ardupilot/ArduCopter/
sim_vehicle.py -v ArduCopter -f gazebo-heifu -I1
3rd terminal - Launch Client Interface DRONE 1
cd ~/heifu_ws/src/heifu/heifu_interface
python heifu_interface.py heifu
Launch drone 2: 1st terminal - Launch Heifu_bringup DRONE 2
roslaunch heifu_bringup heifu_bringup.launch argSim:=true argNamespace:=valk argID:=2 xi:=-10 yi:=-5 gazebo:=false
2nd terminal - Launch ArduPilot firmware DRONE 2
cd ~/ardupilot/ArduCopter/
sim_vehicle.py -v ArduCopter -f gazebo-heifu -I2
3rd terminal - Launch Client Interface DRONE 2
cd ~/heifu_ws/src/heifu/heifu_interface
python heifu_interface.py valk
Packages
Heifu Bringup
Responsible for load all packages.
Heifu Description
This package contains the drone robot HEIFU and the worlds for the simulation.
Heifu Diagnostic
Responsible for verify the GPS fix state of the drone and send the information to the application.
Subscribers:
- /diagnostics
Publishers:
* /heifu/g/f/m
Heifu Interface
This package is the bridge between the ROS and the application.
Subscribers:
- /heifu/disarm
- /heifu/takeoff
- /heifu/land
- /heifu/mavros/local_position/pose
- /heifu/mavros/local_position/velocity_local
- /heifu/mavros/global_position/global
- /heifu/mavros/state
- /heifu/c/s
- /heifu/mavros/battery
- /heifu/mavros/global_position/raw/satellites
- /heifu/g/f/m
Publishers:
- /warning
- /heifu/frontend/cmd
- /heifu/land
- /heifu/takeoff
- /heifu/mode_auto
- /heifu/rtl
- /heifu/global_setpoint_converter
Services:
- /heifu/mavros/mission/clear
- /heifu/mavros/set_mode
* /heifu/mavros/cmd/arming
Heifu Mavros
This is the main package to control the drone. Responsible for message conversions and commands between the packages and the mavros node.
Subscribers:
- /heifu/takeoff
- /heifu/land
- /heifu/disarm
- /heifu/cmd_vel
- /heifu/xbox_vel_raw
- /heifu/mavros/local_position/pose
- /heifu/rtl
- /heifu/land_vel_raw
- /heifu/simulation_raw
- /heifu/frontend/cmd
- /heifu/mode_auto
- /heifu/global_setpoint_converter
- /heifu/mission/start
- /heifu/mission/stop
Publishers:
- /heifu/mavros/setpoint_velocity/cmd_vel
- /heifu/xbox_vel
- /heifu/land_vel
- /heifu/simulation
- /heifu//g/f/m
- /heifu/mavros/setpoint_position/local
Services:
- /heifu/mavros/cmd/arming
- /heifu/mavros/set_mode
* /heifu/mavros/takeoff
Heifu Msgs
This package contain the messages and services necessary to work.
Heifu Safety
If loaded, this package controls the flight area and velocity limit of the drone to a safety real demonstration.
Subscribers:
- /heifu/mavros/local_position/pose
- /heifu/xbox_vel
Publishers:
- /heifu/xbox_vel_safety
Services:
- /heifu/EnableSafetyFence
Heifu Simple Waypoint
This package receive a setpoint and make the drone fly pointed to desired position.
Subscribers:
- /heifu/mission/setpoint
- /heifu/mavros/local_position/pose
Publishers:
- /heifu/mission/start
- /heifu/mission/stop
* /heifu/mavros/setpoint_position/local
Heifu Tools
Responsible for convert the velocity command messages.
Subscribers:
- /heifu/joy
Publishers:
- /heifu/dummy_vel