def robot_supports_simulation(id_robot):
    robot = get_conftools_robots().instance(id_robot)
    orobot = robot.get_inner_components()[-1]
    if not isinstance(orobot, VehicleSimulation):
        return False
    else:
        return True
Example #2
0
def process(nmap, id_robot):
    res = {}
    index = nmap.get_R2_centroid_index()
    
    origin = nmap.get_pose_at_index(index)
    nmap = nmap.move_origin(origin)
    res['nmap'] = nmap
    res['centroid'] = nmap.get_R2_points()[index]
    res['y_goal'] = nmap.get_observations_at(index)

    # we need to convert commands to velocities for visualization
    res['robot'] = get_conftools_robots().instance(id_robot)
    
    return res
from bootstrapping_olympics import (get_conftools_agents, get_conftools_robots,
    get_conftools_nuisances, get_conftools_nuisances_causal)
from comptests import comptests_for_all_pairs, comptests_for_all


library_agents = get_conftools_agents()
library_robots = get_conftools_robots()
library_nuisances = get_conftools_nuisances()
library_nuisances_causal = get_conftools_nuisances_causal()

for_all_robots = comptests_for_all(library_robots)
for_all_agents = comptests_for_all(library_agents)
for_all_nuisances = comptests_for_all(library_nuisances)
for_all_nuisances_causal = comptests_for_all(library_nuisances_causal)

for_all_pairs = comptests_for_all_pairs(library_agents, library_robots)
for_all_robot_nuisance_pairs = comptests_for_all_pairs(library_robots, library_nuisances)



# 
# # XXX: this is not used yet
# def wrap_with_desc(function, arguments,
#                    agent=None, robot=None, nuisance=None):
#     ''' Calls function with arguments, and writes debug information
#         if an exception is detected. '''
# 
#     try:
#         function(*arguments)
#     except:
#         msg = ('Error detected when running test (%s); '