python类INFO的实例源码

mobile_tracker.py 文件源码 项目:overhead_mobile_tracker 作者: NU-MSR 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def main():
    rospy.init_node('mobile_robot_tracker', log_level=rospy.INFO)
    rospy.loginfo("Starting tracking node...")

    try:
        tracker = MobileTracker()
    except rospy.ROSInterruptException:
        pass

    rospy.spin()
system_calibrator.py 文件源码 项目:overhead_mobile_tracker 作者: NU-MSR 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def main():
    rospy.init_node('system_calibrator', log_level=rospy.INFO)
    rospy.loginfo("Calibration node started")
    rospy.loginfo("Press 'c' to begin calibration")
    try:
        calibrator = SystemCalibrator()
    except rospy.ROSInterruptException:
        pass

    rospy.spin()
__init__.py 文件源码 项目:lidapy-framework 作者: CognitiveComputingResearchGroup 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def __init__(self):
        super(RosCommunicationProxy, self).__init__('RosCommunicationProxy')

        self.log_level_map = {LOG_LEVEL_DEBUG: rospy.DEBUG,
                              LOG_LEVEL_INFO: rospy.INFO,
                              LOG_LEVEL_WARN: rospy.WARN,
                              LOG_LEVEL_ERROR: rospy.ERROR,
                              LOG_LEVEL_FATAL: rospy.FATAL}
__init__.py 文件源码 项目:lidapy-framework 作者: CognitiveComputingResearchGroup 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def info(self, msg):
        if LOG_LEVEL_INFO >= self.log_level:
            print(self._get_formatted_msg(msg, 'INFO'), file=sys.stdout)
check_state_for_collisions.py 文件源码 项目:baxter_throw 作者: rikkimelissa 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def main():
    rospy.init_node('check_collisions_node', log_level=rospy.INFO)
    rospy.loginfo("Starting up collision checking demo node")
    try:
        coll_checker = CheckCollisionState()
    except rospy.ROSInterruptException:
        pass
    rospy.spin()
gripper_cuff_control.py 文件源码 项目:intera_sdk 作者: RethinkRobotics 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
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


问题


面经


文章

微信
公众号

扫码关注公众号