当前位置: 首页>>代码示例>>Python>>正文


Python rospy.INFO属性代码示例

本文整理汇总了Python中rospy.INFO属性的典型用法代码示例。如果您正苦于以下问题:Python rospy.INFO属性的具体用法?Python rospy.INFO怎么用?Python rospy.INFO使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在rospy的用法示例。


在下文中一共展示了rospy.INFO属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import rospy [as 别名]
# 或者: from rospy import INFO [as 别名]
def __init__(self, msg="", msgtype = MSGTYPE.INFO, freq=1000, length=0, repeat=1 ):
        self.msg = msg
        self.f = freq
        self.l = length
        self.r = repeat
        self.beep = length>0
        self.type = msgtype 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:9,代码来源:driverWindow.py

示例2: beepMsg

# 需要导入模块: import rospy [as 别名]
# 或者: from rospy import INFO [as 别名]
def beepMsg(self, msg):
        if self.beepOn and msg.beep:
            os.system("beep -f "+str(msg.f)+"-l "+str(msg.l)+" -r "+str(msg.r)+"&")
        if msg.msg != "":
            if msg.type == MSGTYPE.INFO:
                rospy.loginfo(msg.msg)
            elif msg.type == MSGTYPE.WARN:
                rospy.logwarn(msg.msg)
            elif msg.type == MSGTYPE.ERROR:
                rospy.logerr(msg.msg)
            elif msg.type == MSGTYPE.DEBUG:
                rospy.logdebug(msg.msg)
            else:
                rospy.logerr("UNKNOWN MESSAGE TYPE: %s", msg.msg)
            self.ui.statusbar.showMessage(msg.msg, 0) 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:17,代码来源:driverWindow.py

示例3: run

# 需要导入模块: import rospy [as 别名]
# 或者: from rospy import INFO [as 别名]
def run(self):
        rospy.init_node('CrazyflieDriverUSB%d' % self.options.radio,
                        log_level=rospy.DEBUG if self.options.debug else rospy.INFO,
                        disable_signals=True,
                        anonymous=False) 
开发者ID:omwdunkley,项目名称:crazyflieROS,代码行数:7,代码来源:driverWindow.py

示例4: main

# 需要导入模块: import rospy [as 别名]
# 或者: from rospy import INFO [as 别名]
def main():
    """SDK Gripper Button Control Example

    Connects cuff buttons to gripper open/close commands:
        'Circle' Button    - open gripper
        'Dash' Button      - close gripper
        Cuff 'Squeeze'     - turn on Nav lights

    Run this example in the background or in another terminal
    to be able to easily control the grippers by hand while
    using the robot. Can be run in parallel with other code.
    """
    rp = RobotParams()
    valid_limbs = rp.get_limb_names()
    if not valid_limbs:
        rp.log_message(("Cannot detect any limb parameters on this robot. "
                        "Exiting."), "ERROR")
        return
    if len(valid_limbs) > 1:
        valid_limbs.append("all_limbs")
    arg_fmt = argparse.RawDescriptionHelpFormatter
    parser = argparse.ArgumentParser(formatter_class=arg_fmt,
                                     description=main.__doc__)
    parser.add_argument('-g', '--gripper', dest='gripper', default=valid_limbs[0],
                        choices=[valid_limbs],
                        help='gripper limb to control (default: both)')
    parser.add_argument('-n', '--no-lights', dest='lights',
                        action='store_false',
                        help='do not trigger lights on cuff grasp')
    parser.add_argument('-v', '--verbose', dest='verbosity',
                        action='store_const', const=rospy.DEBUG,
                        default=rospy.INFO,
                        help='print debug statements')
    args = parser.parse_args(rospy.myargv()[1:])

    rospy.init_node('sdk_gripper_cuff_control_{0}'.format(args.gripper),
                    log_level=args.verbosity)

    arms = (args.gripper,) if args.gripper != 'all_limbs' else valid_limbs[:-1]
    grip_ctrls = [GripperConnect(arm, args.lights) for arm in arms]

    print("Press cuff buttons for gripper control. Spinning...")
    rospy.spin()
    print("Gripper Button Control Finished.")
    return 0 
开发者ID:RethinkRobotics,项目名称:intera_sdk,代码行数:47,代码来源:gripper_cuff_control.py


注:本文中的rospy.INFO属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。