Example #1
0
def make_live_cheezit_video_1():
    scene = get_scene('live_cheezit')
    trial = lookup_trial('YCB')

    with WindowRecorder([
            "live_shape_completion.rviz* - RViz",
            "live_shape_completion.rviz - RViz"
    ],
                        frame_rate=30.0,
                        name_suffix="rviz",
                        save_dir=rviz_capture_path):
        with CameraRecorder(filename=f'{rviz_capture_path}/live_cheezit.mp4'):
            contact_shape_completer = ContactShapeCompleter(
                scene, trial, store_request=False)
            contact_shape_completer.get_visible_vg()
            contact_shape_completer.compute_known_occ()

            print("Up and running")
            rospy.spin()
Example #2
0
def make_aab_video_1():
    # tf.random.set_seed(20210108) # Okay, but initial free space measurement does not affect any particles
    tf.random.set_seed(20210111)
    scene = get_scene('cheezit_01')
    trial = lookup_trial('AAB')

    with WindowRecorder([
            "live_shape_completion.rviz* - RViz",
            "live_shape_completion.rviz - RViz"
    ],
                        frame_rate=30.0,
                        name_suffix="rviz",
                        save_dir=rviz_capture_path):
        contact_shape_completer = ContactShapeCompleter(scene,
                                                        trial,
                                                        store_request=False,
                                                        completion_density=1)
        contact_shape_completer.get_visible_vg()
        contact_shape_completer.compute_known_occ()

        print("Up and running")
        rospy.spin()
Example #3
0
"""

default_dataset_params = default_params.get_default_params()


def parse_command_line_args():
    parser = argparse.ArgumentParser(
        description='Publish shape data to RViz for viewing')
    parser.add_argument('--trial', required=True)
    parser.add_argument('--scene', required=True)
    parser.add_argument('--store', action='store_true')
    return parser.parse_args()


if __name__ == "__main__":
    ARGS = parse_command_line_args()

    rospy.init_node('contact_shape_completer_service')
    rospy.loginfo("Data Publisher")

    scene = get_scene(ARGS.scene)

    contact_shape_completer = ContactShapeCompleter(scene,
                                                    lookup_trial(ARGS.trial),
                                                    store_request=ARGS.store)
    contact_shape_completer.get_visible_vg()
    contact_shape_completer.compute_known_occ()

    print("Up and running")
    rospy.spin()