From 7e28e78a0708ff6ea447855a58817b9d3367ddd7 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Wed, 8 Mar 2023 17:01:45 -0800 Subject: [PATCH] Bump msgs, transport, and fuel-tools version in Harmonic (#210) * bump msgs, transport, and fuel-tools version --------- Signed-off-by: Ian Chen --- .github/ci/packages.apt | 6 +++--- CMakeLists.txt | 8 ++++---- plugins/websocket_server/WebsocketServer.cc | 9 ++++++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index 9f48afc6..d1dad5bb 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -2,18 +2,18 @@ binutils-dev libgflags-dev libgz-cmake3-dev libgz-common5-dev -libgz-fuel-tools8-dev +libgz-fuel-tools9-dev libgz-sim8-dev libgz-gui8-dev libgz-math7-dev libgz-math7-eigen3-dev -libgz-msgs9-dev +libgz-msgs10-dev libgz-physics6-dev libgz-plugin2-dev libgz-rendering8-dev libgz-sensors8-dev libgz-tools2-dev -libgz-transport12-dev +libgz-transport13-dev libsdformat13-dev libtinyxml2-dev libwebsockets-dev diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b378197..f12380ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,13 +61,13 @@ set(GZ_TOOLS_VER 2) #-------------------------------------- # Find gz-transport -gz_find_package(gz-transport12 REQUIRED) -set(GZ_TRANSPORT_VER ${gz-transport12_VERSION_MAJOR}) +gz_find_package(gz-transport13 REQUIRED) +set(GZ_TRANSPORT_VER ${gz-transport13_VERSION_MAJOR}) #-------------------------------------- # Find gz-msgs -gz_find_package(gz-msgs9 REQUIRED) -set(GZ_MSGS_VER ${gz-msgs9_VERSION_MAJOR}) +gz_find_package(gz-msgs10 REQUIRED) +set(GZ_MSGS_VER ${gz-msgs10_VERSION_MAJOR}) #-------------------------------------- # Find gz-math diff --git a/plugins/websocket_server/WebsocketServer.cc b/plugins/websocket_server/WebsocketServer.cc index ad67376e..a5ed5120 100644 --- a/plugins/websocket_server/WebsocketServer.cc +++ b/plugins/websocket_server/WebsocketServer.cc @@ -793,7 +793,8 @@ void WebsocketServer::OnMessage(int _socketId, const std::string _msg) for (const std::string &topic : topics) { std::vector publishers; - this->node.TopicInfo(topic, publishers); + std::vector subscribers; + this->node.TopicInfo(topic, publishers, subscribers); for (const transport::MessagePublisher &publisher : publishers) { msgs::Publish *pubMsg = msg.add_publisher(); @@ -925,7 +926,8 @@ void WebsocketServer::OnMessage(int _socketId, const std::string _msg) for (auto queryTopic: allTopics) { std::vector publishers; - this->node.TopicInfo(queryTopic, publishers); + std::vector subscribers; + this->node.TopicInfo(queryTopic, publishers, subscribers); for (auto pub: publishers) { if (pub.MsgTypeName() == "gz.msgs.Image") @@ -1205,7 +1207,8 @@ bool WebsocketServer::UpdateMsgTypeSubscriptionCount(const std::string &_topic, // check if limit reached for the subscribed msg type // if not, update subscription count std::vector publishers; - this->node.TopicInfo(_topic, publishers); + std::vector subscribers; + this->node.TopicInfo(_topic, publishers, subscribers); if (!publishers.empty()) { std::string msgType = publishers.begin()->MsgTypeName();