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

Explain RosTextView

asked 2012-08-30 11:58:45 -0600

Srogacki gravatar image

updated 2014-01-28 17:13:30 -0600

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.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2012-12-18 14:19:03 -0600

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

edit flag offensive delete link more

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.

サイトダニエロ gravatar image サイトダニエロ  ( 2020-06-02 13:34:45 -0600 )edit

Question Tools

Stats

Asked: 2012-08-30 11:58:45 -0600

Seen: 1,004 times

Last updated: Dec 18 '12