Skip to Content
Learning Robotics using Python - Second Edition
book

Learning Robotics using Python - Second Edition

by Lentin Joseph
June 2018
Beginner to intermediate
280 pages
6h 58m
English
Packt Publishing
Content preview from Learning Robotics using Python - Second Edition

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Robotics using Python

Learning Robotics using Python

Lentin Joseph
Python Robotics Projects

Python Robotics Projects

Prof. Diwakar Vaish

Publisher Resources

ISBN: 9781788623315Supplemental Content