byapparov / robot Goto Github PK
View Code? Open in Web Editor NEW2 Motor Robot with Raspberry Pi - Named Olie
License: GNU General Public License v3.0
2 Motor Robot with Raspberry Pi - Named Olie
License: GNU General Public License v3.0
Here I would like to have a simple way to measure the forward distance:
# this should return distance to an obstacle in meters
distance = robot.distance()
Desired input would be something like this:
# both parameters will be in meters
robot.move(
x = 1.5,
y = 2
)
Sometimes gyro data is not read correctly and an error is coming from mpu6050 library:
Traceback (most recent call last):
File "robot.py", line 53, in <module>
turn(360.0)
File "robot.py", line 26, in turn
angles = gyroscope.update(sample_time)
File "/home/pi/robot/src/gyro.py", line 40, in update
gyro_data = self.sensor.get_gyro_data()
File "/home/pi/.local/lib/python2.7/site-packages/mpu6050/mpu6050.py", line 213, in get_gyro_data
z = self.read_i2c_word(self.GYRO_ZOUT0)
File "/home/pi/.local/lib/python2.7/site-packages/mpu6050/mpu6050.py", line 71, in read_i2c_word
high = self.bus.read_byte_data(self.address, register)
IOError: [Errno 121] Remote I/O error
To track the angle MPU6050 with three axis gyroscope is used in this project.
Z axis provides Yaw velocity in degrees which will allow implementation of precise turning to a given number of degrees with velocity integrator and a PID controller.
Example of code that is required:
import robot # we also might rely on gpiozero, it is just an example.
import yaw_control # this is the package that can contain PID for yaw
r = robot()
# Turn robot left 60 degrees:
r.turn(60)
# Turn robot right 90 degrees
r.turn(90)
Known challenges that need special attention:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.