The driving node for a mid-level navigation software to implement flight actions with PX4 and ROS.
Please download and install using the instructions for the QUT Flight Stack
roslaunch spar_node spar.launch
- If you have the
mavros
packages installed, you can use the following launch file to connect to a PX4-based autopilot:spar_mavros.launch
- If you have the
uavasr_emulator
package installed, you can use the following launch file to startspar
and the UAVASR emulator:spar_uavasr.launch
- If you have the
uavusr_emulator
package installed, you can use the following launch file to startspar
and the UAVUSR emulator:spar_uavusr.launch
The spar_node
will present the ~/flight
action once the following conditions are met:
- The UAV is armed
- The UAV is in
OFFBOARD
mode
The flight action will stay active as long as these conditions hold. If the UAV changes mode or disarms, the any current actions will be cancelled. In this way, the action is only presented in the situation where the UAV is ready for flight. This means that the wait_for_server()
function in the simple_action_client
can be used to wait for the action to become available (which in turn allows any other navigation nodes to be started in any order).
Please see the scripts
folder for integration examples of the ~/flight
action:
takeoff
: Performs a take-off at a configurable speed to a set altitude at the current locationland
: Performs a landing at a configurable speed at the current location (relies on the PX4 auto-disarm function to be marked "complete")takeoff_and_land
: Performs a take-off, short pause, then landing as per the above featuresgoto
: Performs a "Go-To" waypoint; travel from the current locaiton to a set location at a configurabe speed (requires command line arguments, use "--help" option for more information)demo_wp
: Performs a preset 4-waypoint task from with a range of configurable settings (waypoint radius, movement speed, etc.)demo_wp_roi
: Performs a preset4-waypoint task as above, with additional code to perform a diversion and continuation if ageometry_msgs/PoseStamped
message is recieved.
- Autopilot State (mavros_msgs/State):
/spar/mav_state
- Current Position (geometry_msgs/PoseStamped):
/spar/pose
- Local Position Setpoint (mavros_msgs/PositionTarget):
/spar/setpoint