def main():
    sys.stdout = sys.__stderr__

    # check node is exists
    nodes = [
    ]
    for node in nodes:
        checkNodeState(node, needed=True)

    # common for left/right hand camera
    topics = [
        '/json_saver/output/bin_contents',
        '/json_saver/output/json_dir',
    ]
    for topic in topics:
        if not checkTopicIsPublished(topic, timeout=5):
            return

    # for left/right hand camera
    topics = [
        # pick.launch
        'candidates_publisher/output/candidates',

        'weight_candidates_refiner/output/candidates/picked',
        'weight_candidates_refiner/output/candidates/placed',
    ]
    for side in ['left', 'right']:
        for topic in topics:
            topic = '/%s_hand_camera/%s' % (side, topic)
            if not checkTopicIsPublished(topic, timeout=30):
                return

    sys.stdout = sys.__stdout__
def main():
    sys.stdout = sys.__stderr__

    # check node is exists
    nodes = []
    for node in nodes:
        checkNodeState(node, needed=True)

    # common for left/right hand camera
    topics = [
        '/json_saver/output/bin_contents',
        '/json_saver/output/json_dir',
    ]
    for topic in topics:
        if not checkTopicIsPublished(topic, timeout=5):
            return

    # for left/right hand camera
    topics = [
        # pick.launch
        'candidates_publisher/output/candidates',
        'weight_candidates_refiner/output/candidates/picked',
        'weight_candidates_refiner/output/candidates/placed',
    ]
    for side in ['left', 'right']:
        for topic in topics:
            topic = '/%s_hand_camera/%s' % (side, topic)
            if not checkTopicIsPublished(topic, timeout=30):
                return

    sys.stdout = sys.__stdout__
Beispiel #3
0
def main():
    host = re.match("http://([0-9a-zA-Z]*):.*", os.environ["ROS_MASTER_URI"]).groups(0)[0]
    indexMessage("Check Git Repos in FC")
    checkGitRepoWithRosPack("drc_task_common")
    checkGitRepoWithRosPack("jsk_tools")

    indexMessage("Check BlacklistDaemons in OCS")
    checkBlackListDaemon(["chrome", "dropbox", "skype"], kill=True)

    indexMessage("Check Master in OCS Network")
    checkROSCoreROSMaster()
    checkROSMasterCLOSE_WAIT(host)
    rospy.init_node("check_sanity_ocs")

    indexMessage("Check Nodes in OCS")
    # check Node State
    for node in check_ocs_nodes:
        checkNodeState(node, needed=True)

    indexMessage("Check Input Device")
    # check Input Device
    checkNodeState('/midi_config_player', needed=True, sub_fail="Is MIDI connected ? or Is that powered on?")
    checkTopicIsPublished("/ocs/joy", None,
                          "XBox Controller seems to work",
                          "XBox Controller doesn't publish. Did you connect?")

    checkTopicIsPublished(
        "/ocs_dynamic_reconfigure/parameter_descriptions",
        Time,
        "[ocs] Silverhammer lowspeed protocol is working",
        "[ocs] Silverhammer lowspeed protocol is not working",
        5,
        [
            ["/ocs_from_fc_basic_low_speed/last_received_time", Time],
            ["/ocs_from_fc_eus/last_received_time", Time],
            ["/ocs_from_fc_low_speed/last_received_time", Time],
            ["/ocs_from_fc_vehicle/last_received_time", Time],
            ["/ocs_to_fc_eus/last_send_time", Time],
            ["/ocs_to_fc_low_speed/last_send_time", Time],
            ["/ocs_to_fc_reconfigure/last_send_time", Time],
            ["/ocs_to_fc_vehicle/last_send_time", Time],
        ])

    indexMessage("Check SilverHammer Subscribe Hz in OCS")
    checkSilverHammerSubscribe("/ocs_to_fc_eus/last_send_time", 1.0, 0.4, timeout=7)
    checkSilverHammerSubscribe("/ocs_to_fc_low_speed/last_send_time", 1.0, 0.4, timeout=7)
    checkSilverHammerSubscribe("/ocs_to_fc_vehicle/last_send_time", 1.0, 0.4, timeout=7)
    checkSilverHammerSubscribe("/ocs_to_fc_reconfigure/last_send_time", 1.0, 0.4, timeout=7)
    checkSilverHammerSubscribe("/ocs_from_fc_basic_low_speed/last_received_time", 10.0, 8.0, timeout=7)
    checkSilverHammerSubscribe("/ocs_from_fc_eus/last_received_time", 10.0, 8.0, timeout=7)
    checkSilverHammerSubscribe("/ocs_from_fc_low_speed/last_received_time", 10.0, 8.0, timeout=7)
    checkSilverHammerSubscribe("/ocs_from_fc_vehicle/last_received_time", 10.0, 8.0, timeout=7)
