![]() ![]() 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 Update internal controller to get a new commandĪnd, what you do now is simply repeating this sequence over and over again.The driver will contain a thread which will communicate with your hardware devices, usually within a control loop. ![]() Usually, the low level layer of your application will involve a driver to read/write data from/on the motor controllers. This computer will communicate with the outside, run the robot application, and communicate with the micro-controller to move the robot. You have some motors on the wheels to control with a micro-controller, and then you have an embedded computer that needs to fit in the robot structure. Let’s take a very simplified architecture for a robot: let’s say you build a mobile robot. What we care about is the real-time performance on a hardware product. When we speak about performance in robotics, we don’t care about being able to handle thousands of connections at the same time with load balancing. In fact it’s like comparing oranges and bananas. And the performance between a robot and a web server for a SaaS application is totally different. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |