GithubHelp home page GithubHelp logo

charmedlabs / pixy Goto Github PK

View Code? Open in Web Editor NEW
334.0 334.0 241.0 41.53 MB

pixy CMUcam5

License: Other

Shell 0.02% C++ 2.95% C 95.08% Makefile 0.01% Assembly 0.09% MATLAB 0.10% M 0.01% Mathematica 0.01% CMake 0.05% Python 0.02% Ada 0.56% QMake 0.01% HTML 0.70% Scala 0.39% Objective-C 0.01%

pixy's People

Contributors

adrianimboden avatar ekiwi avatar ernieift avatar johnleimon avatar mightysorensen avatar richlegrand avatar scottwrobinson 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  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

pixy's Issues

pixy_init doesn't return a value

Hi,
I'm trying to run pixy on raspberry pi and unfortunately it doesn't work out of the box for me, so I'm trying to debug it.
I see that pixy_init() in pixy.cpp doesn't actually return the return_value which is used in main() in hello_pixy.c:
pixy_init_status = pixy_init();

I assume you need to add
return return_value;
at the end of pixy_init.

I also see that PixyInterpreter::init() also doesn't return a value at the end after the thread creation.
Should have a
return 0;
since it is used by pixy_init:
return_value = interpreter.init();

Not sure how this code works as is. Am I missing something?

Thanks,
Shari

Linux not supporting firmware 1.4.3

Compiles fine under Ubuntu 14.04 and runs but no output from camera and giving " error: This Pixy's firmware version (0.1.43) is not compatible with this PixyMon version (1.0.2). "

New "bug definition file

Meant to say that the new checkin for the "bug definition file"(cadc3e6) now requires to build the firmware. I'm guessing the firmware shouldn't be dependent on QT?

debian packaging

This is just FYI. I have created debian packaging for PixyMon in https://github.com/ev3dev/pixy.

If anyone wants to install from a package on Debian/Ubuntu instead of compiling from source...

sudo apt-add-repository "deb http://archive.ev3dev.org/ubuntu xenial main"
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 2B210565
sudo apt-get update
sudo apt-get install pixymon

You will get a menu entry to launch the program and it automatically installs the required udev rules.

get_blocks via USB and python

I'm using an Odroid U3 and the pixy is connected via USB to it.

libpixyusb build correctly and the sudo ./hello_pixy works.

when building libpixyusb_swig, I got some warning, but at the end the build is complete, then I proceed to test the script ´´´python get_blocks.py´´´but it doesn't do anything... the output is this:

Pixy Python SWIG Example -- Get Blocks

and thats it...

What could it be wrong? my pixy is running 1.0.3

QFSFileEngine::open: No file name specified

Environment:
Ubuntu 16.04.2
Qt 5.8.0

Symptom:

Pixymon failed to grab images from Pixy, with the following ERROR message:
QFSFileEngine::open: No file name specified

Cheers
Pei

Which firmware has hd resolution ?

Hi,
I want to change pixy's firmware for taking picture in hd resolution.
Which version has the hd resolution ?
Or how i will take a hd picture from pixy ?

Thanks in advance
Ugur

http://www.cmucam.org is currently down

Hi!! I know that this might be off topic, but I couldn't find a better place...

Much of the Pixy documentation is hosted under that domain, which is now inaccessible. Is there a new place for this documentation? Is it going to be fixed soon?

Thank you very much!

Some information:

$ wget www.cmucam.org
--2015-12-16 11:33:45--  http://www.cmucam.org/
Resolving www.cmucam.org (www.cmucam.org)... 72.14.181.45, 2600:3c00::f03c:91ff:fedf:d189
Connecting to www.cmucam.org (www.cmucam.org)|72.14.181.45|:80... connected.
HTTP request sent, awaiting response... 502 Bad Gateway
2015-12-16 11:33:46 ERROR 502: Bad Gateway.

On the browsers (firefox and chrome), I only see an empty blank page.

Difficult to know if sensor is healthy when using I2C

I'm one of the lead developers of ArduPilot (www.ardupilot.org) which I think is the most widely used open source drone software and we use a modified version of the Pixy for "precision landing". http://ardupilot.org/copter/docs/precision-landing-with-irlock.html.

We only support the I2C interface at the moment, but one issue we have is that no I2C messages are available if there is no object visible. This makes it difficult for us to know if the sensor is healthy or not. For example, we can't tell the difference between whether the sensor is disconnected vs attached but no objects are visible.

I'll pass this on to Thomas Stone who is responsible for the IRLock sensor as well.

libpixyusb_swig not installing correctly

I built the libpixyusb swig wrapper using the build_libpixyusb_swig.sh script in the scripts folder. I then installed it using sudo setup.py install. I was having trouble writing my own script, and I found that get_blocks.py will run just fine within the pixy/build/libpixyusb_swig directory, but will not detect blocks from any other directory. This is causing problems, because the same behavior occurs in my other scripts. Does anyone know how to solve this issue?

Failed to retrieve Pixy firmware version. Pixy Error: Invalid command

image

I am getting this issue on Ubuntu 20.04.3 running in vmware.
I am not getting this issue when running on Ubuntu 20.04.3 installed directly on metal.

I thought it might be a permissions issue, but like I said it works when installed on an OS running directly on my laptop.
I am going to continue checking out what is going on, but I thought I would post here if anyone has any insight. Thank you!

Compile PixyCam without Keil

Hello

Is there a possibility to compile Pixy firmware without Keil compilator?

I tried using cmake and gcc. I have LD files from MCUXpresso IDE, but I have something realy wrong. While debugging, after CGU_SetPLL1 (17) in platform_config.c file, debugger call stack is like:
image

But before this function call stack is ok.

