Giter Site home page Giter Site logo

dexterind / gopigo Goto Github PK

View Code? Open in Web Editor NEW
339.0 58.0 190.0 9.91 MB

The GoPiGo Robot for Raspberry Pi

C++ 15.33% Processing 0.05% Shell 2.03% JavaScript 2.11% Python 17.87% HTML 51.05% CSS 0.55% Java 4.40% C# 1.11% C 5.33% CMake 0.18%
raspberry-pi gopigo stem robotics robotics-programming robotic-car

gopigo's Introduction

GoPiGo

The GoPiGo is a delightful and complete robot for the Raspberry Pi that turns your Pi into a fully operating robot. GoPiGo is a mobile robotic platform for the Raspberry Pi developed by Dexter Industries.

 GoPiGo

The original firmware and API was Developed by Karan Nayan, Oct. 2013

This repository contains source code, firmware and design materials for the GoPiGo.

 GoPiGo

Quick Install

For installing the python package(s) of the GoPiGo, use the following command:

curl -kL dexterindustries.com/update_gopigo | bash

Or if you're still accustomed to the old ways, you can clone the repo, head over to the Setup folder and run the install script like this:

bash update_gopigo3.sh

These 2 methods of installing the robot are identical - the difference is that the former takes the script from an online source and in the latter case, you run it from the repository itself.

See Also

License

GoPiGo for the Raspberry Pi: an open source robotics platform for the Raspberry Pi. Copyright (C) 2017 Dexter Industries

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.txt.

gopigo's People

Contributors

ahmadchatha avatar alanch-ms avatar chepazzo avatar christianrauch avatar cleoqc avatar crzidea avatar egoebelbecker avatar exadon avatar excaliburzero avatar foohyfooh avatar jawardell avatar johnisanerd avatar karan259 avatar marcellobarile avatar mgold avatar partouf avatar robertlucian avatar rpedersen avatar shoban94 avatar sitfit avatar sukima avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gopigo's Issues

Motor Timeouts

Need to add motor timeouts to firmware and software. If you stop a program or if the Pi crashes we should stop pretty quickly.

"Permission denied" when running compile.sh and Test.sh

When running the just-installed compile.sh and Test.sh for the first time, I got "permission denied" errors even when running as root.

To fix this, I did:
chmod 777 compile.sh
chmod 777 Test.sh
to set the ExECUTE permission.

Firmware version mismatch

Today I got out my GoPiGo and noticed that v13 of the firmware was available on GitHub. I did a manual update to v13.

I then ran the Dexter Industries Update script that comes with the DI version of Raspian and that reverted the firmware back to v12

I'm not sure if there is a difference between these two versions but it may make sense to have the auto updater grab v13 instead of v12.

vnc + gopigo = crash

If I ssh to my gopigo robot and run cd Desktop/GoPiGo/Software/Python/Examples/Basic\ Robot\ Control/; sudo python basic_robot.py, everything works right. If I use vnc to connect, and run the same thing in a terminal, the raspberry pi crashes as soon as I make the robot do anything (e.g. w to make it go forward).

I'm probably doing something wrong, but I don't know where to start debugging.

Buffertools issue when doing npm install of the package

Encountering this issue when I try to install this package.

make: Leaving directory '/home/pi/Documents/repos/robot/node_modules/buffertools/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/pi/.nvm/v0.11.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:784:12)
gyp ERR! System Linux 4.1.7+
gyp ERR! command "node" "/home/pi/.nvm/v0.11.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/Documents/repos/robot/node_modules/buffertools
gyp ERR! node -v v0.11.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
[email protected] /home/pi/Documents/repos/robot
└── (empty)

npm ERR! Linux 4.1.7+
npm ERR! argv "node" "/home/pi/.nvm/v0.11.1/bin/npm" "install" "node-gopigo"
npm ERR! node v0.11.1
npm ERR! npm  v3.8.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the buffertools package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs buffertools
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls buffertools
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/Documents/repos/robot/npm-debug.log

pip upgrade stops gopigo working as expected

I have my GoPiGo setup, I thought it might be an idea to update my pip install of gopigo, so I did pip install gopigo ---upgrade, this barfed, so I removed and reinstalled gopigo with pip. I tried using gopigo in the console after both and each time I got:

>>> gopigo.fwd()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'fwd'
>>> print(gopigo.__file__)
/usr/local/lib/python2.7/dist-packages/gopigo/__init__.pyc

Previously the file showed as:

/usr/local/lib/python2.7/dist-packages/GoPiGo-0.0.0-py2.7.egg/gopigo.pyc

I would expect this to work, and after reinstalling by running GoPiGo/Software/Python/setup.py install and gopigo has reverted to the old version it does work.

Is this expected behaviour?

Browser_Streaming_Robot web server in Examples folder requires installing sockjs.tornado and tornado

I was attempting to run the robot_web_server.py script, but I ran into dependency issues. I wanted to start the web server to stream video from the GoPiGo bot but when I executed
/home/pi/Desktop/GoPiGo/Software/Python/Examples/Browser_Streaming_Robot/robot_web_server.py
as root, there were unfulfilled dependencies. I had to run sudo pip install tornado along with sudo apt-get install sockjs.tornado. This satisfies the dependency, but this should already be set up since this is in the Examples folder. Following along with the README instructions will cause the user to run into this error

