How to add new subscriber in move_base node ?
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<std_msgs::String>("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
What does this mean? What's happening vs what do you expect to happen?
thanks. I had written just topic name false. Now Problem is solved.
What does that mean? Are you saying that you had the wrong topic name?
I had written different topic names, I corrected it