Reader small image

You're reading from  Python Robotics Projects

Product typeBook
Published inMay 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788832922
Edition1st Edition
Languages
Concepts
Right arrow
Author (1)
Prof. Diwakar Vaish
Prof. Diwakar Vaish
author image
Prof. Diwakar Vaish

Prof. Diwakar Vaish is a robotics scientist and the inventor of Manav (India's first indigenous humanoid robot), the world's first mind-controlled wheelchair, brain cloning, and the world's cheapest ventilator. He has also been a guest lecturer at over 13 IITs and various other institutions. He is the founder of A-SET Robotics, a leading robotics research company based in New Delhi.
Read more about Prof. Diwakar Vaish

Right arrow

Making the robot safe


In the previous part of the chapter, with our multiple attempts, we have been able to find the maximum positions for each of the servos. Now it's time to use these values. In this chapter, we will be programming the servos for what its absolute maximums are. In this program, we will make sure that servos will never need to travel even a degree beyond the defined parameters on both the sides. If the user gives a value beyond it, then it will simply choose to ignore the user inputs instead of causing self damage.

So, let's see how to get it done. There are some parts of this program, where the numeric values have been bold. These are the values that you need to replace with the values which we have noted in the previous section of this chapter. For example, for servo 1, the values noted down are 23 and 170 as the maximum values for either side. Hence, the change in the code will be from if a[0] < 160 and a[0] > 30 to ifa[0] < 170 and a[0] > 23. Similarly, for...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Python Robotics Projects
Published in: May 2018Publisher: PacktISBN-13: 9781788832922

Author (1)

author image
Prof. Diwakar Vaish

Prof. Diwakar Vaish is a robotics scientist and the inventor of Manav (India's first indigenous humanoid robot), the world's first mind-controlled wheelchair, brain cloning, and the world's cheapest ventilator. He has also been a guest lecturer at over 13 IITs and various other institutions. He is the founder of A-SET Robotics, a leading robotics research company based in New Delhi.
Read more about Prof. Diwakar Vaish