Traceback (most recent call last):
  File "./robot_web_server.py", line 86, in <module>
    import sockjs.tornado
ImportError: No module named sockjs.tornado

upon executing the python script.

IOException: Error reading from I2CDevice on I2CBus '1' ('/dev/i2c-1') at address 0x8 to address 0x1. Got '-1'.

After getting my new GoPiGo2 Robot working with the Python example, I tried to set up the Java library, but when running Test.sh, I get the immediate error:

IOException: Error reading from I2CDevice on I2CBus '1' ('/dev/i2c-1') at address 0x8 to address 0x1. Got '-1'.

The java program doesn't exit, and movement commands seem to still work (move forward / move backward / turn right / turn left / etc.) but other commands (e.g. led commands, "board revision," etc.) fail--some of them causing the java program to exit.

I'm wondering...is it possible that whomever wrote this had other accessories attached which might avoid the IOExceptions I am seeing?

C# Library exceptions

We are experimenting for a hackaton with the GoPiGo and Raspi 3.
We installed the latest and greatest Windows 10 IOT on the Pi and try to run this simple background task we made:
C# _goPiGo.MotorController().Stop(); try{ System.Diagnostics.Debug.WriteLine(Sensor.MeasureInCentimeters()); }catch(Exception e) { System.Diagnostics.Debug.WriteLine("[ERR]:" + e.ToString() + "\n"); }

The Exception is the following:
Unexpected number of bytes was transferred. Expected: '. Actual: '.
at Windows.Devices.I2c.I2cDevice.Write(Byte[] buffer)
at GoPiGo.Sensors.UltrasonicRangerSensor.MeasureInCentimeters()
at BackDriveme.StartupTask.RandomMovement()

Also when we set the motor direction, it sometimes shoots a FileNotFoundException.

Also how "Up-To-Date" and bug-free is the library? Is it compatible with the latest Windows IOT, Raspi3 and the GoPiGo 2 board?

us_servo fails

For some reason US servo is not returning data. The ultrasonic sensor is making erratic moves.

Flask Server

When attempting to run flask server for Alexabot get following messages;
Have no idea on how to resolve

python alexabot-flask-app.py

  • Running on http://0.0.0.0:5000/
    Traceback (most recent call last):
    File "alexabot-flask-app.py", line 73, in
    app.run(debug=True, host='0.0.0.0')
    File "/usr/lib/python2.7/dist-packages/flask/app.py", line 772, in run
    run_simple(host, port, self, **options)
    File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 706, in run_simple
    test_socket.bind((hostname, port))
    File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
    socket.error: [Errno 98] Address already in use

Streaming_Video_Example can't work

https://github.com/DexterInd/GoPiGo/tree/master/Software/Python/Examples/Streaming_Video_Example

$ cat stream_start.sh
#!/bin/bash

if [ ! -d /tmp/stream ]
then
    mkdir /tmp/stream/
fi

if pgrep raspistill > /dev/null
then
    echo "raspistill already running"
else
    raspistill -w 640 -h 480 -q 5 -o /tmp/stream/pic.jpg -tl 100 -t 9999999 -th 0:0:0 -n > /dev/null 2>&1&
    echo "raspistill started"
fi

if pgrep mjpg_streamer > /dev/null
then
    echo "mjpg_streamer already running"
  1 #!/bin/bash↲
else
    LD_LIBRARY_PATH=/opt/mjpg-streamer/ /opt/mjpg-streamer/mjpg_streamer -i "input_file.so -f /tmp/stream -n pic.jpg" -o "output_http.so -p 9000 -w /opt/mjpg-streamer/www" > /dev/null 2>&1&
    echo "mjpg_streamer started"

[pi@gopigo:~]$ lsal /opt/mjpg-streamer/mjpg_streamer
ls: cannot access /opt/mjpg-streamer/mjpg_streamer: No such file or directory

[pi@gopigo:~]$ lsal /opt/mjpg-streamer/
ls: cannot access /opt/mjpg-streamer/: No such file or directory

It seems that there's no mjpg-streamer installed in the gopigo.

$ sudo apt install mjpg_streamer
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mjpg_streamer

Board.java won't compile...Un

When first compiling the java classes, I got an error related to uncaught Exceptions in Board.java. I don't quite understand how this worked for anyone as it is.

To fix this, I added try/catch code around line 91 to:

I2CBus bus = null;
try {
bus = I2CFactory.getInstance(busId);
} catch (Exception e) {
System.out.println(e);
}
device = bus.getDevice(ADDRESS);

[Question] reverse proxy

Hello,

I just setup my GoPiGo to run the browser streaming app. I want to access it when away from home through another machine running nginx as a reverse proxy (ssl enabled + authentication).

Here's my nginx config :

`
location / {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}

proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header X-Powered-By;
proxy_intercept_errors on;
proxy_buffering on;

proxy_cache_key "$scheme://$host$request_uri";
proxy_pass http://localIP:98;
}
`

I tested it and I can see the web page of the app but the camera does not show (it's running on port 8080 and not 98)

Any idea how to setup this?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.