ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ch1bo's profile - activity

2012-12-17 10:36:42 -0500 received badge  Famous Question (source)
2012-12-17 10:36:42 -0500 received badge  Popular Question (source)
2012-12-17 10:36:42 -0500 received badge  Notable Question (source)
2012-08-20 01:22:03 -0500 received badge  Famous Question (source)
2012-08-20 01:22:03 -0500 received badge  Popular Question (source)
2012-08-20 01:22:03 -0500 received badge  Notable Question (source)
2012-06-27 01:00:39 -0500 received badge  Scholar (source)
2012-06-27 01:00:31 -0500 answered a question Laserscan subscription delay! rosjava on android

The issue got resolved in the current rosjava revision.

2012-06-25 04:17:30 -0500 asked a question rosjava actionlib

Hello,

I was wondering why the rosjava implementation of actionlib is not included in the latest rosjava revision anymore? Back in April it was still part of the repository and I would like to ask, if anyone knows whether actionlib will be supported (again) in the future or not?

Best Regards,

Sebastian

2012-06-19 10:49:35 -0500 answered a question Android_tutorials_image_transport Error inflating class org.ros.android.views.RosImageView

Hello,

I think I had the same issue. Just change the org.ros.android.views...lines to org.ros.android.view...without s!

Best Regards

2012-06-18 00:59:40 -0500 commented question problem with visualizing laserscan message on android

Regarding the delay: I was reading lasercan msgs at 40Hz and the device couldn't cope with that amount because of performance issues in rosjava, which means that messages came in faster than they can be processed! I could resolve it somewhat by using different different string processing methods.

2012-06-18 00:59:31 -0500 commented question problem with visualizing laserscan message on android

The visualization tutorial normally takes laserscan messages, converts the range values with their angles into vertices and draws a blue triangle-fan with opengl.

2012-06-11 05:13:46 -0500 answered a question problem with visualizing laserscan message on android

As I thought you most likely ran into the limit of maximum length Logcat messages -> http://stackoverflow.com/questions/8888654/android-set-max-length-of-logcat-messages

2012-06-11 03:30:52 -0500 commented question Laserscan subscription delay! rosjava on android

After some research, I found that rosjava extensively uses java.reflect and proxies for message instantiation. This leads to somewhat expensive access to message properties. I could reduce the GC_CONCURRENT msgs and delay a little bit by optimizing some String handling. But its still an issue!

2012-06-11 03:17:16 -0500 received badge  Supporter (source)
2012-06-11 03:13:14 -0500 commented question problem with visualizing laserscan message on android

The vertices should be okay if you look at the coordinates (they lie not on a line)! Regarding the limited log you might ran into maximum log size (does that exist?) or the thread got interrupted? .. As I am working also on visualizing Laserscans: Do you experience a delay on your method calls?

2012-06-10 20:41:10 -0500 commented question Laserscan subscription delay! rosjava on android

I have these "GC_CONCURRENT" messages too! The deserialization seems to be done with reflection by default, but I've found that there are different MessageDefinitionProvider classes for Message(De)Serialization in the rosjava framework (might use msg definition files)!?

2012-06-10 14:26:52 -0500 received badge  Nice Question (source)
2012-06-10 13:09:33 -0500 received badge  Student (source)
2012-06-06 02:05:42 -0500 received badge  Editor (source)
2012-06-06 02:03:35 -0500 asked a question Laserscan subscription delay! rosjava on android

Hello,

I am currently working on an android application for visualization of sensor data. During my first test projects I encountered a serious delay in messages caused by message deserialization of the LaserScan messages (at 40Hz).

The only way I could solve the delay issues was to inhert from the the private Receiver class in IncomingMessageQueue.java of rosjava and have the new class RateReceiver, ignore message when it falls below a rate threshold (code attached).

I am now searching for a way to augment rosjava / the android framework to use my code. After i researched the instantiation hierarchy of Receiver < IncomingMessageQueue < Subscriber < SubscriberFactory < DefaultNode I was wondering what is the best way to subclass and integrate my code? Currently the SubscriberFactory cannot be changed via the NodeConfiguration class (but there was a TODO in the code related to future configuration options? -> DefaultNode.java:89) Are there any plans regarding a custom Subscriber(Factory) class?

Or is there even a better way to solve that delay problem? (If i remember correctly I had also delays with receiving camera images)

(As for hardware: The code runs on a Asus Transformer Prime with Tegra3 1.4GHz quad and 1GB of ram, Android 4.0.3)

I hope someone can help me, and thank you in advance!

Regards, Sebastian

private final class RateReceiver extends Receiver {

    private int count;
    private double time;
    private double curRate;
    private double refRate;
    private double tolerance;
    private int window;

    public RateReceiver(double rate, double tolerance, int window) {
        this.refRate = rate;
        this.tolerance = tolerance;
        this.window = window;
    }

    @Override
    public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
            throws Exception {

        count++;
        if (count % window == 0) {
            // Reset measurement
            count = 0;
            time = System.currentTimeMillis() / 1000;
        } else {
            // Calculate rate
            curRate = count / (System.currentTimeMillis() / 1000 - time);
        }

        if (count % refRate == 0) { 
            System.err.println("receive rate " + curRate);
        }

        // Only process messages when inside tolerance
        if (curRate > refRate - tolerance) {
            super.messageReceived(ctx, e);
        }
    }
}
2012-06-06 02:02:13 -0500 asked a question Subscribing to LaserScan on android via rosjava

Hello,

I am currently working on an android application for visualization of sensor data. During my first test projects I encountered a serious delay in messages caused by message deserialization of the LaserScan message (at 40Hz).

The only way I could solve the delay issues was to inhert from the the private Receiver class in IncomingMessageQueue.java of rosjava and have the new class RateReceiver, ignore message when it falls below a rate threshold (code attached).

I am now searching for a way to augment rosjava / the android framework to use my code. After i researched the instantiation hierarchy of Receiver < IncomingMessageQueue < Subscriber < SubscriberFactory < DefaultNode I was wondering what is the best way to subclass and integrate my code? Currently the SubscriberFactory cannot be changed via the NodeConfiguration class (but there was a TODO in the code related to future configuration options? -> DefaultNode.java:89) Are there any plans regarding a custom Subscriber(Factory) class?

Or is there even a better way to solve that delay problem? (If i remember correctly I had also delays with receiving camera images)

(As for hardware: The code runs on a Asus Transformer Prime with Tegra3 1.4GHz quad and 1GB of ram, Android 4.0.3)

I hope someone can help me, and thank you in advance!

Regards, Sebastian

private final class RateReceiver extends Receiver {

    private int count;
    private double time;
    private double curRate;
    private double refRate;
    private double tolerance;
    private int window;

    public RateReceiver(double rate, double tolerance, int window) {
        this.refRate = rate;
        this.tolerance = tolerance;
        this.window = window;
    }

    @Override
    public void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
            throws Exception {

        count++;
        if (count % window == 0) {
            // Reset measurement
            count = 0;
            time = System.currentTimeMillis() / 1000;
        } else {
            // Calculate rate
            curRate = count / (System.currentTimeMillis() / 1000 - time);
        }

        if (count % refRate == 0) { 
            System.err.println("receive rate " + curRate);
        }

        // Only process messages when inside tolerance
        if (curRate > refRate - tolerance) {
            super.messageReceived(ctx, e);
        }
    }
}