Dear All
So, I thought I'd try and kick off a thread on the tail-end of some good discussion at ROSCON, as well as last night's IROS reception. What I'm really interested in is loose standardisation of the way in which multicopters -- and maybe even other aerial platforms -- can be controlled from within a ROS context. In particular, I see aerial platforms as a combination of sensors, actuators and flight logic. The vision I have is to expose as much information as possible to the ROS world without compromising the stability / safety of the flight control unit.
Having never used MAVLink myself, I don't really know what kind of information flow or control topologies it supports. Perhaps somebody with greater experience may be able to comment on the proposal below, or suggest a better way of doing things. So, what I propose is the development of a ros_mavlink node, which binds to a MAVLink connection and interacts with the flight control unit to expose the platform as an abstract entity on a ROS backbone. In order to promote code reuse and allow new platforms to be efficiently added, by stadardising common sensors and actuators.
For example, a quadrotor running MAVLink may be exposed to the ROS world by ros_mavlink in the following way:
<formal interface> : <message/service namespace>
hal_platform_quadrotor : /hal/quadrotor/UAV0
- hal_actuator_motor : /hal/quadrotor/UAV0/actuator/motor0/...
- hal_actuator_motor : /hal/quadrotor/UAV0/actuator/motor1/...
- hal_actuator_motor : /hal/quadrotor/UAV0/actuator/motor2/...
- hal_actuator_motor : /hal/quadrotor/UAV0/actuator/motor3/...
- hal_sensor_imu : /hal/quadrotor/UAV0/sensor/imu/...
- hal_sensor_barometric : /hal/quadrotor/UAV0/sensor/barometric/...
- hal_sensor_gnss : /hal/quadrotor/UAV0/sensor/gnss/...
- hal_sensor_magnetic : /hal/quadrotor/UAV0/sensor/magnetic/...
Importantly, I'm not suggesting that any low-level control happens in the ROS-world, but rather the raw low level measurements get timestamped and forwarded up to the application layer in order to be used in more complex SLAM-type systems. This would avoid us having to nitpick through low-level code to awkwardly stream measurements up the control hierarchy, creating a world of timing issues to deal with.
The advantage with this approach is that we could have simulated entities expose themselves in a similar fashion, masking the complexity of the underlying implementation. This would mean that the high-level controlling code can interact with real or simulated AscTec, Mikrocopter and 3DR platforms in a similar way, assuming of course that they support MAVLink. This would allow us to create interesting hardware in the loop simulations.
I did a similar thing for the CRATES simulator and the AscTec Pelican platform. Feel free to have a look.
Anyway, this may be a pipe dream. Feel free to hijack this thread with your thoughts.
Cheers
Andrew