Created
August 11, 2017 09:55
-
-
Save zenfiric/39369a2d991f4b333c3c0a602c507ba0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from revolve.angle.robogen.spec import get_body_spec | |
from tol.config.config import parser | |
from revolve.generate import FixedOrientationBodyGenerator | |
from revolve.spec import BodyImplementation, PartSpec, ParamSpec | |
from revolve.angle.robogen.body_parts import * | |
channel_func = lambda channel: ParamSpec(channel, min_value=0, max_value=1, default=0.5, epsilon=0) | |
color_params = [channel_func("red"), channel_func("green"), channel_func("blue")] | |
body_cfg = parser.parse_args() | |
body_config = { | |
"Core": PartSpec( | |
body_part=CoreComponent, | |
arity=4, | |
params=color_params | |
), | |
"FixedBrick": PartSpec( | |
body_part=FixedBrick, | |
arity=4, | |
params=color_params | |
), | |
"ActiveHinge": PartSpec( | |
body_part=ActiveHinge, | |
arity=2, | |
outputs=1, | |
params=color_params | |
), | |
} | |
brain_config = parser.parse_args() | |
proto_bot = robot_to_yaml(body_spec=body_config, | |
nn_spec=brain_config, | |
bot_pb=self.robot, | |
bot_id="{}".format(details_file)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment