Subscribe /tilt_controller1/state to know current position
Hi people,
I am working with Dynamixel Servomotor AX-12+ in ROS fuerte and I need to know its current position.
In my code I subscribe to /tilt_controller1/state this is the info topic:
youbot@diego-VPCEH2K1E:~$ rostopic info /tilt_controller1/state
Type: dynamixel_msgs/JointState
but I dont know how to put the arguments of the callback, this is my code:
#include <dynamixel_msgs/JointState.h>
//----------------
void callback(const dynamixel_msgs::JointState& str)
{
//str.current_pos
std::cout<<"rotacion"<<std::endl;
}
//-------
sub = n.subscribe("/tilt_controller1/state", 1, callback);
The error is:
fatal error: dynamixel_msgs/JointState.h: No such file or directory
I think is a mistake with the library...is the rest of the code ok? Please can somebody help me?
Thanks
Could you elaborate? I'm not sure I completely understand your question. If this doesn't compile, please update your question with the compiler output and error messages.
Eddit with the error. I think I have not the library JointState.h but i dont know if that is the only problem. Where can i get the library and where must i put it? I add in the manifest:
and then this is the error:
1/2
2/2
and then this is the error: