controlsstm32rosrobotics

What is the more common way to build up a robot control structure?


I’m a college student and I’m trying to build an underwater robot with my team.

We plan to use stm32 and RPi. We will put our controller on stm32 and high-level algorithm (like path planning, object detection…) on Rpi. The reason we design it this way is that the controller needs to be calculated fast and high-level algorithms need more overhead.

But later I found out there is tons of package on ROS that support IMU and other attitude sensors. Therefore, I assume many people might build their controller on a board that can run ROS such as RPi.

As far as I know, RPi is slower than stm32 and has less port to connect to sensor and motor which makes me think that Rpi is not a desired place to run a controller.

So I’m wondering if I design it all wrong?


Solution

  • Robot application could vary so much, the suitable structure shall be very much according to use case, so it is difficult to have a standard answer, I just share my thoughts for your reference.

    In general, I think Linux SBC(e.g. RPi) + MCU Controller(e.g. stm32/esp32) is a good solution for many use cases. I personally use RPi + ESP32 for a few robot designs, the reason is,

    1. Linux is not a good realtime OS, MCU is good at handling time critical tasks, like motor control, IMU filtering;
    2. Some protection mechnism need to be reliable even when central "brain" hang or whole system running into low voltage;
    3. MCU is cheaper, smaller and flexible to distribute to any parts inside robot, it also helps our modularized design thinking;
    4. Many new MCU is actually powerful enough to handle sophisticated tasks and could offload a lot from the central CPU;