All Projects → lukas → Robot

lukas / Robot

Simple library for controlling a raspberry pi based robot

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Robot

Gopigo3
The GoPiGo3 is a Raspberry Pi Robot!
Stars: ✭ 74 (-52.56%)
Mutual labels:  robotics, robot, raspberry-pi
Mabel
MABEL is a feature-packed, open-source, legged balancing robot based off of the Boston Dynamics Handle robot.
Stars: ✭ 72 (-53.85%)
Mutual labels:  robotics, robot, raspberry-pi
Handeye calib camodocal
Easy to use and accurate hand eye calibration which has been working reliably for years (2016-present) with kinect, kinectv2, rgbd cameras, optical trackers, and several robots including the ur5 and kuka iiwa.
Stars: ✭ 364 (+133.33%)
Mutual labels:  robotics, robot, camera
Ev3dev Lang Java
A project to learn Java and create software for Mindstorms Robots using hardware supported by EV3Dev & the LeJOS way.
Stars: ✭ 79 (-49.36%)
Mutual labels:  robotics, robot, raspberry-pi
Dolly
🤖🐑 It's a sheep, it's a dolly, it's a following robot. Dolly was born to be cloned.
Stars: ✭ 113 (-27.56%)
Mutual labels:  robotics, robot
Awesome Robotic Tooling
Tooling for professional robotic development in C++ and Python with a touch of ROS, autonomous driving and aerospace.
Stars: ✭ 1,876 (+1102.56%)
Mutual labels:  robotics, robot
Invisible Highway
Invisible Highway is an experiment in controlling physical things in the real world by drawing in AR. Simply make a pathway along the floor on your phone and the robot car will follow that path on the actual floor in your room. A custom highway with scenery is generated along the path to make the robots a little more scenic on your phone screen.
Stars: ✭ 118 (-24.36%)
Mutual labels:  robotics, robot
Poppy Ergo Jr
🤖 Poppy Ergo Jr is an open-source robotic arm based on modular 3D printed conception and low-cost XL-320 motors.
Stars: ✭ 133 (-14.74%)
Mutual labels:  robotics, raspberry-pi
Grl
Robotics tools in C++11. Implements soft real time arm drivers for Kuka LBR iiwa plus V-REP, ROS, Constrained Optimization based planning, Hand Eye Calibration and Inverse Kinematics integration.
Stars: ✭ 105 (-32.69%)
Mutual labels:  robotics, robot
Balena Cam
Network Camera with Raspberry Pi and WebRTC. Tutorial:
Stars: ✭ 120 (-23.08%)
Mutual labels:  raspberry-pi, camera
Raspberryturk
The Raspberry Turk is a robot that can play chess—it's entirely open source, based on Raspberry Pi, and inspired by the 18th century chess playing machine, the Mechanical Turk.
Stars: ✭ 140 (-10.26%)
Mutual labels:  robotics, raspberry-pi
Iros20 6d Pose Tracking
[IROS 2020] se(3)-TrackNet: Data-driven 6D Pose Tracking by Calibrating Image Residuals in Synthetic Domains
Stars: ✭ 113 (-27.56%)
Mutual labels:  robotics, robot
Robotics setup
Setup Ubuntu 18.04, 16.04 and 14.04 with machine learning and robotics software plus user configuration. Includes ceres tensorflow ros caffe vrep eigen cudnn and cuda plus many more.
Stars: ✭ 110 (-29.49%)
Mutual labels:  robotics, robot
Cam2web
Streaming camera to web as MJPEG stream or individual JPEG snapshots. Providing embedded web UI for watching camera directly from a web browser.
Stars: ✭ 117 (-25%)
Mutual labels:  raspberry-pi, camera
List of robot electronics
A curated list of awesome open source electronic resources for robotics
Stars: ✭ 106 (-32.05%)
Mutual labels:  robotics, robot
Yolo Powered robot vision
Stars: ✭ 133 (-14.74%)
Mutual labels:  robot, raspberry-pi
Rosnodejs
Client library for writing ROS nodes in JavaScript with nodejs
Stars: ✭ 145 (-7.05%)
Mutual labels:  robotics, robot
Articulations Robot Demo
Stars: ✭ 145 (-7.05%)
Mutual labels:  robotics, robot
Openbot
OpenBot leverages smartphones as brains for low-cost robots. We have designed a small electric vehicle that costs about $50 and serves as a robot body. Our software stack for Android smartphones supports advanced robotics workloads such as person following and real-time autonomous navigation.
Stars: ✭ 2,025 (+1198.08%)
Mutual labels:  robotics, robot
Sltk
An OpenCV-based structured light processing toolkit.
Stars: ✭ 151 (-3.21%)
Mutual labels:  raspberry-pi, camera

