First time here? Check out the FAQ!


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

Explain RosTextView

asked Aug 30 '12

Srogacki gravatar image

updated Jan 28 '14

ngrennan gravatar image

I am working with the android_tutorial_pubsub package and have built an app that publishes to a node and subscribes to another. I also have two RosTextView widgets, which I want to display activity over my "publishing" rostopic and my "subscribing" rostopic. the tutorial has built-in functionality to display the publisher's messages on the RosTextView, but I cannot seem to get the subscriber messages to do the same. All the nodes and topics are set up correctly [per rxgraph], but I do not understand RosTextView enough to know how it gets its information or if subscriber should be pushing new messages to it.

Any help is appreciated.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered Dec 18 '12

Srogacki,

I know this is a little late and you've already probably worked it out, but the RosTextView widget is a subscriber attached to a TextView. As per the basic ROS concepts a subscriber must be subscribed to a the message generated by a Publisher. As such any subscriber doesn't generate any messages but only listens to those made by a Publisher. I guess a better description of a RosTopic is a message channel between at least one publisher and one subscriber.

As this is the case, the subscriber in the RosTextView cannot subscribe to the messages from another subscriber, because your "subscribing" node does not generate any. The only way to see the messages your "subscribing" node might be listening to is to have your RosTextView subscribe to the same publisher over the same topic.

Hope this helps

Peter

Preview: (hide)

Comments

Now I got it, but still a question: can I put the rosTextView subscriber listening to a server Publisher? if Yes, Why in the android_core/ android_tutorial_pubsub it didn't work ( keeping in mind that the only thing I've changed is the topic name of rosTextView of MainActivity.java of the pubsub tutorial inside android_core.

Question Tools

Stats

Asked: Aug 30 '12

Seen: 1,004 times

Last updated: Dec 18 '12