Go to the documentation of this file.
90 if (connection_header)
92 ros::M_string::const_iterator it = connection_header->find(
"latching");
93 if((it != connection_header->end()) && (it->second ==
"1"))
95 ROS_DEBUG(
"input topic is latched; latching output topic to match");
122 ROS_ERROR(
"Failed to communicate with rosmaster");
126 int subscriber_num = 0;
128 for (
int i = 0; i < sub_info.
size(); ++i)
130 string topic_name = sub_info[i][0];
133 for (
int j = 0; j < subscribers.
size(); ++j)
146 int main(
int argc,
char **argv)
150 printf(
"\nusage: relay IN_TOPIC [OUT_TOPIC]\n\n");
153 std::string topic_name;
156 ros::init(argc, argv, topic_name +
string(
"_relay"),
167 bool unreliable =
false;
168 pnh.
getParam(
"unreliable", unreliable);
179 pnh.
param<
double>(
"monitor_rate", monitor_rate, 1.0);
TransportHints & unreliable()
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
bool getParam(const std::string &key, bool &b) const
const boost::shared_ptr< ConstMessage > & getConstMessage() const
void publish(const boost::shared_ptr< M > &message) const
void timer_cb(const ros::TimerEvent &)
TransportHints & reliable()
Subscriber subscribe(const std::string &topic, uint32_t queue_size, const boost::function< void(C)> &callback, const VoidConstPtr &tracked_object=VoidConstPtr(), const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL bool execute(const std::string &method, const XmlRpc::XmlRpcValue &request, XmlRpc::XmlRpcValue &response, XmlRpc::XmlRpcValue &payload, bool wait_for_master)
const ROSCPP_DECL std::string & getName()
void conn_cb(const ros::SingleSubscriberPublisher &)
int main(int argc, char **argv)
T param(const std::string ¶m_name, const T &default_val) const
const boost::shared_ptr< M_string > & getConnectionHeaderPtr() const
uint32_t getNumSubscribers() const
Timer createTimer(Duration period, const TimerCallback &callback, bool oneshot=false, bool autostart=true) const
void in_cb(const ros::MessageEvent< ShapeShifter > &msg_event)
topic_tools
Author(s): Morgan Quigley, Brian Gerkey, Dirk Thomas
, Jacob Perron
autogenerated on Sat Sep 14 2024 03:00:05