start-laser.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import rospy, sys
00003 from std_msgs.msg import Float64
00004 
00005 #rostopic pub /multisense_sl/set_spindle_speed std_msgs/Float64 1.2
00006 
00007 def start_laser(speed):
00008     pub = rospy.Publisher('/multisense_sl/set_spindle_speed', Float64)
00009     rospy.init_node('start_laser_node')
00010 
00011     while pub.get_num_connections() == 0:
00012         rospy.sleep(0.1)
00013 
00014     pub.publish(speed)
00015 
00016 if __name__ == '__main__':
00017     try:
00018         argvs = sys.argv
00019         argc = len(argvs)
00020         speed = 1.2
00021         if argc > 1:
00022             speed = float(argvs[1])
00023         start_laser(speed)
00024     except rospy.ROSInterruptException:
00025         pass


hrpsys_gazebo_atlas
Author(s): Yohei Kakiuchi
autogenerated on Thu Jun 6 2019 20:57:50