Beispiel #4
0
def main():
    host = re.match("http://([0-9a-zA-Z]*):.*", os.environ["ROS_MASTER_URI"]).groups(0)[0]
    indexMessage("Check Git Repos in FC")
    checkGitRepoWithRosPack("drc_task_common")
    checkGitRepoWithRosPack("jsk_tools")

    indexMessage("Check BlacklistDaemons in OCS")
    checkBlackListDaemon(["chrome", "dropbox", "skype"], kill=True)

    indexMessage("Check Master in OCS Network")
    # checkROSCoreROSMaster()
    checkROSMasterCLOSE_WAIT(host)
    rospy.init_node("check_sanity_ocs")

    indexMessage("Check Nodes in OCS")
    # check Node State
    for node in check_ocs_nodes:
        checkNodeState(node, needed=True)

    indexMessage("Check Input Device")
    # check Input Device
    checkNodeState('/midi_config_player', needed=True, sub_fail="Is MIDI connected ? or Is that powered on?")
    checkTopicIsPublished("/ocs/joy", None,
                          "XBox Controller seems to work",
                          "XBox Controller doesn't publish. Did you connect?")

    checkTopicIsPublished(
        "/ocs_dynamic_reconfigure/parameter_descriptions",
        Time,
        "[ocs] Silverhammer lowspeed protocol is working",
        "[ocs] Silverhammer lowspeed protocol is not working",
        5,
        [
            ["/ocs_from_fc_basic_low_speed/last_received_time", Time],
            ["/ocs_from_fc_eus/last_received_time", Time],
            ["/ocs_from_fc_low_speed/last_received_time", Time],
            ["/ocs_from_fc_vehicle/last_received_time", Time],
            ["/ocs_to_fc_eus/last_send_time", Time],
            ["/ocs_to_fc_low_speed/last_send_time", Time],
            ["/ocs_to_fc_reconfigure/last_send_time", Time],
            ["/ocs_to_fc_vehicle/last_send_time", Time],
        ])

    indexMessage("Check SilverHammer Subscribe Hz in OCS")
    checkSilverHammerSubscribe("/ocs_to_fc_eus/last_send_time", 1.0, 0.4, timeout=7)
    checkSilverHammerSubscribe("/ocs_to_fc_low_speed/last_send_time", 1.0, 0.4, timeout=7)
    checkSilverHammerSubscribe("/ocs_to_fc_vehicle/last_send_time", 1.0, 0.4, timeout=7)
    checkSilverHammerSubscribe("/ocs_to_fc_reconfigure/last_send_time", 1.0, 0.4, timeout=7)
    checkSilverHammerSubscribe("/ocs_from_fc_basic_low_speed/last_received_time", 10.0, 8.0, timeout=7)
    checkSilverHammerSubscribe("/ocs_from_fc_eus/last_received_time", 10.0, 8.0, timeout=7)
    checkSilverHammerSubscribe("/ocs_from_fc_low_speed/last_received_time", 10.0, 8.0, timeout=7)
    checkSilverHammerSubscribe("/ocs_from_fc_vehicle/last_received_time", 10.0, 8.0, timeout=7)
