{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/learning-modular-robot-control-policies","title":"Learning Modular Robot Control Policies","arxiv_id":"2105.10049","date":"2021-05-20","proceeding":null,"authors":["Julian Whitman","Matthew Travers","Howie Choset"],"abstract":"Modular robots can be rearranged into a new design, perhaps each day, to handle a wide variety of tasks by forming a customized robot for each new task. However, reconfiguring just the mechanism is not sufficient: each design also requires its own unique control policy. One could craft a policy from scratch for each new design, but such an approach is not scalable, especially given the large number of designs that can be generated from even a small set of modules. Instead, we create a modular policy framework where the policy structure is conditioned on the hardware arrangement, and use just one training process to create a policy that controls a wide variety of designs. Our approach leverages the fact that the kinematics of a modular robot can be represented as a design graph, with nodes as modules and edges as connections between them. Given a robot, its design graph is used to create a policy graph with the same structure, where each node contains a deep neural network, and modules of the same type share knowledge via shared parameters (e.g., all legs on a hexapod share the same network parameters). We developed a model-based reinforcement learning algorithm, interleaving model learning and trajectory optimization to train the policy. We show the modular policy generalizes to a large number of designs that were not seen during training without any additional learning. Finally, we demonstrate the policy controlling a variety of designs to locomote with both simulated and real robots.","url_abs":"https://arxiv.org/abs/2105.10049v2","url_pdf":"https://arxiv.org/pdf/2105.10049v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"learning-modular-robot-control-policies","repo_url":"https://github.com/biorobotics/learning_modular_policies","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"model-based-reinforcement-learning","task_name":"Model-based Reinforcement Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2105.10049","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.10049"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/biorobotics/learning_modular_policies","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"unverified":6},"by_repo_kind":{"official":{"samples":6,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"780b18db026282ab","entry":"create_cost_mats2","repo":"biorobotics/learning_modular_policies","repo_kind":"official","path":"modular_policy/planning_utils.py","file_url":"https://github.com/biorobotics/learning_modular_policies/blob/HEAD/modular_policy/planning_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"780b18db026282ab"}},{"code_sha256_prefix":"f4019f7e953c8d4b","entry":"get_GNN_params_list","repo":"biorobotics/learning_modular_policies","repo_kind":"official","path":"modular_policy/pgnn.py","file_url":"https://github.com/biorobotics/learning_modular_policies/blob/HEAD/modular_policy/pgnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f4019f7e953c8d4b"}},{"code_sha256_prefix":"d7e665d538f78faa","entry":"get_pos_control_inds","repo":"biorobotics/learning_modular_policies","repo_kind":"official","path":"modular_policy/planning_utils.py","file_url":"https://github.com/biorobotics/learning_modular_policies/blob/HEAD/modular_policy/planning_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d7e665d538f78faa"}},{"code_sha256_prefix":"65ee4852b0742c6d","entry":"get_state_dicts","repo":"biorobotics/learning_modular_policies","repo_kind":"official","path":"modular_policy/pgnn.py","file_url":"https://github.com/biorobotics/learning_modular_policies/blob/HEAD/modular_policy/pgnn.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"65ee4852b0742c6d"}},{"code_sha256_prefix":"969945204bc296ce","entry":"npstr","repo":"biorobotics/learning_modular_policies","repo_kind":"official","path":"modular_policy/mbrl.py","file_url":"https://github.com/biorobotics/learning_modular_policies/blob/HEAD/modular_policy/mbrl.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"969945204bc296ce"}},{"code_sha256_prefix":"024c0232a4a12de2","entry":"spline_generator","repo":"biorobotics/learning_modular_policies","repo_kind":"official","path":"modular_policy/generate_random_rollouts.py","file_url":"https://github.com/biorobotics/learning_modular_policies/blob/HEAD/modular_policy/generate_random_rollouts.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"024c0232a4a12de2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}