Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Can't find CMUCam2 demo.llb (http://www.chiefdelphi.com/forums/showthread.php?t=41722)

railerobotics 14-01-2006 11:50

Re: Can't find CMUCam2 demo.llb
 
After downloading the code to the robot controller and the terminal window pops up, nothing happens in it. Why is this?

Kevin Watson 14-01-2006 13:25

Re: Can't find CMUCam2 demo.llb
 
Quote:

Originally Posted by railerobotics
After downloading the code to the robot controller and the terminal window pops up, nothing happens in it. Why is this?

If you downloaded the code a few days ago, the code was messed-up for a while.

-Kevin

railerobotics 14-01-2006 14:55

Re: Can't find CMUCam2 demo.llb
 
Quote:

Originally Posted by Kevin Watson
If you downloaded the code a few days ago, the code was messed-up for a while.

-Kevin

We've tried that and it still didn't work.

Kevin Watson 14-01-2006 15:12

Re: Can't find CMUCam2 demo.llb
 
Quote:

Originally Posted by railerobotics
We've tried that and it still didn't work.

Rebuild the code with debugging messages on (see camera.h) and post the output (if any) here.

-Kevin

railerobotics 14-01-2006 15:32

Re: Can't find CMUCam2 demo.llb
 
Here is the debug.

Camera: Initialized abnormally with code 131
Camera: Initialization state = 1
Camera: No EEPROM configuration data found; using default parameters
Camera: Initialization state = 2
Camera: Initializatoin state =3

This continues over and over again.

Kevin Watson 14-01-2006 15:54

Re: Can't find CMUCam2 demo.llb
 
Quote:

Originally Posted by railerobotics
Here is the debug.

Camera: Initialized abnormally with code 131
Camera: Initialization state = 1
Camera: No EEPROM configuration data found; using default parameters
Camera: Initialization state = 2
Camera: Initializatoin state =3

This continues over and over again.

Hmmm... You're camera is hanging on initialization state 3. Open camera.h and look for this line: "#define MAX_ACK_LOOP_COUNT 10" and change the 10 to 100 and let me know what happens when you re-run the code. This gives the camera more time to acknowledge the command before the initialization state machine gives up and starts over.

-Kevin

railerobotics 14-01-2006 16:03

Re: Can't find CMUCam2 demo.llb
 
Quote:

Originally Posted by Kevin Watson
Hmmm... You're camera is hanging on initialization state 3. Open camera.h and look for this line: "#define MAX_ACK_LOOP_COUNT 10" and change the 10 to 100 and let me know what happens when you re-run the code. This gives the camera more time to acknowledge the command before the initialization state machine gives up and starts over.

-Kevin

We did that and it told us exactly the same thing.

Kevin Watson 14-01-2006 16:19

Re: Can't find CMUCam2 demo.llb
 
Quote:

Originally Posted by railerobotics
We did that and it told us exactly the same thing.

You've got power to the camera per the instructions? You've hooked-up the serial cable and TTL-RS232 board per the instructions? Have you tried the camera with the LabVIEW code? What does line 450 of serial_ports.c say?

-Kevin

railerobotics 14-01-2006 16:32

Re: Can't find CMUCam2 demo.llb
 
Yes we have power and have the ttl hooked up and the camera does work with labview and is calibrated. I have edited the code and changed line 450 of the serial port code to SPBRG2 = BAUD_115200

Kevin Watson 14-01-2006 16:47

Re: Can't find CMUCam2 demo.llb
 
Quote:

Originally Posted by railerobotics
Yes we have power and have the ttl hooked up and the camera does work with labview and is calibrated. I have edited the code and changed line 450 of the serial port code to SPBRG2 = BAUD_115200

Well, I don't know what to tell you. The debugging information indicates that your camera isn't communicating with the RC. Grasping at straws, try using the programming port of the RC to communicate with the camera. You'll need to modify the first option of camera.h to use the other serial port and use a male to male null modem serial cable (pin 3 -> pin 2, pin 2 -> pin 3, pin 5 -> pin 5) between the RC and camera.

-Kevin

railerobotics 14-01-2006 17:22

Re: Can't find CMUCam2 demo.llb
 
I really appreciate you taking time to help. I'll have to try that thing with the modem cable on monday if I can get a hold of one. If not, I have no idea what to do next.

Kevin Watson 15-01-2006 03:16

Re: Can't find CMUCam2 demo.llb
 
Quote:

Originally Posted by railerobotics
I really appreciate you taking time to help. I'll have to try that thing with the modem cable on monday if I can get a hold of one. If not, I have no idea what to do next.

Can you try the software mentioned here and report back with the results?

-Kevin

billbo911 15-01-2006 11:46

Re: Can't find CMUCam2 demo.llb
 
One thing I have seen that causes the camera to hang, though I didn't notice if it is at STATE 3, is having BOTH the PWM/TTL connected to the RC AND the serial cable connected to the PC from the DB-9 on the camera. As I recall from last year, the camera can not run both simultaneously. And, yes, I know this from personal experience. It was definitely one of those "Bill, you doofus" moments. :o

This is what I observed the camera and servos do when it was hooked up incorrectly. Camera powers on correctly, RC boots normally, servos drive to what appears to be 127 or center position, and absolutely nothing shows up on the terminal window. When sending a "c" or "t" command to the port, a "NAK" will be returned sometimes.
I hope this helps out someone.

railerobotics 15-01-2006 11:52

Re: Can't find CMUCam2 demo.llb
 
Quote:

Originally Posted by Kevin Watson
Can you try the software mentioned here and report back with the results?

-Kevin

We will try that and report back on monday.

N3OW 15-01-2006 13:12

Re: Can't find CMUCam2 demo.llb
 
We have the Lab View code and it is working somewhat.
We have an issue with the pan going the wrong way from the target.
We had a issue with the image being upside down so we rotated the camera and that fixed that problem bur the pan goes opposite of the target any ideas as to why?
We are planning on using the Easy C programming, and lab view has the ability to export the configuration file for Easy C.
So if any one has any ideas how to correct the panning issues that would be great.
Thank you
Jay
n3ow11@gmail.com.
:ahh:


All times are GMT -5. The time now is 03:37.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi