11 #include <std_msgs/Int32.h> 17 CQEServo &
servo = CQEServo::GetRef();
21 int position = servo1_msg.data;
22 printf(
"Received subscribed servo position %d\n", position);
23 servo.SetCommand(0, position);
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ros::Subscriber< std_msgs::Int32 > sub("servo1", messageCb)
void messageCb(const std_msgs::Int32 &servo1_msg)