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

Two nodes publish to one topic

asked 2015-05-06 01:03:51 -0600

tony gravatar image

There are two node publishing message to cmd_vel topic. One node is for self-driving, the other one is for teleoperation. How to set the teleoperation node has the high priority when publishing to cmd_vel?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-05-06 02:51:02 -0600

dornhege gravatar image
edit flag offensive delete link more
0

answered 2015-05-06 01:15:32 -0600

Wolf gravatar image

There is no build-in priority system in ROS for saying one node has higher prio than other when publishing. So you have to find another workaround.

A simple approach for that would e. g. be to have your nodes publishing on different topics and set up a republisher node that subscribes to both topics and republishes the msgs from the tele-op topic to cmd_vel if there are msgs coming in and otherwise it republishes the msgs from the self-driving topic....

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-05-06 01:03:51 -0600

Seen: 932 times

Last updated: May 06 '15