예제 #1
0
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__
예제 #2
0
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__
예제 #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)
예제 #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)
예제 #5
0
 def check_node(self, stat, node_name):
     node_state = checkNodeState(node_name, needed=True)
     if node_state:
         stat.summary(DiagnosticStatus.OK, 'Node is alive')
     else:
         stat.summary(DiagnosticStatus.ERROR, 'Node is dead')
     return stat
예제 #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],
        ])
def main():
    # check node is exists
    nodes = [
        '/left_hand_camera/left/left_nodelet_manager',
        '/left_hand_camera/right/right_nodelet_manager',
        '/left_hand_camera/stereo/stereo_image_proc',
        '/right_hand_camera/left/left_nodelet_manager',
        '/right_hand_camera/right/right_nodelet_manager',
        '/right_hand_camera/stereo/stereo_image_proc',
    ]
    for node in nodes:
        checkNodeState(node, needed=True)

    topic_checkers = []

    # common for left/right hand camera
    topics = [
        '/robot/joint_states',
        '/transformable_bin_markers/output/boxes',
        '/gripper_front/limb/left/dxl/motor_states/port',
        '/gripper_front/limb/left/dxl/finger_tendon_controller/state',
        '/gripper_front/limb/left/dxl/finger_yaw_joint_controller/state',
        '/gripper_front/limb/left/dxl/prismatic_joint_controller/state',
        '/gripper_front/limb/left/dxl/vacuum_pad_tendon_controller/state',
        '/gripper_front/limb/right/dxl/motor_states/port',
        '/gripper_front/limb/right/dxl/finger_tendon_controller/state',
        '/gripper_front/limb/right/dxl/finger_yaw_joint_controller/state',
        '/gripper_front/limb/right/dxl/prismatic_joint_controller/state',
        '/gripper_front/limb/right/dxl/vacuum_pad_tendon_controller/state',
        '/vacuum_gripper/limb/left/state',
        '/vacuum_gripper/limb/right/state',
        '/lgripper_sensors',
        '/rgripper_sensors',
        '/scale0/output',
        '/scale1/output',
        '/scale2/output',
        '/scale3/output',
    ]
    for topic in topics:
        topic_checkers.append(TopicPublishedChecker(topic, timeout=5))

    # for left/right hand camera
    topics = [
        # setup_for_pick.launch
        'left/rgb/camera_info',
        'left/rgb/image_rect_color',
        'left/depth_registered/camera_info',
        'left/depth_registered/sw_registered/image_rect',
        'left/depth_registered/points',
        'right/rgb/camera_info',
        'right/rgb/image_rect_color',
        'stereo/depth_registered/image_rect',
        'fused/rgb/camera_info',
        'fused/rgb/image_rect_color',
        'fused/depth_registered/image_rect',
        'fused/depth_registered/points',
        'fcn_object_segmentation/output/proba_image',
        'apply_context_to_label_proba/output/label',
        'attention_clipper_target_bin/output/point_indices',
        'extract_indices_target_bin/output',
        'label_to_cluster_indices/output',
        'cluster_indices_decomposer_label/boxes',
        'cluster_indices_decomposer_label/centroid_pose_array',
        'label_to_mask/output',
        'mask_to_point_indices/output',
        'extract_indices_target_label/output',
        'cluster_indices_decomposer_target/boxes',
        'cluster_indices_decomposer_target/centroid_pose_array',
        'bbox_array_to_bbox/output',
    ]
    for side in ['left', 'right']:
        for topic in topics:
            topic = '/%s_hand_camera/%s' % (side, topic)
            topic_checkers.append(TopicPublishedChecker(topic, timeout=5))

    for checker in topic_checkers:
        checker.check()
예제 #8
0
from geometry_msgs.msg import PolygonStamped, Point32
from jsk_hrp2_ros_bridge.sanity_util import checkMultisenseRemote

if __name__ == "__main__":
    indexMessage("Check Daemons in FC")
    checkBlackListDaemon(["chrome", "dropbox", "skype"], kill=False)
    
    host = re.match("http://([0-9a-zA-Z]*):.*", os.environ["ROS_MASTER_URI"]).groups(0)[0]
    checkROSMasterCLOSE_WAIT(host)

    indexMessage("Check Git Repos in FC")
    checkGitRepoWithRosPack("drc_task_common")
    rospy.init_node("chesk_sanity_fc")

    indexMessage("Check Nodes in FC")
    checkNodeState("/fc_to_ocs_basic_low_speed", True)
    checkNodeState("/fc_to_ocs_eus", True)
    checkNodeState("/fc_to_ocs_low_speed", True)
    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")
