Skip to content

Commit

Permalink
add objects
Browse files Browse the repository at this point in the history
  • Loading branch information
ZharkovKirill committed Nov 2, 2023
1 parent 0230e22 commit e21329b
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 357 deletions.
2 changes: 1 addition & 1 deletion app/app_new_mcts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
rule_vocabulary = create_rules()

init_graph = GraphGrammar()
env = SubStringDesignEnvironment(rule_vocabulary, evaluator_tendon_fast_debug,
env = SubStringDesignEnvironment(rule_vocabulary, evaluator_tendon_standart,
mcts_hyper_default.max_number_rules, init_graph, 0)

mcts = MCTS(env, mcts_hyper_default.C)
Expand Down
33 changes: 0 additions & 33 deletions app/hyperparameters.py

This file was deleted.

285 changes: 0 additions & 285 deletions app/mcts_run_setup.py

This file was deleted.

29 changes: 16 additions & 13 deletions app/one_graph_simulation.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
from mcts_run_setup import config_tendon
import tendon_graph_evaluators

from rostok.library.obj_grasp.objects import get_object_sphere
from rostok.library.rule_sets.simple_designs import (
get_three_link_one_finger, get_three_link_one_finger_independent, get_two_link_three_finger, )
get_three_link_one_finger,
get_three_link_one_finger_independent,
get_two_link_three_finger,
)
if __name__ == "__main__":
# create blueprint for object to grasp
grasp_object_blueprint = get_object_sphere(0.05, mass=0.2)

# create blueprint for object to grasp
grasp_object_blueprint = get_object_sphere(0.05, mass=0.2)
control_optimizer = tendon_graph_evaluators.evaluator_tendon_standart_parallel

# create reward counter using run setup function
# control_optimizer = config_with_const_troques(grasp_object_blueprint)

control_optimizer = config_tendon(grasp_object_blueprint)

graph = get_three_link_one_finger_independent()
graph = graph = get_two_link_three_finger()
graph = get_three_link_one_finger_independent()
graph = graph = get_two_link_three_finger()

rewsss = control_optimizer.calculate_reward(graph)
pass
rewsss = control_optimizer.calculate_reward(graph)

first_object = control_optimizer.prepare_reward.reward_one_sim_scenario(
x=rewsss[1][0], graph=graph, sim=control_optimizer.simulation_scenario[0])
print(rewsss)
Loading

0 comments on commit e21329b

Please sign in to comment.