We are making robots with RaspberryPi as the main processor.
(RaspberryPi3B + or RaspberryPiZeroW)

The programming language is Python3.

We want to install the following sensors and actuators in the robot.

Output system
  • 360 degree servo motor (FS90R)
  • 180 degree servo motor (SG90)
  • Speaker
  • LED
Input system
  • Controller (gamepad)
  • Camera (PiCamera)
  • Human sensor
  • Acceleration/gyro sensor
  • Contact switch (micro switch)
  • Color sensor
Problem i am experiencing

The method of operating the above sensors and actuators alone is
If i search the internet, you can find some implementation examples.
Finally, run these device control scripts in parallel,
I would like to create control software in which sensors and actuators work together.

To make such control software,
What is the typical software structure?

At the moment I am thinking of

  • Python MultiProcessing
  • Python Threading
  • Socket communication
  • Interprocess communication
Implementation by combining libraries such as


And sometimes

  • Node.red
  • ROS
I would like to consider the use of


If i have a good way, please let me know.

  • Answer # 1

    ROS is recommended

    Because there are so many sensors,ROSis recommended when you want to process each of them smoothly in parallel.
    ROS is expensive to learn and requires time to understand and operate, but there are scenes that can be used outside the robot field, so there is no loss in studying.

    Here are some links to reference sites.

    The story of setting up ROS on Raspberry Pi 3 Model B and starting the camera

    ROS understanding

    Move the robot with image information using ROS

  • Answer # 2

    Well, python, sockets, and interprocess communication are in the form of dancing with the palm of Linux running on a rasp pie
    Well, if the required specifications you are trying to realize are in time, that's fine.

    If you can't make it in time, it's about exploring other ways.
    Good luck