base operand of '->' has non-pointer type 'const JointState'
Hi guys.. I am trying to write a simple publisher and subscriber, but having some problems with my subscriber...
The message type i am using is sensor_msgs::JointState msg (doc) for my subscriber i have this callback function.
void ChatterCallback(const sensor_msgs::JointState& msg){
ROS_INFO("i've heard: " ,msg->position);
}
but somehow i end up getting this error message saying
error: base operand of '->' has non-pointer type 'const JointState'
which just doesn't make sense for me..