To familiarize yourself with the way robot body plans (morphologies) are represented in the RoboGen software suite, including:
- Gaining an understanding of the tree structure used for encoding robot morphologies.
- Learning to write your own robot description file.
As you saw in the previous exercises, you should click on the “Advanced” tab to be able to modify files and start custom evolutionary experiments or visualize your robots.
Tip: if the software is having some problem, try refreshing the page.
Important: Remember, all data is being saved to a virtual filesystem within your web browser. If you want to save anything for later use, be sure to download it to your home directory!
While in the previous exercises you evolved controllers for a wheeled robot (the e-puck like robot), and this functionality does exist in RoboGen, for the rest of the semester (including your projects) you will not be allowed to use wheels!! For your projects the available parts are CoreComponent, FixedBrick, ParametricJoint, PassiveHinge, ActiveHinge, LightSensor, and IrSensor (if you specify
addBodyPart=All in your evolution configuration file when evolving morphologies, these will be the parts that your robots will be composed of).
Previously you saw how to simulate a robot and how to define a scenario in order to evolve a controller for a pre-provided robot morphology. Now, it is time to understand how robots are defined in RoboGen.
From the Advanced tab, click “Start a simulation”, and enter
as the Robot description file, and
as the Configuration file. Then click OK.
You should see a robot being simulated. Remember, no evolution is occurring here!
Now, close this tab and open examples/simpleRobot.txt from the Advanced tab.
Here you will see the robot description file for the robot you just simulated.
For the details about how robots are represented you should read through http://robogen.org/docs/guidelines-for-writing-a-robot-text-file/
Make sure that you understand this information. Verify that you can answer the following questions:
- Which part of the file represents the robot’s body and which part represents the robot’s brain?
- For the body description, what does the indentation specify?
- What do the various numbers and strings on each line specify?
Close the text editor and now open examples/myRobot1.txt. This is a copy of simpleRobot.txt that has had the brain specification removed, which will make it easier to try creating robot morphologies.
Try adding/removing/modifying body components from this file and re-launching the simulator (now specifying examples/myRobot1.txt as the Robot description file) so that you can view your changes.
- What happens if you change ActiveHinge to PassiveHinge on line 2?
- What happens if you remove lines 6-9?
- Can you add a light-sensor attached to one end of the robot?
Note: If your file is not properly formatted, you will receive an error message when you try to simulate this robot.
If you ever want to revert back to the original file just delete the one you have modified and reload the web app.
Now, to make sure you understand how to write a robot description file, you should try to reproduce the robot shown below. You should pay careful attention to make sure all of the components are included in the proper position, and all joint orientations match.