Only released in EOL distros:
Package Summary
Interfaces to the "HighLevel" Processor of the Ascending Technologies helicopters where fast IMU datafusion with arbitrary external position input and position control is executed at 1 kHz. Furthermore, all relevant data as IMU, GPS and status can be accessed at configurable rates and baudrates.
- Author: Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
- License: BSD
- Source: git https://github.com/ethz-asl/asctec_mav_framework (branch: fuerte)
Package Summary
Interfaces to the "HighLevel" Processor of the Ascending Technologies helicopters where fast IMU datafusion with arbitrary external position input and position control is executed at 1 kHz. Furthermore, all relevant data as IMU, GPS and status can be accessed at configurable rates and baudrates.
- Maintainer: Markus Achtelik <markus.achtelik_devel AT mavt.ethz DOT ch>
- Author: Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
- License: BSD
- Source: git https://github.com/ethz-asl/asctec_mav_framework.git (branch: master)
Package Summary
Interfaces to the "HighLevel" Processor of the Ascending Technologies helicopters where fast IMU datafusion with arbitrary external position input and position control is executed at 1 kHz. Furthermore, all relevant data as IMU, GPS and status can be accessed at configurable rates and baudrates.
- Maintainer: Markus Achtelik <markus.achtelik_devel AT mavt.ethz DOT ch>
- Author: Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
- License: BSD
- Source: git https://github.com/ethz-asl/asctec_mav_framework.git (branch: master)
Package Summary
Interfaces to the "HighLevel" Processor of the Ascending Technologies helicopters where fast IMU datafusion with arbitrary external position input and position control is executed at 1 kHz. Furthermore, all relevant data as IMU, GPS and status can be accessed at configurable rates and baudrates.
- Maintainer: Markus Achtelik <markus.achtelik_devel AT mavt.ethz DOT ch>
- Author: Markus Achtelik, Michael Achtelik, Stephan Weiss, Laurent Kneip
- License: BSD
- Source: git https://github.com/ethz-asl/asctec_mav_framework.git (branch: master)
Overview
This package provides a ros interface to communicate with the High Level Processor (HLP) of the AscTec AutoPilot. Therefore, firmware for the HLP is needed which is provided in the asctec_hl_firmware package. It does not work with the firmware shipped with the HLP!
Safety Instructions
We put our best effort in making this package working safely. However, usage is completely on your own risk. We disclaim any liability for injuries, damages of the helicopter or to objects. It is your responsibility to ensure a safe operation environment! Always comply with Ascending Technologies' safety guidelines. Additionally:
- A safety pilot must always be present and he must have the training and ability to fly the UAV manually in any situation.
- Do not fly over people or close to people. Spectators always stand behind the safety pilot.
- Always wear proper protection gear (gloves, safety goggles). The safety pilot as well as spectators.
In case of any unexpected behavour, the safety pilot should switch both the serial interface switch to "off" and the flight mode switch to "acc" (both switches point away from the pilot then).
When having a new or changed setup (new/other controller, different parameters etc), carefully check the expected outputs before flying.
Setup
Serial Connection to the Highlevel Processor
Using a wired connection is recommended, e.g. to the Ascending Technologies AtomBoard. The cable supplied with the AtomBoard can be used. Connect to the serial port 0 of the Highlevel Processor ("HL serial 0") as shown in the AscTec AutoPilot documentation in chapter 4.1. In this case, set ~serial_port to the correct port, and leave ~serial_port_rx and ~serial_port_tx empty.
If you plan to use a wireless serial link, it might be useful to use a dedicated link for each rx and tx for higher bandwidth. In that case, set ~serial_port_rx and ~serial_port_tx accordingly and leave ~serial_port empty.
Baudrate
The baudrate at which the hl_node communicates with the HLP can be set with the ~baudrate parameter. If it doesn't match a supported standard baudrate, the closest standard baudrate is chosen. The HLP tries to detect the baudrate automatically at startup or if there wasn't any communication with the hl_node for longer than ~10 seconds. hl_node sets up its serial port(s) with the desired baudrate and sends a packet ('a') which the HLP uses to detect the correct baudrate. In order for this to work, always switch on the HLP first, then start hl_node. In case you need to restart hl_node with a different baudrate, you have to wait ~10 s until the HLP accepts new baudrate configure packets. Restarting with the same baudrate works immediately. Tested baudrates are: 57600, 115200, 230400, 460800, 921600.
Configurable Packet Rates
Packet rates of certain packets can be configured with the ~packet_rate_* parameters. No polling is done - instead a configuration packet is sent to the HLP which will send the packets in the desired rate accordingly. Note that no checking is done if the packet rates exceed the available bandwidth, so check the correct rate with
rostopic hz <topic> -w <expected rate>
Modes of Operation
In all operation modes, you can enable/disable control output to the LLP by setting the ~/enable_* parameters accordingly. This is helpful, e.g. to debug a controller on a single axis first. Directions and orientations follow the ROS coordinate frame conventions. As with the direct interface to the LLP, it only accepts commands when the serial enable switch is on. In failure, flip off this switch and put the flightmode switch to "acc". There are three modes you can operate the helicopter which you can select with the ~/position_control parameter:
Direct Acceleration Commands
Set ~/position_control to "off". This mode just forwards roll, pitch, yaw (angular velocity) and thrust commands to the LLP. This is similar to directly send commands to the LLP's serial interface. Set the values in asctec_hl_comm/mav_ctrl in rad for roll and pitch, in rad/s for yaw and 0.0 ... 1.0 for thrust and set asctec_hl_comm/mav_ctrl/type to "acceleration". For the scaling to work correctly, you need to set ~/k_stick and ~/k_stick_yaw to the values you can read out from the LLP with the AscTec control software (default 25, 120). Messages have to arrive at least at 10 Hz, otherwise nothing will be forwarded to the LLP. Note: yaw rates are limited to +- 85% so that the motors cannot be switched on/off accidentally in case of bad commands (motors idle, full yaw).
GPS Based Velocity Control
Set ~/position_control to "GPS" and set asctec_hl_comm/mav_ctrl/type to "velocity" in your messages. Commands are also forwarded to the LLP, but the GPS bit is set additionally. The values in asctec_hl_comm/mav_ctrl correnspond to velocities in boady coordinates in m/s and rad/s respectively. For the scaling to work correctly, you need to set ~/max_velocity_* according to the maximum "stick-GPS" velocites which you can read out from the LLP with the AscTec control software. Defaults are 5 m/s for x/y, and 2 m/s for z. Messages have to arrive at least at 10 Hz, otherwise nothing will be forwarded to the LLP. Note: yaw rates are limited to +- 85% so that the motors cannot be switched on/off accidentally in case of bad commands (full descend rate, full yaw)
Sending GPS waypoints over the HLP to the LLP is currently not implemented as it is not available on the interface between HLP and LLP.
Position Control on the HLP
This is the most interesting part and main motivation for this project. It is designed for position control based on position measurements from e.g. onboard visual SLAM with typically slow update rates. To deal with those delays, datafusion with IMU and position control is performed on the HLP at a rate of 1 kHz. Details on how the controller and datafusion work can be found in Onboard IMU and Monocular Vision Based Control for MAVs in Unknown In- and Outdoor Environments. To work with this mode, please go carefully through this tutorial.
Nodes
hl_interface
interface to the high level processor (HLP) of the AscTec AutoPilotSubscribed Topics
fcu/control (asctec_hl_comm/mav_ctrl)- listens to control commands on this topic
- listens on this topic for pose updates
- listens on this topic for state updates. This bypasses the state estimation on the HLP
- Listens for updates from ethzasl_sensor_fusion
Published Topics
fcu/imu_custom (asctec_hl_comm/mav_imu)- custom imu package without covariance, with height and differential height
- Imu sensor data
- values of the RC channels receiver by the AutoPilot
- status of the helicopter
- debug values from the SSDK
- publishes the pose that is currently used for position control on the HLP
- publishes the current prediction for ethzasl_sensor_fusion
Services
fcu/motor_control (asctec_hl_comm/mav_ctrl_motors)- service to switch the motors on/off. Use this carefully, it also works during flight!.
Parameters
Static parameters
parameters that are statically set- serial port for rx
- serial port for tx
- serial port used for rx and tx
- baudrate for the serial port(s)
- frame id
- gain from AutoPilot values to 1/1000 degree for the input from the pitch and roll "stick"
- gain from AutoPilot values to 1/1000 degree for the input from the yaw "stick"
- standard deviation for angular velocity, default from experiments
- standard deviation for linear acceleration, default from experiments
Dynamically Reconfigurable Parameters Part I (fcu)
See the dynamic_reconfigure package for details on dynamically reconfigurable parameters.- configures packet rate [Hz] of imu packet. Range: 0.0 to 1000.0
- configures packet rate [Hz] of rc packet. Range: 0.0 to 1000.0
- configures packet rate [Hz] of gps packet. Range: 0.0 to 1000.0
- configures packet rate [Hz] of ssdk debug packet. Range: 0.0 to 1000.0
- configures packet rate [Hz] of ekf state packet. Range: 0.0 to 1000.0
- enables x-control.
- enables y-control.
- enables z-control.
- enables yaw-control.
- Enables position control either on the HLP or GPS based position control on the LLP. Possible values are: POSCTRL_OFF (off): position control off, POSCTRL_HIGHLEVEL (HighLevel): position control runs on the HLP., POSCTRL_GPS (GPS): gps position control on the LLP.
- Determines where state estimation is performed. Possible values are: STATE_EST_OFF (off): state estimation off, STATE_EST_HIGHLEVEL_SSDK (HighLevel_SSDK): state estimation runs on the HLP within the SSDK., STATE_EST_HIGHLEVEL_EKF (HighLevel_EKF): state estimation runs on the HLP within an EKF., STATE_EST_EXTERN (Extern): state estimation is performed externally.
- maximum velocity in x/y [m/s]. Range: 0.0 to 10.0
- maximum velocity in z [m/s]. Range: 0.0 to 2.0
- maximum velocity yaw [rad/s]. Range: 0.0 to 1.57
- lower bound for position x [m]. Range: -1000.0 to 1000.0
- lower bound for position y [m]. Range: -1000.0 to 1000.0
- lower bound for position z [m]. Range: -1000.0 to 1000.0
- upper bound for position x [m]. Range: -1000.0 to 1000.0
- upper bound for position y [m]. Range: -1000.0 to 1000.0
- upper bound for position z [m]. Range: -1000.0 to 1000.0
Dynamically Reconfigurable Parameters Part II (fcu/ssdk)
See the dynamic_reconfigure package for details on dynamically reconfigurable parameters.- Enables listening on tf transforms for position updates for the state estimation on the HLP.
- tf reference frame.
- tf frame of the helicopter.
- used to send all parameters at once.
- natural frequency of the position controller's reference model for x and y axis. Range: -100.0 to 100.0
- natural frequency of the position controller's reference model for the z axis. Range: -100.0 to 100.0
- damping of the position controller's reference model for x and y axis. Range: -100.0 to 100.0
- damping of the position controller's reference model for the z axis. Range: -100.0 to 100.0
- replace <channel> by 1-50. Parameter channels used to configure the SSDK running on the HLP. See detailed description for assignments and values. Range: -100.0 to 100.0
Required tf Transforms
world → mav- tf transform from world to helicopter. Used as position update for state estimation on the HLP. Can be changed with ~ssdk/tf_ref_frame_id and ~ssdk/tf_tracked_frame_id.
waypoint_server
provides an action server interface to send the helicopter to waypointsAction Goal
fcu/waypoint/goal (asctec_hl_comm/WaypointActionGoal)- accepts a new waypoint.
Action Result
fcu/waypoint/result (asctec_hl_comm/WaypointActionResult)- finally reached waypoint, success/failure.
Action Feedback
fcu/waypoint/feedback (asctec_hl_comm/WaypointActionFeedback)- current position of the helicopter and distance to waypoint.
Subscribed Topics
fcu/current_pose (asctec_hl_comm/mav_ctrl)- listens to the pose that the helicopter's position controller is currently using. Needed to determine if a waypoint is reached and for feedback messages.
waypoint_client
sample waypoint client to send waypoints from the command lineAction Goal
fcu/waypoint/goal (asctec_hl_comm/WaypointActionGoal)- sends a new waypoint.
Action Result
fcu/waypoint/result (asctec_hl_comm/WaypointActionResult)- listens to finally reached waypoint, success/failure.
Action Feedback
fcu/waypoint/feedback (asctec_hl_comm/WaypointActionFeedback)- listens to current position of the helicopter and distance to waypoint.
Scripts
All plot_* scripts plot IMU data from the LLP and debug data from the SSDK running on the HLP. For the SSDK, data is displayed in the North East Down (NED) convention, i.e. data is rotated 180° around the x-axis. y(NED) = -y(ENU), z(NED) = -z(ENU) (height is negative!) and angles likewise according to the right hand rule. Usage:
rosrun asctec_hl_interface plot_position_input [namespace] #e.g. rosrun asctec_hl_interface plot_position_input pelican