This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- | |
#include <stdio.h> | |
#include <yarp/os/all.h> | |
using namespace yarp::os; | |
int main(int argc, char *argv[]) { | |
Network yarp; | |
//Node node("/yarp/hello_world_listener"); | |
BufferedPort<Bottle> port; | |
port.setReadOnly(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import rospy | |
from std_msgs.msg import String | |
pub = rospy.Publisher('topic_name', String, queue_size=10) | |
rospy.init_node('node_name') | |
r = rospy.Rate(10) # 10hz | |
while not rospy.is_shutdown(): | |
pub.publish("hello world") | |
r.sleep() |