标签:http seconds import get sla 启动 引用 login configure
如何引用.launch文件(替换您选择的文件路径)并启动/关闭它。
import roslaunch
import rospy
rospy.init_node(‘en_Mapping‘, anonymous=True)
uuid = roslaunch.rlutil.get_or_generate_uuid(None, False)
roslaunch.configure_logging(uuid)
# launch = roslaunch.parent.ROSLaunchParent(uuid, ["/home/haier/catkin_ws/src/testapi/launch/test_node.launch"])
launch = roslaunch.parent.ROSLaunchParent(uuid, ["/opt/ros/kinetic/share/rosbridge_server/launch/rosbridge_websocket.launch"])
launch.start()
rospy.loginfo("started")
rospy.sleep(3)
# 3 seconds later
launch.shutdown()
原文链接: http://wiki.ros.org/roslaunch/API%20Usage
标签:http seconds import get sla 启动 引用 login configure
原文地址:https://www.cnblogs.com/yang220/p/12517289.html