robot

This will run a simple robot with a webserver on a raspberry PI with the Adafruit Motor Hat. I wrote this up for myself for fun and to help me remember how I set things up.

High level overview can be found in this article: https://www.oreilly.com/learning/how-to-build-a-robot-that-sees-with-100-and-tensorflow

Hardware

To get started, you should be able to make the robot work without the arm, sonar and servo hat.

Programs

  • robot.py program will run commands from the commandline
  • sonar.py tests sonar wired into GPIO ports
  • wheels.py tests simple DC motor wheels
  • arm.py tests a servo controlled robot arm
  • autonomous.py implements a simple driving algorithm using the wheels and sonal
  • inception_server.py runs an image classifying microservice

Example Robots

Here are two robots I made that use this software

Robots

Wiring The Robot

Sonar

If you want to use the default sonar configuation, wire like this:

  • Left sonar trigger GPIO pin 23 echo 24
  • Center sonar trigger GPIO pin 17 echo 18
  • Right sonar trigger GPIO pin 22 echo 27

You can modify the pins by making a robot.conf file.

Wheels

You can easily change this but this is what wheels.py expects

  • M1 - Front Left
  • M2 - Back Left (optional - leave unwired for 2wd chassis)
  • M3 - Back Right (optional - leave unwired for 2wd chassis)
  • M4 - Front Right

Installation

basic setup

There are a ton of articles on how to do basic setup of a Raspberry PI - one good one is here https://www.howtoforge.com/tutorial/howto-install-raspbian-on-raspberry-pi/

You will need to turn on i2c and optionally the camera

raspi-config

Next you will need to download i2c tools and smbus

sudo apt-get install i2c-tools python-smbus python3-smbus

Test that your hat is attached and visible with

i2cdetect -y 1

Install this code

sudo apt-get install git
git clone https://github.com/lukas/robot.git
cd robot

Install dependencies

pip install -r requirements.txt

At this point you should be able to drive your robot locally, try:

./robot.py forward

server

To run a webserver in the background with a camera you need to setup gunicorn and nginx

nginx

Nginx is a lightway fast reverse proxy - we store the camera image in RAM and serve it up directly. This was the only way I was able to get any kind of decent fps from the raspberry pi camera. We also need to proxy to gunicorn so that the user can control the robot from a webpage.

copy the configuration file from nginx/nginx.conf to /etc/nginx/nginx.conf

sudo apt-get install nginx
sudo cp nginx/nginx.conf /etc/nginx/nginx.conf

restart nginx

sudo nginx -s reload

gunicorn

install gunicorn

copy configuration file from services/web.service /etc/systemd/system/web.service

sudo cp services/web.service /etc/systemd/system/web.service

start gunicorn web app service

sudo systemctl daemon-reload
sudo systemctl enable web
sudo systemctl start web

Your webservice should be started now. You can try driving your robot with buttons or arrow keys

camera

In order to stream from the camera you can use RPi-cam. It's documented at http://elinux.org/RPi-Cam-Web-Interface but you can also just run the following

git clone https://github.com/silvanmelchior/RPi_Cam_Web_Interface.git
cd RPi_Cam_Web_Interface
chmod u+x *.sh
./install.sh

Now a stream of images from the camera should be constantly updating the file at /dev/shm/mjpeg. Nginx will serve up the image directly if you request localhost/cam.jpg.

tensorflow

There is a great project at https://github.com/samjabrahams/tensorflow-on-raspberry-pi that gives instructions on installing tensorflow on the Raspberry PI. Recently it's gotten much easier, just do

wget https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases/download/v0.11.0/tensorflow-0.11.0-cp27-none-linux_armv7l.whl
sudo pip install tensorflow-0.11.0-cp27-none-linux_armv7l.whl

Next start a tensorflow service that loads up an inception model and does object recognition the the inception model

sudo cp services/inception.service /etc/systemd/system/inception.service
sudo systemctl daemon-reload
sudo systemctl enable inception
sudo systemctl start inception
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].