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

can the same node in python be a publisher and a subscriber?

asked 2012-11-28 01:11:19 -0500

Nachum gravatar image

I want to do a node that reads the position of a joint and then publish tourqe. Or maybe can it be 2 nodes in the same code?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2012-11-28 04:21:47 -0500

joq gravatar image

Sure. One node can do both. Why not?

You can call publish() from a subscriber callback.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-11-28 01:11:19 -0500

Seen: 332 times

Last updated: Nov 28 '12