Go to the documentation of this file.00001
00002
00003 import roslib
00004
00005 roslib.load_manifest( 'rospy' )
00006 roslib.load_manifest( 'std_msgs' )
00007
00008 import rospy
00009 import std_msgs.msg
00010
00011 import sys
00012 import time
00013
00014 def main():
00015 if len( sys.argv ) > 1:
00016 topic = str( sys.argv[1] )
00017 else:
00018 print 'Usage:', sys.argv[0], '<topic>'
00019 sys.exit( 1 )
00020
00021 rospy.init_node( 'set_joint_effort', anonymous=True )
00022 pub = rospy.Publisher( topic, std_msgs.msg.Float64 )
00023
00024 while( True ):
00025 print 'New effort: ',
00026 cmd = float( sys.stdin.readline() )
00027 pub.publish( cmd )
00028
00029 if __name__ == '__main__':
00030 main()
00031