示例#1
0
motors = 3
extero = 2
name = "taxis_sa_%dd_extero_goal" % (motors)
expr_id = make_expr_id(name)

# using dict convention seemed to be the best over yaml and friends
conf = {
    # first level corresponds to experiment
    "numsteps": numsteps,
    "id": "%s_%s" % (name, time.strftime("%Y%m%d_%H%M%S")),
    # these are arrays of dicts specifying components
    "robots": [
        {
            "class": SimpleArmRobot, # SimpleRandomRobot,
            "type": "explauto",
            "name": make_robot_name(expr_id, "sa", 0),
            "numsteps": numsteps,
            "control": "angles",
            "ros": False,
            "length_ratio": 3,
            "m_mins": -np.ones((motors, 1)) * np.pi/3.0,
            "m_maxs": np.ones((motors, 1)) * np.pi/3.0,
            "s_mins": np.array((-1.0, -1.0)),
            "s_maxs": np.array(( 1.0,  1.0)),
            # pointmass foo
            "statedim": motors * 3,
            "dt": dt,
            "mass": 1.0,
            "force_max":  1.0,
            "force_min": -1.0,
            "friction": 0.01,
示例#2
0
文件: kinesis_pm_1d.py 项目: x75/smq
         "dim_s_intero": make_column_names_numbered("vel_", motors) + \
     make_column_names_numbered("pos_", motors) + \
     make_column_names_numbered("vel_error", motors) + \
     make_column_names_numbered("vel_goal", motors), #+ \
         #        make_column_names_numbered("thresh", motors),
         "dim_s_reward": make_column_names_numbered("dist_goal", 1),
         "dim_s_pred": make_column_names_numbered("acc_pred", motors),
         # to world
         "dim_s_motor": make_column_names_numbered("m", motors),
     },
 ],
 "robots": [
     {
         "class": PointmassRobot2, # SimpleRandomRobot,
         "type": "explauto",
         "name": make_robot_name(expr_id, "pm", 0),
         "numsteps": numsteps,
         "control": "force",
         "ros": False,
         "statedim": motors * 3,
         "dt": dt,
         "mass": 1.0,
         "force_max":  1.0,
         "force_min": -1.0,
         "friction": 0.01,
         "sysnoise": 1e-3,
     }
 ],
 "brains": [
     {
         "class": KinesisBrain2,
# using dict convention seemed to be the best over yaml and friends
conf = {
    # first level corresponds to experiment
    "numsteps":
    numsteps,
    "id":
    "%s-%s" % (name, time.strftime("%Y%m%d-%H%M%S")),
    # these are arrays of dicts specifying components
    "robots": [{
        "class":
        PointmassRobot,  # SimpleRandomRobot,
        "type":
        "explauto",
        "name":
        make_robot_name(expr_id, "pm_kinematic", 0),
        # dimensions of different subparts of sm vector
        # make that more compact / automatically inferred
        # actually: make that lists of names whose length is the dim
        "dim_s_proprio": ["acc"],
        "dim_s_extero": ["vel"],
        "dim_s_intero": ["vel_", "pos_", "vel_goal"],
        "dim_s_reward": ["dist_goal"],
        "dim_s_pred": ["acc_pred"],
        "dim_s_motor": ["m"] * motors,
        "numsteps":
        numsteps,
        "control":
        "vel",
        "ros":
        False,
示例#4
0
numsteps = 1000
motors   = 3
name = "taxis_2d"
expr_id = make_expr_id(name)

# using dict convention seemed to be the best over yaml and friends
conf = {
    # first level corresponds to experiment
    "numsteps": numsteps,
    "id": expr_id,
    # these are arrays of dicts specifying components
    "robots": [
        {
            "class": PointmassRobot, # SimpleRandomRobot,
            "type": "explauto",
            "name": make_robot_name(expr_id, "pm", 0),
            # dimensions of different subparts of sm vector
            # make that more compact / automatically inferred
            # actually: make that lists of names whose length is the dim
            "dim_s_proprio": make_column_names_numbered("acc", motors),
            "dim_s_extero": make_column_names_numbered("vel", motors),
            "dim_s_intero": make_column_names_numbered("vel_", motors) + make_column_names_numbered("pos_", motors) + make_column_names_numbered("vel_goal", motors) + make_column_names_numbered("vel_error", motors),
            "dim_s_reward": make_column_names_numbered("dist_goal", 1),
            "dim_s_pred": make_column_names_numbered("acc_pred", motors),
            "dim_s_motor": make_column_names_numbered("m", motors),
            "numsteps": numsteps,
            "control": "force",
            "ros": False,
            "brains": [
                {
                    "class": TaxisBrain,
示例#5
0
# using dict convention seemed to be the best over yaml and friends
conf = {
    # first level corresponds to experiment
    "numsteps":
    numsteps,
    "id":
    expr_id,
    # these are arrays of dicts specifying components
    "robots": [{
        "class":
        SimplearmRobot,
        "type":
        "explauto",
        "name":
        make_robot_name(expr_id, "sa", 0),
        # dimensions of different subparts of sm vector
        # make that more compact / automatically inferred
        # actually: make that lists of names whose length is the dim
        "dim_s_proprio":
        make_column_names_numbered("j_ang", motors),
        "dim_s_extero":
        make_column_names_numbered("ee_pos", 2),
        "dim_s_intero":
        make_column_names_numbered("j_ang_", motors) +
        make_column_names_numbered("ee_pos_", 2) +
        make_column_names_numbered("j_ang_goal", motors),
        "dim_s_reward":
        make_column_names_numbered("dist_goal", 1),
        "dim_s_pred":
        make_column_names_numbered("j_ang_pred", motors),