12 void ROS::to(
const F2CPoint& _point, GeometryMsgs::Point32& _p32) {
13 _p32.x =
static_cast<float>(_point.getX());
14 _p32.y =
static_cast<float>(_point.getY());
15 _p32.z =
static_cast<float>(_point.getZ());
18 void ROS::to(
const F2CPoint& _point, GeometryMsgs::Point& _p64) {
19 _p64.x = _point.getX();
20 _p64.y = _point.getY();
21 _p64.z = _point.getZ();
26 std::vector<GeometryMsgs::Polygon>& _ros_poly) {
27 GeometryMsgs::Polygon ros_ring;
28 to(_poly.getExteriorRing(), ros_ring);
29 _ros_poly.push_back(ros_ring);
30 const int n_in_rings = _poly.size() - 1;
31 for (
int i=0; i < n_in_rings; ++i) {
32 ros_ring.points.clear();
33 to(_poly.getInteriorRing(i), ros_ring);
34 _ros_poly.push_back(ros_ring);
39 std::vector<std::vector<GeometryMsgs::Polygon>>& _ros_polys) {
40 for (
auto&& p : _polys) {
41 std::vector<GeometryMsgs::Polygon> poly;
43 _ros_polys.push_back(poly);
47 void ROS::to(
const F2CLineString& _line, NavMsgs::Path& _path) {
48 GeometryMsgs::PoseStamped pose;
49 for (
auto&& p : _line) {
50 to(p, pose.pose.position);
51 _path.poses.push_back(pose);