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

ears_and_tails's profile - activity

2016-10-17 00:13:57 -0500 received badge  Famous Question (source)
2016-02-18 06:23:24 -0500 received badge  Famous Question (source)
2015-11-13 04:19:05 -0500 received badge  Famous Question (source)
2015-07-24 04:47:11 -0500 received badge  Notable Question (source)
2015-07-24 04:47:11 -0500 received badge  Popular Question (source)
2015-02-20 14:21:54 -0500 received badge  Notable Question (source)
2015-02-20 02:51:31 -0500 received badge  Popular Question (source)
2014-11-25 13:07:00 -0500 received badge  Editor (source)
2014-11-25 13:06:06 -0500 asked a question rosjava custom messages: can compile and import, but not use as expected

I am using rosindigo and rosjava. I created a rosjava_message package to create a custom foo.msg for use in my rosjava node. I followed the example in http://wiki.ros.org/rosjava/Tutorials...

Ros recognizes my message:

rosmsg show foo_msgs/foo

int32 intVar

float32 floatVar

string stringVar

I see it is built and foo.class looks reasonable. The generated cpp files look good too.

I can import foo_msgs.foo in my publisher node and create a publisher:

final Publisher<foo> publisher_custom =
 connectedNode.newPublisher("/custom/topic",
       foo._TYPE);
foo_msgs.foo myMessage = publisher_custom.newMessage();
foo_msgs.foo myMessage = publisher_custom.newMessage();

Now I expect to be able to do myMessage.setIntVar(5), but that results in a compilation error.

If I use java's inspection to print the methods available to myMessage, it's the same methods availabe if it was a std_msgs.String message!

If I do rostopic echo /custom/topic, an exception results. I the rostopic echo expects my foo message type, but I think the std_msgs.String is being used and results in this exception:

WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x063b05a0, /127.0.0.1:40396 :> /127.0.0.1:43938] EXCEPTION: java.lang.IllegalStateException: Unexpected message MD5 c9954cba4a4cc14c464daad6dfbafe15 != 131c7b16e90d7646b67a1c83cd590279) org.ros.exception.RosRuntimeException: java.lang.IllegalStateException: Unexpected message MD5 c9954cba4a4cc14c464daad6dfbafe15 != 131c7b16e90d7646b67a1c83cd590279 at org.ros.internal.transport.ConnectionTrackingHandler.exceptionCaught(ConnectionTrackingHandler.java:81) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:533) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:49) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:458) at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:439) at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:91) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:373) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:247) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalStateException: Unexpected message MD5 c9954cba4a4cc14c464daad6dfbafe15 != 131c7b16e90d7646b67a1c83cd590279 at com.google.common.base.Preconditions.checkState(Preconditions.java:149) at org.ros.internal.node.topic.DefaultPublisher.finishHandshake(DefaultPublisher.java:176) at org.ros.internal.transport.tcp.TcpServerHandshakeHandler.handleSubscriberHandshake(TcpServerHandshakeHandler.java:97) at org.ros.internal.transport.tcp.TcpServerHandshakeHandler.messageReceived(TcpServerHandshakeHandler.java:67) ... 13 more

Any pointers on how to proceed? I don't understand why the class I'm importing somehow isn't the right class(?). I only define foo.msg in one place.

2014-11-18 16:26:48 -0500 asked a question rosbridge/rosjs communication problem (vs rostopic pub)

Hello... It seems I am having a problem with websockets. I'm using ros indigo.

I have a webpage using the ros javascript which creates a publisher for my topic and publishes messages when I press a button. It works! The message gets published. I have a node that listens for this topic and changes its behavior based on the message it gets.

The problem is it doesn't always work.

Sometimes, the node does not respond to my button press. The node is supposed to change its state based on the message in my topic. I verified that message is being published on my topic (with rostopic echo). However, if I use rostopic pub I can reach my node with the message, as expected.

I think this means the problem lies with the rosbridge, but I'm not sure how to go further with debugging it. Also, the failure state is not easily reproduced. If/when it happens, I need to stop and restart ros in order to regain control via my button. There is no other way for the button to control the node.

It seems to me this indicates the problem is with rosbridge. Any suggestions on how to debug further or what to look for? Has anyone else noticed this?

2014-11-14 15:14:19 -0500 commented question Guaranteed message delivery

Right now I am using the messages to pass sensor data collected from certain nodes to other nodes. It is very important that I don't miss data. All the nodes are running on a single physical machine.

2014-11-11 11:54:22 -0500 received badge  Notable Question (source)
2014-11-10 05:01:56 -0500 received badge  Popular Question (source)
2014-11-09 19:58:55 -0500 received badge  Student (source)
2014-11-09 19:41:00 -0500 asked a question Guaranteed message delivery

Hello,

It seems ROS makes no guarantee of message delivery. I know some can be lost at the beginning (nodes haven't fully started up) but of course they can also be dropped later. It is the dropping messages later that I am concerned about.

I have seen rosbags suggested at the way to get guaranteed message delivery (maybe minus the node start up situation, which I'm not worried about). It seems they are used for capturing/replaying messages and are not thread-safe.

Has anyone used them for receiving messages in real-time? Is there another way to go?

I know queue sizes/publishing rates are adjustable and this can minimize loss, but there are certain messages I can't afford to drop, even occassionally. And I am losing some.

Thanks.

2014-11-09 18:06:11 -0500 received badge  Supporter (source)