Still, it'll be great to have the APM code a first class participant of ROS. Some might benefit from having a distributed architecture where they could spread nodes over different computers (given that the latency is controlled but ROS 2.0 is coming to aid on that, soon ;)).
With the current code state (abstracted and separated in libraries) it does make sense to start thinking about abstracting APM libraries into ROS nodes and eventually get a working vehicle.
Thoughts and findings so far:
- Given the structure planed, packages would grow as the APM code does. (this was my main objective when starting with it)
- ROS packages are quite easy to code and maintaining them would require minimum effort.
- Shared memory can (for now) be bypassed by creating instances and populating them in the callbacks (example). Would be great if Tridge and Randy could have this in mind when shaping future/existing libraries and code.
I haven't made up my mind about what's the best way to proceed on this matter: 1) Creating a new AP_HAL_ROS 2) extending the existing libraries and modifying the code to adopt a publish/subscribe pattern 3) any other idea? - It'll be great to match ROS message types (as discussed in the ROS MAV SIG)
I've CC'ed Tully from the Open Source Robotics Foundation and Lorenz from PX4 who might be interested in following up this effort.
If someone is interested in contributing, this is a great chance for anyone with no ROS experience to jump into the topic and code a ROS package for themselves.