Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 667

How to add new subscriber in move_base node ?

$
0
0
Hello, I have integrated listener.cpp subscriber (from ROS tutorials) into the move_base node. I started move_base node and after I started talker.cpp node. But it does not work. Following steps show my process, where I am doing wrong ? **in move_base.h** ros::Subscriber listen_; void listenCallback(const std_msgs::String::ConstPtr& msg); **in move_base.cpp** ros::NodeHandle listen_nh_; listen_= listen_nh_.subscribe("chatter", 1, boost::bind(&MoveBase::listenCallback, this, _1)); void MoveBase::listenCallback(const std_msgs::String::ConstPtr& msg) { ROS_INFO("I heard: [%s]", msg->data.c_str()); } So this is what I do. Do have any idea what my failure is or something forgetting ? thanks

Viewing all articles
Browse latest Browse all 667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>