refactor(navigation): Update ChannelSubscriberPtr to use specific message type

- Changed ChannelSubscriberPtr to ChannelSubscriberPtr<std_msgs::msg::dds_::String_> for slamInfo and slamKeyInfo in navigation.hpp and navigation.cpp.
- Updated initialization of subscribers to reflect the new type specification.
This commit is contained in:
2025-09-22 14:50:52 +08:00
parent 6b9ad80757
commit 48cae46960
2 changed files with 4 additions and 4 deletions

View File

@@ -4,12 +4,12 @@
namespace custom {
Navigation::Navigation() : unitree::robot::Client(SLAM_SERVICE_NAME) {
subSlamInfo = unitree::robot::ChannelSubscriberPtr(
subSlamInfo = unitree::robot::ChannelSubscriberPtr<std_msgs::msg::dds_::String_>(
new unitree::robot::ChannelSubscriber<std_msgs::msg::dds_::String_>(SlamInfoTopic));
subSlamInfo->InitChannel(
std::bind(&Navigation::slamInfoHandler, this, std::placeholders::_1), 1);
subSlamKeyInfo = unitree::robot::ChannelSubscriberPtr(
subSlamKeyInfo = unitree::robot::ChannelSubscriberPtr<std_msgs::msg::dds_::String_>(
new unitree::robot::ChannelSubscriber<std_msgs::msg::dds_::String_>(SlamKeyInfoTopic));
subSlamKeyInfo->InitChannel(
std::bind(&Navigation::slamKeyInfoHandler, this, std::placeholders::_1), 1);