Implement custom message in Android Studio
Hello,
at the moment I am developing an Android application that publishes data into a ROS environment. For this, I use rosandroid-core which is included with Maven from the following repository: https://github.com/rosjava/rosjava_mvn_repo.
By commands like
compile 'org.ros.rosjava_messages:std_msgs:0.5.11'
I am able to generate all standard messages that are defined in the repository. The String-message is defined like the following:
package std_msgs;
import org.ros.internal.message.Message;
public interface String extends Message {
public static final String _DEFINITION = "string data\n"; public static final String _TYPE = "std_msgs/String";
String getData();
void setData(String str);
}
Now I want to create my own message type. So I created a Java interfaces that extends the org.ros.internal.message.Message class.
When I initalize a message from the custom type in the code, everything is fine. But as soon as I want to publish a message from this custom message type, I get a NoClassFoundException.
Do you know where the error is? How can I include the compilation of my custom message type in the Gradle file?
Thanks and best regards.