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:
@@ -83,8 +83,8 @@ private:
|
|||||||
void slamInfoHandler(const void *message);
|
void slamInfoHandler(const void *message);
|
||||||
void slamKeyInfoHandler(const void *message);
|
void slamKeyInfoHandler(const void *message);
|
||||||
|
|
||||||
unitree::robot::ChannelSubscriberPtr subSlamInfo;
|
unitree::robot::ChannelSubscriberPtr<std_msgs::msg::dds_::String_> subSlamInfo;
|
||||||
unitree::robot::ChannelSubscriberPtr subSlamKeyInfo;
|
unitree::robot::ChannelSubscriberPtr<std_msgs::msg::dds_::String_> subSlamKeyInfo;
|
||||||
|
|
||||||
poseDate currentPose;
|
poseDate currentPose;
|
||||||
bool is_arrived = false;
|
bool is_arrived = false;
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
namespace custom {
|
namespace custom {
|
||||||
|
|
||||||
Navigation::Navigation() : unitree::robot::Client(SLAM_SERVICE_NAME) {
|
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));
|
new unitree::robot::ChannelSubscriber<std_msgs::msg::dds_::String_>(SlamInfoTopic));
|
||||||
subSlamInfo->InitChannel(
|
subSlamInfo->InitChannel(
|
||||||
std::bind(&Navigation::slamInfoHandler, this, std::placeholders::_1), 1);
|
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));
|
new unitree::robot::ChannelSubscriber<std_msgs::msg::dds_::String_>(SlamKeyInfoTopic));
|
||||||
subSlamKeyInfo->InitChannel(
|
subSlamKeyInfo->InitChannel(
|
||||||
std::bind(&Navigation::slamKeyInfoHandler, this, std::placeholders::_1), 1);
|
std::bind(&Navigation::slamKeyInfoHandler, this, std::placeholders::_1), 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user