Beispiel #5
0
 def check_topic(self, stat, topic_name):
     # Assume that topic is published at more than (1.0 / timeout) Hz
     topic_state = checkTopicIsPublished(topic_name, timeout=10)
     if topic_state:
         stat.summary(DiagnosticStatus.OK, 'Topic is published')
     else:
         stat.summary(DiagnosticStatus.ERROR, 'Topic is not published')
     return stat
Beispiel #6
0
def main():
    rospy.init_node("check_sanity_ocs")

    host = re.match("http://([0-9a-zA-Z]*):.*", os.environ["ROS_MASTER_URI"]).groups(0)[0]
    checkROSMasterCLOSE_WAIT(host)

    indexMessage("Check Nodes in OCS")
    # check Node State
    for node in check_ocs_nodes:
        checkNodeState(node, needed=True)

    indexMessage("Check Input Device")
    # check Input Device
    checkNodeState('/midi_config_player', needed=True)
    checkTopicIsPublished("/ocs/joy", None,
                          "XBox Controller seems to work",
                          "XBox Controller doesn't publish. Did you connect?")

    checkTopicIsPublished(
        "/ocs_dynamic_reconfigure/parameter_descriptions",
        Time,
        "[ocs] Silverhammer lowspeed protocol is working",
        "[ocs] Silverhammer lowspeed protocol is not working",
        5,
        [
        ["/ocs_from_fc_basic_low_speed/last_publish_output_time", Time],
        ["/ocs_from_fc_basic_low_speed/last_received_time", Time],
        ["/ocs_from_fc_eus/last_publish_output_time", Time],
        ["/ocs_from_fc_eus/last_received_time", Time],
        ["/ocs_from_fc_low_speed/last_publish_output_time", Time],
        ["/ocs_from_fc_low_speed/last_received_time", Time],
        ["/ocs_from_fc_vehicle/last_publish_output_time", Time],
        ["/ocs_from_fc_vehicle/last_received_time", Time],
        ["/ocs_to_fc_eus/last_input_received_time", Time],
        ["/ocs_to_fc_eus/last_send_time", Time],
        ["/ocs_to_fc_low_speed/last_input_received_time", Time],
        ["/ocs_to_fc_low_speed/last_send_time", Time],
        ["/ocs_to_fc_reconfigure/last_input_received_time", Time],
        ["/ocs_to_fc_reconfigure/last_send_time", Time],
        ["/ocs_to_fc_vehicle/last_input_received_time", Time],
        ["/ocs_to_fc_vehicle/last_send_time", Time],
        ])
    checkNodeState("/fc_to_ocs_vehicle", True)
    checkNodeState("/fc_from_ocs_eus", True)
    checkNodeState("/fc_from_ocs_low_speed", True)
    checkNodeState("/fc_from_ocs_vehicle", True)
    checkNodeState("/fc_from_ocs_reconfigure", True)
    checkNodeState("/highspeed_streamer", True)

    indexMessage("Check Topics in FC")
    checkMultisenseRemote(
        "multisense remote is not working."
        "Run following command:\n"
        "roslaunch jaxon_ros_bridge jaxon_multisense_remote.launch\n"
        "on your machine")
    checkTopicIsPublished(
        "/highspeed_streamer/last_send_time",
        Time,
        "Silverhammer highspeed protocol is working",
        "Silverhammer highspeed protocol is not working")
    checkTopicIsPublished(
        "/fc_from_ocs_low_speed/last_received_time",
        Time,
        "Silverhammer lowspeed protocol is working",
        "Silverhammer lowspeed protocol is not working",
        5,
        [["/fc_from_ocs_reconfigure/last_received_time", Time],
         ["/fc_from_ocs_vehicle/last_received_time", Time],
         ["/fc_from_ocs_eus/last_received_time", Time],
         ["/fc_to_ocs_eus/last_send_time", Time],
         ["/fc_to_ocs_low_speed/last_send_time", Time],
         ["/fc_to_ocs_basic_low_speed/last_send_time", Time]])
    checkTopicIsPublished(