Here it depends mostly on your skills and preferences.Īnyway, you’ve just seen that you’ll certainly have to use C++ for anything low level that requires performance: micro-controllers and the driver layer in your robotics application. A typical micro-controller has only one core and very limited amount of flash memory, but it’s very fast and reliable if used correctly. Usually the language to program a micro-controller is close to C/C++. You’ll probably need to use one or multiple micro-controllers. Your embedded computer will most likely not control the motors directly. But when it comes to motion planning, image processing, and networking, good luck with that.Ĭ++ is a great language to maximize the performance/productivity ratio in robotics.Īlso, don’t forget the micro-controller part. Well, of course you can always go deeper and try to write code in assembly. → OK, C++ is performing well, but it’s not the lowest level in programming. So, if you’re running a control loop at 100+ Hz, and if on top of that you need real-time constraints, then go for C++. If you consider that Python can be 10-100 (it really depends on the software and hardware) times slower than C++, you might understand that if you want to go fast, you need C++. When C++ is mandatoryĬ++ is one of the best programming language when it comes to performance. But still no comparison between C++ and Python yet! The point was to make you understand some of the most important challenges you can face in robotics, so the following will be quite straightforward. So, I’ve talked much about the need for speed, and for hardware optimization. If the maximum allowed amount of time to execute a given command is 2 milliseconds, then you need to make sure that each command (sent at 100+ Hz) will take less than 2 milliseconds. If your goal is to produce 10 000 units, then each dollar that you save on one robot will make you save 10 000$ for your complete batch.Īnother important point is that if you don’t respect some real-time constraints, you may damage your hardware or compromise safety of people. But guess what, this 50$ computer may not have GPU rendering and huge amount of cores/RAM. ![]() Maybe a 50$ one is just enough for what you need. If you’re serious about the development, and if you’re willing to go to a production phase, you’ll need to optimize the hardware. You can’t just take a 3000$ laptop, develop your application, and forget about it. There is a notion of cost when building a software for a robot. And here comes the challenge.įor smooth trajectories, you might have to run this loop at more than 100Hz, which means that the code is executed more than 100 times every second, in addition to all the other parts of your software ! The hardware part of robotics ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |