3D print and assembly guide
Once you have a robot that behaves the way you would like in the simulator, it is time to build it. For this you will need some electronic components, a set of standard 3D printed parts, and a set of custom parametrized parts that you will need to 3D print. More details on how to get a hold of these parts are available below. After your evolution runs are complete, you can determine the components required to build your robot through the text file that describes the tree representation of robot body parts.
Once you have all of your parts, it is time to assemble! We have prepared a series of video tutorials demonstrating how to assemble RoboGen robots.
Pay close attention to the orientation of the parts relative to each other when building the robot. For the active hinge, there are two possible orientations of the part that will give the same degree of freedom but opposite behaviors! To be sure, check the my_robot text file: the orientation of the part is described as a number following the part name. The format of this file follows the rules set for describing a robot body mentioned on page Guidelines for writing a robot text file.
For reference, here is the numbering of the faces of the core component:
The parts you will need to assemble your robot are listed in the table below, along with where to get them and how many to get.
In addition to these parts, you will need the following tools :
- Wire cutter and wire stripper
- Soldering iron and solder
- (optional) Heat gun
- (optional) Lighter
3D printed parts
If you have access to a desktop fused deposition modelling (FDM) technology printer, you can download the .stl robot part files here and print them for yourself. In this case, the geometries that can be printed without use of support material are different. For this reason, some of the .stl files are specific to FDM as indicated in the file name. For example, the core component as it appears in the simulator is not printable with FDM. In order to make it printable, it should fulfill the requirements of the 45 degree rule. That is why the Core_FDM part does not look exactly like the cores in the simulator.
If you have any questions, please don’t hesitate to ask them on our google group.
The parametrized components your robot needs are a result of the evolution, and need to be generated specifically for your robot. For this, you need to adapt template CAD files for the two halves of the part according to the parameters given by the algorithm, then compile these to STL format for 3D printing.
You can find the files ParametricPartATemplate.scad ParametricPartBTemplate.scad here.
Adapting the Files for Your Robot
The parameters of the parametric parts can be found in the .txt file of the robot body, and should be entered into the code of the template files.
The parameters are as follows (copied from the page Guidelines for Writing a Robot Text File)
For the parametrized joint the parameters are, in correct order:
- Length: (in meters, between 0.02 and 0.1)
- Rotation-Angle: rotation angle in transverse/horizontal plane, relative to parent, in degrees between -90 and 90
- Inclination-Angle: currently rotating out of the transverse plane is disallowed, so this value must be 0 (parameter not used)
Parameters 1 and 3 should be put into the file partA, and parameter 2 in partB. Modify the parameters accordingly in the following lines:
partA(0.03,0); //the first parameter is the length of the joint in meters, the second parameter is the angle beta (only for non-planar robots)
partB(20); //the parameter is the angle of the parametric part in degrees
Generating the STL Files
There are 2 options for this step:
1. Install openscad and use the software to compile the parts.
Once the file is loaded in the UI, click Preview (F5), Render (F6) then Export as STL.
2. Compile them online at: http://openscad.net/
Choose edit->inputSyntax: tick OpenSCAD
Hit F4 to generate file, then click Design->Export as STL/DXF
3D Printing the Parts
The 3D printing procedure is described here. If anything is unclear, please let us know here.
Arduino Programming Guide
Desktop Version: Generate NeuralNetwork.h
To generate the files needed for the Arduino you must run the File Viewer with the
./robogen-file-viewer evolved_robot.json conf.txt --output evolved_robot
The resulting file
NeuralNetwork.h will be inside
Web Version: Generate NeuralNetwork.h
- Start a new simulation.
- Enter the working directory to be the directory containing your evolution results.
- Enter the robot description file. (A copy of robot description file will be automatically available inside this directory)
- Enter the configuration file. (A copy of configuration file will be automatically available inside this directory)
- Tick on the Generate Log files text box and specify output directory
- Click on “Reload” on the advanced tab and navigate to the folder to find NeuralNetwork.h file
Download the Arduino IDE and download and extract the Arduino package from the Robogen website. For the Arduino IDE, you will need a java installation. This should be taken care of on Windows and Mac, but on Ubuntu, you should
sudo apt-get install default-jre.
- Make sure the Arduino IDE is closed.
- From the results folder, copy
- You can now open
RobogenArduino.inofolder in the Arduino IDE.
- Select Tools > Board > Arduino Leonardo to specify the Robogen’ Compatible arduino board.
- Click to verify the Arduino program.
Connect and Upload
To correctly connect our sensors and actuators, consult “NeuralNetwork.h”. Then, unplug the battery from the BEC and the actuators from the Arduino before connecting the Arduino to the PC. IMPORTANT: Make sure that the BEC is not connected to the battery when the robot is not used, as else the BEC will consume battery power.
After connecting the Arduino to the PC, you should be able to use the upload button of the Arduino IDE to upload the compiled program to the robot. Once the program has been uploaded, you can disconnect the PC from the Arduino and reconnect actuators and battery. Your robot should now behave according to the neural network.
The IMUs of all boards are slightly different and need calibration and for this, there is a calibration procedure that relies on collecting values for few seconds with the board lying flat without any movement. Then the values collected can be set into the code and need not be set again. To complete the calibration, uncomment the line below in the main Arduino file(RobogenArduino.ino):
// uncomment to perform imu calibration
Compile and execute your code on the microcontroller and obtain the calibration values in the console. Note down the values and update the following lines in the same file:
#define ACCEL_OFFSET_X (1353)
#define ACCEL_OFFSET_Y (895)
#define ACCEL_OFFSET_Z (1596)
#define GYRO_OFFSET_X (138)
#define GYRO_OFFSET_Y (-110)
#define GYRO_OFFSET_Z (133)