ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, I figured it out.

I changed my PeopleTracker constructor to:

PeopleTracker(ros::NodeHandle &n, const PTCallback &cb);

I removed the const qualifier on the ros::NodeHandle. I have no idea why this doesn't work, there is a const-qualified version of ros::NodeHandle.subscribe() so it should be able to be called on a const reference...

Someone please tell me!

Well, I figured it out.

I changed my PeopleTracker constructor to:

PeopleTracker(ros::NodeHandle &n, const PTCallback &cb);

I removed the const qualifier on the ros::NodeHandle. I have no idea why this doesn't work, there is a const-qualified version of ros::NodeHandle.subscribe() so it should be able to be called on a const reference...

Someone who reads this answer and figures it out, please tell me!

Well, I figured it out.

I changed my PeopleTracker constructor to:

PeopleTracker(ros::NodeHandle &n, const PTCallback &cb);

I removed the const qualifier on the ros::NodeHandle. I have no idea why this doesn't work, there is a const-qualified version of ros::NodeHandle.subscribe() so it should be able to be called on a const reference...

Someone who reads this answer and figures it out, out exactly why, please tell me!

Well, I figured it out.

I changed my PeopleTracker constructor to:

PeopleTracker(ros::NodeHandle &n, const PTCallback &cb);

I removed the const qualifier on the ros::NodeHandle. I have no idea why this doesn't work, didn't work with the const qualifier, there is a const-qualified version of ros::NodeHandle.subscribe() so it should be able to be called on a const reference...

Someone who reads this answer and figures out exactly why, please tell me!

Well, I figured it out.

I changed my PeopleTracker constructor to:

PeopleTracker(ros::NodeHandle &n, const PTCallback &cb);

I removed the const qualifier on the ros::NodeHandle. I have no idea why this didn't work with the const qualifier, there is a const-qualified member function version of ros::NodeHandle.subscribe() so it should be able to be called on a const reference...

Someone who reads this answer and figures out exactly why, please tell me!

Well, I figured it out.

I changed my PeopleTracker constructor to:

PeopleTracker(ros::NodeHandle &n, const PTCallback &cb);

I removed the const qualifier on the ros::NodeHandle. I have no idea why this didn't work with the const qualifier, there is a const-qualified member function version overload of ros::NodeHandle.subscribe() so it should be able to be called on a const reference...

Someone who reads this answer and figures out exactly why, please tell me!