예제 #9
0
from geometry_msgs.msg import PolygonStamped, Point32
from jsk_hrp2_ros_bridge.sanity_util import checkMultisenseRemote

if __name__ == "__main__":
    indexMessage("Check Daemons in FC")
    checkBlackListDaemon(["chrome", "dropbox", "skype"], kill=False)

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

    indexMessage("Check Git Repos in FC")
    checkGitRepoWithRosPack("drc_task_common")
    rospy.init_node("chesk_sanity_fc")

    indexMessage("Check Nodes in FC")
    checkNodeState("/fc_to_ocs_basic_low_speed", True)
    checkNodeState("/fc_to_ocs_eus", True)
    checkNodeState("/fc_to_ocs_low_speed", True)
    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"
def main():
    # check node is exists
    nodes = [
        '/left_hand_camera/left/left_nodelet_manager',
        '/left_hand_camera/right/right_nodelet_manager',
        '/left_hand_camera/stereo/stereo_image_proc',

        '/right_hand_camera/left/left_nodelet_manager',
        '/right_hand_camera/right/right_nodelet_manager',
        '/right_hand_camera/stereo/stereo_image_proc',
    ]
    for node in nodes:
        checkNodeState(node, needed=True)

    topic_checkers = []

    # common for left/right hand camera
    topics = [
        '/robot/joint_states',
        '/transformable_bin_markers/output/boxes',

        '/gripper_front/limb/left/dxl/motor_states/port',
        '/gripper_front/limb/left/dxl/finger_tendon_controller/state',
        '/gripper_front/limb/left/dxl/finger_yaw_joint_controller/state',
        '/gripper_front/limb/left/dxl/prismatic_joint_controller/state',
        '/gripper_front/limb/left/dxl/vacuum_pad_tendon_controller/state',

        '/gripper_front/limb/right/dxl/motor_states/port',
        '/gripper_front/limb/right/dxl/finger_tendon_controller/state',
        '/gripper_front/limb/right/dxl/finger_yaw_joint_controller/state',
        '/gripper_front/limb/right/dxl/prismatic_joint_controller/state',
        '/gripper_front/limb/right/dxl/vacuum_pad_tendon_controller/state',

        '/vacuum_gripper/limb/left/state',
        '/vacuum_gripper/limb/right/state',

        '/lgripper_sensors',
        '/rgripper_sensors',

        '/scale0/output',
        '/scale1/output',
        '/scale2/output',
        '/scale3/output',
    ]
    for topic in topics:
        topic_checkers.append(TopicPublishedChecker(topic, timeout=5))

    # for left/right hand camera
    topics = [
        # setup_for_pick.launch
        'left/rgb/camera_info',
        'left/rgb/image_rect_color',
        'left/depth_registered/camera_info',
        'left/depth_registered/sw_registered/image_rect',
        'left/depth_registered/points',

        'right/rgb/camera_info',
        'right/rgb/image_rect_color',

        'stereo/depth_registered/image_rect',

        'fused/rgb/camera_info',
        'fused/rgb/image_rect_color',
        'fused/depth_registered/image_rect',
        'fused/depth_registered/points',

        'fcn_object_segmentation/output/proba_image',
        'apply_context_to_label_proba/output/label',

        'attention_clipper_target_bin/output/point_indices',
        'extract_indices_target_bin/output',

        'label_to_cluster_indices/output',
        'cluster_indices_decomposer_label/boxes',
        'cluster_indices_decomposer_label/centroid_pose_array',

        'label_to_mask/output',
        'mask_to_point_indices/output',
        'extract_indices_target_label/output',

        'cluster_indices_decomposer_target/boxes',
        'cluster_indices_decomposer_target/centroid_pose_array',
        'bbox_array_to_bbox/output',
    ]
    for side in ['left', 'right']:
        for topic in topics:
            topic = '/%s_hand_camera/%s' % (side, topic)
            topic_checkers.append(TopicPublishedChecker(topic, timeout=5))

    for checker in topic_checkers:
        checker.check()