I think that it can be something wrong with stack and heap. Is there a valid LD file for PixyCam with proper stack and heap addresses?

Code Development

If I wanted to contribute, how might I go about learning some more about this implementation? What methods are currently implemented for computer vision? Where is that in the code? Where can I start to get a grip on things.

Thanks

Chet

GCC>4.5 - error: taking address of temporary array

To fix this error with GCC>4.5:

g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../libpixy -I. -I. -o clut.o clut.cpp
clut.cpp: In function ‘double** plotcluster(uint32_t_, int)’:
clut.cpp:82:98: error: taking address of temporary array
clut.cpp:87:103: error: taking address of temporary array
clut.cpp:98:55: error: taking address of temporary array
clut.cpp: In function ‘double iterateline(double_, double_, int, double_, double, double)’:
clut.cpp:192:81: error: taking address of temporary array

Please apply this patch:

--- clut.cpp.orig   2013-11-19 13:51:02.492603070 +0100
+++ clut.cpp    2013-11-19 14:40:15.991826934 +0100
@@ -79,12 +79,13 @@
     double lp[] = {ps, slope*meanx-ps*meanx};
 
     // Find upper and lower major lines
-    double yu = iterateline(ppp1, ppp2, d_len/3, (double []){slope, 0}, fabs(0.001/cos(angle)), e);
+    double li[] = {slope, 0};
+    double yu = iterateline(ppp1, ppp2, d_len/3, li, fabs(0.001/cos(angle)), e);
 
     yu = yu + fabs(d * yu);
     double lu[] = {slope, yu};
 
-    double yd = iterateline(ppp1, ppp2, d_len/3, (double []){slope, 0}, -1.0*fabs(0.001/cos(angle)), e);
+    double yd = iterateline(ppp1, ppp2, d_len/3, li, -1.0*fabs(0.001/cos(angle)), e);
 
     yd = yd - fabs(d*yd);
     double ld[] = {slope, yd};
@@ -95,7 +96,9 @@
     yl = yl + -1*sign(uv[1])*fabs(d2*(yl-lp[1]));
     double xxl = yl / (slope-ps);
     double yyl = xxl * slope;
-    double sat = dot_1dim(uv, (double []){xxl, yyl}, 2);
+
+    double arr2[] = {xxl, yyl};
+    double sat = dot_1dim(uv, arr2, 2);
     if (sat < minsat)
     {
        double minl[] = {uv[0]*minsat, uv[1]*minsat};
@@ -189,7 +192,8 @@
 
     while (1)
     {
-        double btest = boundtest(P0, P1, P_len, (double []) {LI[0], ret}, d_sign);
+   double li2[] = {LI[0], ret};
+        double btest = boundtest(P0, P1, P_len, li2, d_sign);
         double temp = (btest/double(P_len));
 
         if (temp >= e)

Windows line endings

I believe windows line endings were commited in the commit "edited gitignore". I has broken building on linux. Resetting to a commit before this point fixed the issue. The tell tale sign is that the commit message is associated with every file in the project.

You may wish to revert this commit.

pixy/host/pixymon/renderer.cpp:739: error: cast from 'int16_t* {aka short int*}' to 'unsigned int' loses precision [-fpermissive]

Hey,

I am a backer of the pixy project on kickstarter and out of my own self interest I started to try to compile the pixy host application on Linux (both my Laptop and my stationary PC run Fedora 19).
The first thing that the compiler complained about are the lines 739 and 740 in pixy/host/pixymon/renderer.cpp:

    unsigned int addr = (unsigned int)comps;
    unsigned int paddr = (unsigned int)&comps;

Here you try to cast a int16_t* into an unsigned int which does not work, because at least with my gcc version on linux you need an unsigned long int to hold the value of a pointer.
While this fixes the error emitted by the compiler:
Why do you try to cast a pointer to an integer in the first place? On a system with virtual memory this is generally not a good idea. At least you should use a reinterpret_cast to show that you know what you are doing.
Since addr and paddr are only used to initialize k and l, I can not figure out what your intent with this is.

Kevin

Is there a method of saving image or short video to SD?

The CMUcam4 had onboard storage. In lieu of that, is it feasible to send an image dump to the microcontroller for storage? I ask because I would like to save images to SD flash to verify calculated object detection post-experiment. Thank you for answering this question. Please notify me if there is a forum or more appropriate place to ask.

lsusb does NOT show anything about cmucam5 ....

I even built all scripts, but it seems cmucam5 is NOT correctly detected?

$ ./pantilt_c 
+ Pixy Tracking Demo Started +
Error: pixy_init() [-5] USB Error: Target not found

./Pixymon
now returns:

error: No Pixy devices have been detected.

buildpixymon.sh references src directory that do not exist

I'm trying to get the linux version to compile on Ubuntu. I forked the repo and cloned it onto my Ubuntu machine. After installing all of the dependencies defined in in the README.linux I attempted to run the buildpixymon.sh and got the following errors:

Ran this at ~/workspace/pixy/host:

Building for linux
./buildpixymon.sh: line 12: cd: src/host/pixymon: No such file or directory
Cannot find file: pixymon.pro.
make: Entering directory ~/workspace/pixy/host' make: *** No targets specified and no makefile found. Stop. make: Leaving directory~/workspace/pixy/host'
mkdir: cannot create directory ‘bin’: File exists
cp: cannot stat ‘src/host/pixymon/PixyMon’: No such file or directory
strip: 'bin/PixyMon': No such file
cp: cannot stat ‘src/host/pixymon/pixyflash.bin.hdr’: No such file or directory

Recommend removing the source directory from the script and moving the buildpixymon.sh up a directory. I've made this change on my fork.

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.