To my surprise, I recently discovered that many robotics companies barely use a simulator to simulate their robots. During my long experience at Pal Robotics developing humanoid robots, I understood how a good simulator can make a difference, speeding up the development and maintenance processes of robot building. In this post I would like to expose the reasons why you must use a simulator for your robot development.
Test ideas prior to building
Simulations are the best place to start when developing a new robot. By using a simulator to develop your robot, you can quickly identify if your idea is feasible or not with almost no expense. Additionally, you can easily test and discover which are the physical constraints that your robot must face in order to accomplish its goal.
Simulators allow the easy and quick test of many different ideas for the same robotic problem, test them and then decide which one to build based on actual data.
Once your robot has been defined and tested in the simulator, you can start its physical construction. The good thing with simulators is that they allow to keep doing test even if your robot is not built yet.
While your mechanical or electrical departments are building the actual robot, your software department can start developing software and testing it on the simulated robot. Current simulators are closer to reality, hence you can develop your software for the simulated robot, make it work on it, and then transfer to the real robot once it has been constructed. Chances are that your software will work in the real with minor mods.
You do not have to wait for your robot to be built before developing its software.
Test in different environments
Your robot software can have many bugs that only appear once you take it outside your lab. By using a simulator you can test your robot in many other different environments than the one of your lab.
Debug in simulation
Bugs found in your robot software should be debugged first in the simulator. Actually, you should never allow a software engineer to test his software on the real robot if the software does not work on the simulator. It won’t work!
By debugging in simulator you will save a lot of time, since testing on the real robot is very time consuming. Furthermore, you can prevent that obvious mistakes and bugs are corrected using the real robot. Correcting basic errors on the real robot can end in the best case to a lot of wasted time, and in the worst case to breaking the robot.
Develop modifications and improvements
With your simulation in place, you can think about modifications for your robot and test them. What is the next feature that your clients are requesting? You can easily test if they are possible, in which extent and what it would require you to modify and add. Just use the simulation to see if they are possible or not.
Functionality testing suite
Once your robot is built and the software working properly in it you will have to maintain it. Correct bugs, add new features, adapt to changes in the frameworks you use… all those require that you change the software that already runs on the robot.
Chances are that by doing some of those changes, you will crash some of the functionality that already works in the robot. To prevent at maximum this effect, you must create a suite of functionality tests.
Functionality tests are tests that execute on a simulation of your robot and check whether the robot is still able to do in the simulation the functionality that you expect from it. The tests are performed at night. The suite must download the latests code from your repository, compile it, and executes it on the simulated robot.
For each functionality, the robot must be placed on a specific situation in the simulation that allows you to test that functionality. A reward function must check whether the robot was able to accomplish the functionality or not. In case not, the suit should send an email to the person in charge of that functionality, in order to make him aware of the functionality crash.
Make your robot popular
Either your company targets main public or specialized one, you want your robot to be used. By creating a simulation of your robot and freely providing it, you will give access to your robot to many people to experiment with it and find uses of your robot without being tied to expensive purchases. You will also allow to people publish stuff about your robot on the net, making you in return more popular and allowing you to reach more public.
Simulators are a powerful tool for robotics companies that can speed up the development process and prevent costly errors.
Based on the previous points, the whole process for a robot development that uses a simulator should be:
- Do some drawings and design of the robot you want to build based on the task to solve.
- Implement those designs in the simulator and perform some tests.
- Modify the robot based on the simulator results.
- Start building the real robot. At the same time use the simulator to develop its software.
- Test your software on the real robot. If errors found, use the simulator to correct them and retest. Only use real robot once errors are corrected.
- If customers require mods or improvements, use the simulator to test if they are (theoretically) possible or not.
- Once your robot is built including software, build a functionality test suite that every night executes functionality tests over the simulation, to prevent that changes in the software shut down functions of the robot.
- Finally, provide for free a model of your robot (including controllers) and help users to use it.