나는이 오류가 발생하고있다 "오류 인식하지 못하는 기능을 구독 : ‘ros::NodeHandle::subscribe(const char [24], int, <unresolved overloaded function type>)’
ROS : 내 콜백 메소드를
에 호출 일치하는 기능이 내 클래스 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);
누군가 내가 뭘 잘못했는지 말해 줄 수 있습니까?
작은 팁 : 콜백 함수가 속한 클래스에 구독자를 쉽게 포함시킬 수 있습니다. 마지막 인수를'this' 키워드로 바꾸면 구독자에게 그 객체가 그것이 속한 클래스라는 것을 알릴 수 있습니다. – rbaleksandar