android custom messages - Subscriber handshake failed - Message types don't match
HI,
i want to display something published in a custom Message on my android device
I get the error:
E/scriberHandshakeHandler﹕ Subscriber handshake failed: Message types don't match.
i had some troubles setting up my textview
rosTextView_speed = (RosTextView_speed<vehicle_model_dynamics>) findViewById(R.id.TextView01);
rosTextView_speed.setTopicName("veh_vehicle_model_dynamics");
//public void setMessageType(String messageType) {
// this.messageType = messageType;
//}
rosTextView_speed.setMessageType(vehicle_model_dynamics._TYPE);
// T = Return Type
//public void setMessageToStringCallable(MessageCallable<String, T> callable) {
// this.callable = callable;
//}
rosTextView_speed.setMessageToStringCallable(new MessageCallable<String, vehicle_model_dynamics>() {
//Überschreiben der Methode Call in MessageCallable
// RÜCKGABETYP call (MESSAGETYP)
//public interface MessageCallable<T, S> {
// T call(S message);
//}
@Override
public String call(vehicle_model_dynamics message) {
//velocity = message.getData();
Log.v("DEBUG:", "Speed Message Callable");
return String.valueOf(message.getVelocity());
}
});
in rqt i am publishing topic: veh_vehicle_model_dynamics type: ros_messages/vehicle_model_dynamics the velocity value 111 (float64)
i also imported my custom messages
vehicle_model_dynamics.class in custom_msgs-0.0.0.jar
// IntelliJ API Decompiler stub source generated from a class file
// Implementation of methods is not available
package custom_msgs;
public interface vehicle_model_dynamics extends org.ros.internal.message.Message {
java.lang.String _TYPE = "custom_msgs/vehicle_model_dynamics";
java.lang.String _DEFINITION = "####################################################\n
#\n# Vehicle Model Dynamic Information\n#\n# ...\n#\n
# Description: n#\n####################################################\n\n
# ROS Header\nHeader header
\n\n
# Data
\n
qualified_timed_float64 velocity # [m/s] vehicle velocity
\n\n
qualified_timed_float64 acceleration_x # [m/s^2] vehicle acceleration X
\n\n
qualified_timed_float64 acceleration_y # [m/s^2]
...
std_msgs.Header getHeader();
void setHeader(std_msgs.Header header);
custom_msgs.qualified_timed_float64 getVelocity();
void setVelocity(custom_msgs.qualified_timed_float64 qualified_timed_float64);
custom_msgs.qualified_timed_float64 getAccelerationX();
void setAccelerationX(custom_msgs.qualified_timed_float64 qualified_timed_float64);
...
}
any guesses what is wrong?
Thanks
rosnode info /play_rosbag:
Node [/play_rosbag]
Publications:
* /veh_vehicle_model_dynamics [ros_messages/vehicle_model_dynamics]
* /function_drivinggoal_desired [ros_messages/function_drivinggoal]
contacting node http://192.168.0.95:37820/ ...
Pid: 4151
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
...
Connection to /android_gingerbread/ros_text_view_speed_limited missing
Connection to /android_gingerbread/ros_text_view_speed missing
rosnode info /android_gingerbread/ros_text_view_speed_limited:
Subscriptions:
* /function_drivinggoal_desired [ros_messages/function_drivinggoal]
contacting node http://192.168.0.199:44133/ ...
Pid: 2328
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /function_drivinggoal_desired
* to: /play_1408345524838586534 (http://192.168.0.95:37820/)
* direction: inbound
* transport: TCPROS
rosnode info /android_gingerbread/ros_text_view_speed:
Subscriptions:
* /veh_vehicle_model_dynamics [ros_messages/vehicle_model_dynamics]
contacting node http://192.168.0.199:48483/ ...
Pid: 2744
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /veh_vehicle_model_dynamics
* to: /play_1408345524838586534 (http://192.168.0.95:37820/)
* direction: inbound
* transport: TCPROS
could the error come from the name of my custom_msgs
could rebuilding the jar as "ros_messages" solve the problem?