Ask Your Question
0

rosjava publisher and subscriber in the same node

asked 2012-05-28 19:31:38 -0500

jpiramirez gravatar image

updated 2012-05-30 16:30:57 -0500

If I take a single node (a class that extends AbstractNodeMain) and I include both publishers and a subscriber, the subscriber does not seem to receive any information that I publish to its topic with rostopic.

I was trying to merge both the Listener and Talker examples into a single entity that publishes using the executeCancellableLoop and subscribes to a topic with the addMessageListener method. My goal is to write a robot driver that publishes sensor data at the same time that it listens for movement commands. Can this be done?

If I avoid adding the subscriber the publisher works fine, and viceversa. If I add both things, the publisher works fine but the subscriber doesn't read any data, although the topic appears in the output of rostopic list.

I am using ROS Fuerte with the Python roscore.

edit retag flag offensive close merge delete

Comments

Could you share some code?

damonkohler gravatar image damonkohler  ( 2012-05-29 07:10:06 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-05-30 16:33:24 -0500

jpiramirez gravatar image

I moved my development from an x86 machine to a 64-bit one, running Ubuntu Precise and ROS Fuerte. My logging messages inside the subscriber started showing up on the rxconsole, so this is solved.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-05-28 19:31:38 -0500

Seen: 219 times

Last updated: May 30 '12