-
Notifications
You must be signed in to change notification settings - Fork 24
UAL interfaces
franreal edited this page Jan 23, 2019
·
7 revisions
There are two ways of interfacing with UAL: directly via a C++ object of class UAL, and via ROS services/topics.
The UAL class is defined in ual.h. You can directly create one UAL object in your app and access its public methods:
-
takeOff(double _height, bool _blocking = true)
Perform a take off maneuver -
goToWaypoint(const Waypoint& _wp, bool _blocking = true)
Go to the specified waypoint smoothly, following a straight line -
goToWaypointGeo(const WaypoinGeot& _wp, bool _blocking = true)
Same asgoToWaypoint
but in geographic coordinates -
land(bool _blocking = true)
Land on the current position -
recoverFromManual()
Recover from manual flight mode -
setHome(bool set_z = false)
Set current pose as home. Set x, y and optionally z to zero. -
setPose(const PoseStamped& _pose)
Set the specified pose as a reference to position control -
setVelocity(const Velocity& _vel)
Set the specified velocity as a reference to velocity control -
pose()
Get the latest pose estimation of the robot -
velocity()
Get the latest velocity estimation of the robot -
odometry()
Get the latest odometry estimation of the robot -
transform()
Get the latest transform estimation of the robot -
state()
Get current system state:UNINITIALIZED
,LANDED_DISARMED
,LANDED_ARMED
,TAKING_OFF
,FLYING_AUTO
,FLYING_MANUAL
,LANDING
.
The UAL class offers a ROS interface based on topics and services. It can be disabled if the parameter ual_server is set to off.
Each service provides access to each corresponding method:
ual/take_off
ual/go_to_waypoint
ual/go_to_waypoint_geo
ual/land
ual/recover_from_manual
ual/set_home
The system subscribes to topics that then uses to set pose and velocity to low level control:
ual/set_pose
ual/set_velocity
At the same time and at a frequency defined by parameter ~pub_rate (30Hz by default), it publishes the information got from the corresponding info methods:
ual/pose
ual/velocity
ual/odom
-
/tf
,/tf_static
ual/state