rostextview assigned to rosout is missing messages

asked 2014-03-25 06:41:25 -0500

ruderik gravatar image

updated 2016-10-24 08:53:06 -0500

ngrennan gravatar image

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 "";
        }
    });
edit retag flag offensive close merge delete

Comments

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

DmitryDzz gravatar image DmitryDzz  ( 2014-11-08 07:52:24 -0500 )edit

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).

ruderik gravatar image ruderik  ( 2014-11-10 01:44:20 -0500 )edit