lights_blink.py 文件源码

python
阅读 15 收藏 0 点赞 0 评论 0

项目:intera_sdk 作者: RethinkRobotics 项目源码 文件源码
def main():
    """Intera SDK Lights Example: Blink

    Toggles the Lights interface on then off again
    while printing the state at each step. Simple demonstration
    of using the intera_interface.Lights class.

    Run this example with default arguments and watch the green
    light on the head blink on and off while the console
    echos the state. Use the light names from Lights.list_all_lights()
    to change lights to toggle.
    """
    epilog = """ Intera Interface Lights """
    arg_fmt = argparse.RawDescriptionHelpFormatter
    parser = argparse.ArgumentParser(formatter_class=arg_fmt,
                                     description=main.__doc__,
                                     epilog=epilog)
    parser.add_argument(
        '-l', '--light_name', dest='light_name',
        default='head_green_light',
        help=('name of Light component to use'
              ' (default: head_green_light)')
    )
    args = parser.parse_args(rospy.myargv()[1:])

    rospy.init_node('sdk_lights_blink', anonymous=True)
    test_light_interface(args.light_name)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号