Ejemplo n.º 1
0
def detect_collision(spec, config):
    if test_environment_bounds(config) and test_angle_constraints(config, spec) and \
            test_length_constraints(config, spec) and test_grapple_point_constraint(config, spec) and \
            test_self_collision(config, spec) and test_obstacle_collision(config, spec, spec.obstacles):
        return True
    else:
        return False
Ejemplo n.º 2
0
def check_valid(config, spec):
    if len(config.points) <= 1:
        return True
    return (tester.test_angle_constraints(config, spec)
            and tester.test_self_collision(config)
            and tester.test_obstacle_collision(config, spec, spec.obstacles)
            and tester.test_environment_bounds(config))
Ejemplo n.º 3
0
def config_validity(config: robot_config.RobotConfig,
                    spec: problem_spec.ProblemSpec):
    #tester.test_obstacle_collision(config, spec, spec.obstacles
    return (custom_test_obstacle_collision(config, problem, custom_get_lenient_obstacles(spec))\
        and tester.test_self_collision(config, spec)\
        and tester.test_length_constraints(config, spec)\
        and tester.test_angle_constraints(config, spec)\
        and tester.test_environment_bounds(config))
Ejemplo n.º 4
0
def individual_config_collision_checking(spec, config):
    # Obstacle Collision - true for pass, false for fail
    # Self Collision - return true for pass, false for fail
    # Environment Bound - return true for pass, false for fail
    # Angle Constraints - true for pass, false for fail
    return test_obstacle_collision(
        config, spec, spec.obstacles) and test_self_collision(
            config, spec) and test_environment_bounds(
                config) and test_angle_constraints(config, spec)
Ejemplo n.º 5
0
def valid_config(config, spec):
    """
    #Imported from tester
    #Self Collision
    #Bound check
    #Angle constraints
    #Length constraints
    #Obstacle collision
    """
    if test_self_collision(config, spec) == False:
        return False
    if test_environment_bounds(config) == False:
        return False
    if test_angle_constraints(config, spec) == False:
        return False
    if test_length_constraints(config, spec) == False:
        return False
    if test_obstacle_collision(config, spec, spec.obstacles) == False:
        return False
    return True