ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
In short, remove the _2 parameter then you should get what you desire.
2 | No.2 Revision |
In short, remove the _2 parameter then you should get what you desire.
This will call your callback using the received message as the first parameter and cv_pref_ptr as the second. Depending on how you desire to use the pointer you might want to use boost::ref to pass the pointer as reference (if you want to change the pointer, not the pointed object). Also as it is now the cv_pref_ptr is declared locally and thus might go out of scope.
Is there anything that prevents you from making the cv_pref_ptr a member variable of the class?
3 | No.3 Revision |
In short, remove the _2 parameter then you should get what you desire.
This will call your callback using the received message as the first parameter and cv_pref_ptr as the second. Depending on how you desire to use the pointer you might want to use boost::ref to pass the pointer as reference (if you want to change the pointer, not the pointed object). Also as it is now the cv_pref_ptr is declared locally and thus might will go out of scope.
Is there anything that prevents you from making the cv_pref_ptr a member variable of the class?
4 | No.4 Revision |
In short, remove the _2 parameter then you should get what you desire.
Is there anything that prevents you from making the cv_pref_ptr a member variable of the class?