Commit 416a89b6 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

small changes in trajectory publisher

parent fa850278
......@@ -50,8 +50,6 @@ class PublisherTrajectory: public Publisher
std::string frame_id_;
ros::Publisher pub_path_;
public:
PublisherTrajectory(const std::string& _unique_name,
const ParamsServer& _server,
......
......@@ -52,12 +52,12 @@ void PublisherTrajectory::initialize(ros::NodeHandle& nh, const std::string& top
// PATH
path_msg_.header.frame_id = frame_id_;
pub_path_ = nh.advertise<nav_msgs::Path>(topic, 1);
publisher_ = nh.advertise<nav_msgs::Path>(topic, 1);
}
void PublisherTrajectory::publishDerived()
{
if (pub_path_.getNumSubscribers() != 0 )
if (publisher_.getNumSubscribers() != 0 )
publishTrajectory();
}
......@@ -100,7 +100,7 @@ void PublisherTrajectory::publishTrajectory()
}
//Publish path
pub_path_.publish(path_msg_);
publisher_.publish(path_msg_);
//clear msg
path_msg_.poses.clear();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment