Python script of the robot model

The following is the Python script of the robot model that we will design:

  1. Before starting the Python script in Blender, we must import the bpy module. The bpy module contains all the functionalities of Blender and it can only be accessed from inside the Blender application:
import bpy 
  1. The following function will draw the base plate of the robot. This function will draw a cylinder with a radius of 5 cm and cut a portion from the opposite sides so that motors can be connected using the Boolean modifier inside Blender:
#This function will draw base plate 
def Draw_Base_Plate(): 
  1. The following two commands will create two cubes with a radius of 0.05 meters on either side of the base plate. The purpose of ...

Get Learning Robotics using Python - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.