diff --git a/include/navigation.hpp b/include/navigation.hpp index 420ff83..5b2b94e 100644 --- a/include/navigation.hpp +++ b/include/navigation.hpp @@ -83,8 +83,8 @@ private: void slamInfoHandler(const void *message); void slamKeyInfoHandler(const void *message); - unitree::robot::ChannelSubscriberPtr subSlamInfo; - unitree::robot::ChannelSubscriberPtr subSlamKeyInfo; + unitree::robot::ChannelSubscriberPtr subSlamInfo; + unitree::robot::ChannelSubscriberPtr subSlamKeyInfo; poseDate currentPose; bool is_arrived = false; diff --git a/src/navigation.cpp b/src/navigation.cpp index 179f615..c5c7765 100644 --- a/src/navigation.cpp +++ b/src/navigation.cpp @@ -4,12 +4,12 @@ namespace custom { Navigation::Navigation() : unitree::robot::Client(SLAM_SERVICE_NAME) { - subSlamInfo = unitree::robot::ChannelSubscriberPtr( + subSlamInfo = unitree::robot::ChannelSubscriberPtr( new unitree::robot::ChannelSubscriber(SlamInfoTopic)); subSlamInfo->InitChannel( std::bind(&Navigation::slamInfoHandler, this, std::placeholders::_1), 1); - subSlamKeyInfo = unitree::robot::ChannelSubscriberPtr( + subSlamKeyInfo = unitree::robot::ChannelSubscriberPtr( new unitree::robot::ChannelSubscriber(SlamKeyInfoTopic)); subSlamKeyInfo->InitChannel( std::bind(&Navigation::slamKeyInfoHandler, this, std::placeholders::_1), 1);