How to use a message that I made?
I created a new message following the tutorial i found on http://www.ros.org/wiki/ROS/Tutorials/CreatingMsgAndSrv
But, how do i use it ?
I know how to use standard ros messages, like this:
// First i create the publisher
ros::Publisher fix_pub = n.advertise<sensor_msgs::NavSatFix>("fix", 1);
// Then I create the message.
sensor_msgs::NavSatFixPtr fix(new sensor_msgs::NavSatFix);
// Then, after I'm done editing, i publish the message
fix_pub.publish (fix);
But how do I do that, if I didn't make any class... I tried to find the standard messages' classes, the sensor_msgs/NavSatFix.h for instance, but i couldn't find it, can u guys help me?
So, if I want to use the message I must create another package for it? Can't I create the message inside of my package? Because when I tried as you said using my package, it didn't work :(
You can create a message inside the same package. It is generally better to define all your messages in a separate package. That greatly simplifies inter-package dependencies.