25 #include <SimoxUtility/math/convert/mat4f_to_rpy.h>
26 #include <SimoxUtility/math/convert/rad_to_deg.h>
35 if (attrib().edgesChanged)
39 for (
auto vertex : vertices())
41 if (vertex.attrib().changed)
49 std::optional<GuiGraph::Vertex>
52 for (
auto vertex : vertices())
54 if (vertex.attrib().tableWidgetItem == item)
63 std::map<QTableWidgetItem*, GuiGraph::Vertex>
66 std::map<QTableWidgetItem*, GuiGraph::Vertex> map;
68 for (
auto vertex : vertices())
70 if (vertex.attrib().tableWidgetItem !=
nullptr)
72 map[vertex.attrib().tableWidgetItem] = vertex;
80 std::map<QTableWidgetItem*, GuiGraph::Edge>
83 std::map<QTableWidgetItem*, GuiGraph::Edge> map;
85 for (
auto edge : edges())
87 if (edge.attrib().tableWidgetItem !=
nullptr)
89 map[edge.attrib().tableWidgetItem] = edge;
99 return simox::math::rad_to_deg(simox::math::mat4f_to_rpy(pose.matrix())(2));
106 return simox::math::rad_to_deg(simox::math::mat4f_to_rpy(pose.matrix())(2));
114 for (
auto v : nav.vertices())
116 gui.addVertex(
v.objectID(), {v.attrib()});
118 for (
auto e : nav.edges())
120 gui.addEdge(e.sourceObjectID(), e.targetObjectID(), {e.attrib()});
130 for (
auto v : gui.vertices())
132 nav.addVertex(
v.objectID(), {v.attrib()});
134 for (
auto e : gui.edges())
136 nav.addEdge(e.sourceObjectID(), e.targetObjectID(), {e.attrib()});