diff --git a/src/modelec_gui/src/pages/home_page.cpp b/src/modelec_gui/src/pages/home_page.cpp index 5da77c1..e9df34e 100644 --- a/src/modelec_gui/src/pages/home_page.cpp +++ b/src/modelec_gui/src/pages/home_page.cpp @@ -34,8 +34,8 @@ namespace ModelecGUI ); button->move( - static_cast(msg->pose.x * ratioX - (w * ratioX) / 2), - static_cast(800 - msg->pose.y * ratioY - (h * ratioY) / 2) + static_cast(msg->x * ratioX - (w * ratioX) / 2), + static_cast(800 - msg->y * ratioY - (h * ratioY) / 2) ); button->setFixedSize(w * ratioX, h * ratioY); diff --git a/src/modelec_interfaces/msg/Map/Spawn.msg b/src/modelec_interfaces/msg/Map/Spawn.msg index 55355f7..fb9967c 100644 --- a/src/modelec_interfaces/msg/Map/Spawn.msg +++ b/src/modelec_interfaces/msg/Map/Spawn.msg @@ -2,6 +2,8 @@ string TOP="top" string BOTTOM="bottom" string SIDE="side" -geometry_msgs/Pose2D pose +int32 x +int32 y +float32 theta int32 team_id string name diff --git a/src/modelec_strat/src/navigation_helper.cpp b/src/modelec_strat/src/navigation_helper.cpp index 7f48c56..2e8b6a7 100644 --- a/src/modelec_strat/src/navigation_helper.cpp +++ b/src/modelec_strat/src/navigation_helper.cpp @@ -74,9 +74,9 @@ namespace Modelec auto s = modelec_interfaces::msg::Spawn(); s.team_id = YELLOW; s.name = ys.first; - s.pose.x = ys.second.x; - s.pose.y = ys.second.y; - s.pose.theta = ys.second.theta; + s.x = ys.second.x; + s.y = ys.second.y; + s.theta = ys.second.theta; spawn_pub_->publish(s); } @@ -86,9 +86,9 @@ namespace Modelec auto s = modelec_interfaces::msg::Spawn(); s.team_id = BLUE; s.name = bs.first; - s.pose.x = bs.second.x; - s.pose.y = bs.second.y; - s.pose.theta = bs.second.theta; + s.x = bs.second.x; + s.y = bs.second.y; + s.theta = bs.second.theta; spawn_pub_->publish(s); }