Support of geographical co-ordinate projections other than UTM
Hi all. I would like to run an idea by other ROS users before I implement things. For reference we are using ROS 2 galactic.
We can currently convert geographical co-ordinates (e.g. GeoPoint
from geographic_msgs
) to projected co-ordinates (e.g. UTMPoint
from geodesy
) through the use of the geodesy
package, however our team would like to use projections other than UTM.
It would be super convenient this kind of conversion can be done though TF2, e.g. converting from GeoPoint to a PointStamped message with a frame_id
corresponding to the projection as REP 105 might be suggesting with earth
and map
. However I think it's not possible because of the non-linear transformation that may be necessary for some projections. (Unless non-linear transformations are possible in TF2???)
If that's not possible, then I should support the conversions with geodesy
, which means I'd need to define a class similar to UTMPoint
and then
implement fromMsg() and toMsg() functions for both points and poses
for each projection. I could even define an object with an extra field indicating the projection type in there so I can handle any projection conversion.
Does that sound right?