【发布时间】:2012-02-26 01:21:03
【问题描述】:
我收到此错误“错误:没有匹配的函数来调用‘ros::NodeHandle::subscribe(const char [24], int, <unresolved overloaded function type>)’
这是我在 BangBangControlUnit 类中的回调函数
// on message reciept: 'current_maintained_temp'
void current_maintained_temp_callback(const std_msgs::Int32::ConstPtr& msg){
temp_to_maintain = msg->data;
}
这就是我在主函数中使用订阅的方式
// subscribe to 'current_maintained_temp'
ros::Subscriber current_maintained_temp_sub = n.subscribe("current_maintained_temp", 1000, control.current_maintained_temp_callback);
谁能告诉我我做错了什么?
【问题讨论】:
标签: c++ publish-subscribe robot ros