Robotics StackExchange | Archived questions

rostextview assigned to rosout is missing messages

Hi,

I'm trying to use the RosTextView to display /rosout messages on Android (messages coming from Ubuntu ROS). But it looks there are messages missing when the MessageToStringCallback is being called. I only added a Log message in the callback, so i guess it's fast enough. When i trace the TCP traffic, i see all messages going to the Android device. When i look at the logcat logging i'm missing messages, logcat below, the number behind the # is the header sequence number. Does anybody have an explanation for this, and/or a solution ? PS I tried /rosout and /rosout_agg with the same results.

Thanks

03-25 17:23:22.649   D/EngineerActivity? #117 Command :  0
03-25 17:23:22.749   D/EngineerActivity? #118 CycleCount:  4
03-25 17:23:22.749   D/EngineerActivity? #120 CycleCount:  4
03-25 17:23:26.379   D/EngineerActivity? #121 Command :  0
03-25 17:23:26.469   D/EngineerActivity? #124 CycleCount:  4
03-25 17:23:28.079   D/EngineerActivity? #125 Command :  0
03-25 17:23:28.079   D/EngineerActivity? #128 CycleCount:  4
03-25 17:23:31.419   D/EngineerActivity? #129 Command :  0
03-25 17:23:31.519   D/EngineerActivity? #131 Start Juicing Command
03-25 17:24:09.689   D/EngineerActivity? #132 CycleCount:  4
03-25 17:24:09.789   D/EngineerActivity? #136 CycleCount:  4

    mRosTextView = (RosTextView<rosgraph_msgs.Log>) findViewById(R.id.rosout_logging);
    mRosTextView.setTopicName("/rosout_agg");
    mRosTextView.setMessageType(rosgraph_msgs.Log._TYPE);
    mRosTextView.setMovementMethod(ScrollingMovementMethod.getInstance());
    mRosTextView.setMessageToStringCallable(new MessageCallable<String, rosgraph_msgs.Log>() {
        @Override
        public String call(final rosgraph_msgs.Log message) {
            Log.d(TAG,String.format("#%d %s", message.getHeader().getSeq(), message.getMsg()));
            return "";
        }
    });

Asked by ruderik on 2014-03-25 06:41:25 UTC

Comments

I faced the same problem. Have you found any solution?

Asked by DmitryDzz on 2014-11-08 08:52:24 UTC

No, unfortunately not. I didn't spend a lot of time looking for an answer either, it was not a commercial project I was working on (and it is finished now anyway without this functionality).

Asked by ruderik on 2014-11-10 02:44:20 UTC

Answers