Simulate a 6-DOF (degrees of freedom) pick and place unit with Blender and MQTT and control the unit from your web browser.
This project explores model-integrated control and orchestration mechanisms of internet-enabled production robots in a simulated pick and place unit. It lets you control a 6-DOF robotic arm, simulated in Blender GE, and monitor sensor and camera signals over MQTT.
![]() |
![]() Sensor Timeline ![]() ![]() Cameras for Conveyor and QR-Codes |
---|---|
Pick and Place Unit in Blender GE | Sensors and Cameras |
Install Dependencies
You need these dependencies to get started:
Setup Blender
Blender requires a few extra libraries in order to be able to publish and subscribe to MQTT queues and render images. To add the necessary scripts and libraries to your installation, go to File > User Preferences > File > Scripts.
blender-scripts/
, located in the project root.blender-scripts-win64/
. Then copy the directory blender-scripts/modules/robot
to blender-scripts-win64/modules/robot
. This is the main robot controller.Save the selection by hitting Save User Settings.
Finally, open the simulation file Pick-and-Place-Simulation.blend
with Blender. Make sure to select Blender Game in the engine selection on the top — it might be set to Blender Render.
Start Docker Services
In the project root directory, run:
docker-compose up
This will install and run all additional services to control and monitor the robot. After all services started, the dashboard is available at http://localhost:8080. In detail, the services are:
Port: 8080, Service Name: server
): Collects sensor data and executes the control procedure via MQTT.Port 1883, Service Name: mqtt
): MQTT message queuePort 8086, Service Name: influx
): Time series database for recording sensor measurementsPort 3000, Service Name: object-tracker
): Image recognition service that identifies and locates objects in imagesIf you only want to start a selection of services, compared to all services, run:
docker-compose up service1 service2 ...
This is useful, when developing the server - where the server is updated frequently with code changes. Then it is useful to start all services, except for the service server
:
docker-compose up object-tracker mqtt influx
Hit p
in Blender to start a simulation (exit with Esc
). Now, you can control the robot either manually, by using the arrow keys and WASD
, or by starting a job in the web view. For this, go to the web view, select a job and hit Play in the controls section. This will run the job as described below. Clicking Record in the dashboard toggles the recording of sensor measurements in InfluxDB. For visualizing these time series, you can use Chronograf or Grafana.
If you select the predefined job “Pick, Heat and Sort”, the unit will loop through this sequence of commands:
A more thorough documentation is available in German on GitHub.
This research project is part of the CDL-MINT laboratory for model-integrated smart production.