ethz-asl / asctec_mav_framework

Framework for data aquisition and position control to be used with the highlevel processor of Ascending Technologies helicopters
http://www.ros.org/wiki/asctec_mav_framework
36 stars 40 forks source link

Service for wgs84-to-ENU coordinate conversion #42

Closed AHolliday closed 9 years ago

AHolliday commented 9 years ago

In implementing a GPS-waypoint-following system for the Pelican with the ETH firmware, we found it helpful to be able to convert a set of waypoints in wgs84 coordinates to ENU coordinates. pelican_hl_gps's gps conversion node has code to do this. To make this functionality to our python node that reads in the waypoints, I altered the gps conversion node to provide a service that would take wgs84 coordinate as a request and give the equivalent ENU coordinate (based on the stored GPS reference point) as a response.

In principle it would have been possible to rewrite our code in C++ and simply include the gps code as a dependency, or find a way of calling the relevant function via some C++-to-Python interface, but this was the simplest solution. It also seems likely that conversion from wgs84 to ENU coordinates may be a common use case for ROS systems working with the Pelican, so it made sense to me to make this functionality available over the ROS network. Others might find this useful as well, so I'm creating this pull request.

I submitted the same pull request earlier today but accidentally included some extra files in the branch I proposed pulling. This re-submission has been cleaned up.

markusachtelik commented 9 years ago

Thanks a lot for your contribution! I made some comments, let me know what you think.

AHolliday commented 9 years ago

You're correct about the dependencies, I tested it and it builds fine without them. I've removed them, and also moved the service description into asctec_hl_comm as requested.