Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with California AH Robot...
01-23-2017, 02:22 AM
Post: #1
Help with California AH Robot...
Thank you for posting your innovations on the web. My son and I are working on a version of your air hockey robot  and we are learning SO MUCH! When we get it done, we’ll send your our build file. I’ve attached a photo (in process).

We are having a problem and could use your advice if you have a moment:

1. We have built all the mechanicals (as shown in the photo) and they work well.
2. We’ve calibrated the x and y axis as you suggest in your build file. The robot moves quickly and
3. We’ve set up the vision system using colorful foam and it is successfully tracking the puck and the mallet. We can see it tracking the puck and projecting the straight and bounce trajectories.
4. We transferred all the edits and calibrations to AHR.bat and have downloaded AHR.bat to the Arduino.

BUT when we connect the vision system, the Arduino does not respond at all. We don’t know whether the PC isn’t sending signal or the Arduino isn’t synching the vectors or what?

Any advice?

David
Find all posts by this user
Quote this message in a reply
01-23-2017, 11:01 AM
Post: #2
RE: Help with California AH Robot...
(01-23-2017 02:22 AM)DCRAW Wrote:  Thank you for posting your innovations on the web. My son and I are working on a version of your air hockey robot  and we are learning SO MUCH! When we get it done, we’ll send your our build file. I’ve attached a photo (in process).

We are having a problem and could use your advice if you have a moment:

1. We have built all the mechanicals (as shown in the photo) and they work well.
2. We’ve calibrated the x and y axis as you suggest in your build file. The robot moves quickly and
3. We’ve set up the vision system using colorful foam and it is successfully tracking the puck and the mallet. We can see it tracking the puck and projecting the straight and bounce trajectories.
4. We transferred all the edits and calibrations to AHR.bat and have downloaded AHR.bat to the Arduino.

BUT when we connect the vision system, the Arduino does not respond at all. We don’t know whether the PC isn’t sending signal or the Arduino isn’t synching the vectors or what?

Any advice?

David
Hi David!
Glad you are enjoying the process! :-)

Yes, looks like the PC is not sending any command to the Brain Shield. Lets check this:
1) Is the Robot connected to the computer via WIFI (and using the correct password: 87654321 ?
2) Have you tried to make the "INITIAL MOVEMENT PATTERN"? (video at: http://www.jjrobots.com/air-hockey-robot...de-v-1-0/)
3) Could you attach a screen capture of the computer detecting the foams and the "detection parameters" for those foams?

;-)
Visit this user's website Find all posts by this user
Quote this message in a reply
01-27-2017, 02:59 AM
Post: #3
RE: Help with California AH Robot...
Thank you for the response. A few answers:

1. the Robot Arduino is connected directly to the PC via the USB port. No WiFi is being used.

2. We have not tried the INITIAL MOVEMENT PATTERN. The link provided leads to a "no page found" webpage. We have tested the Robot movement with the x and y axis calibration utilities. Everything works flawlessly - including adjusting the power to not lose steps, inverting the y axis, calibrating the DISTANCE_PER_STEPS variables, etc. as you've described in the build file.

3. For the foam detection patterns, these are the parameters in the AHR.bat file:
AHR.exe COM19 68 97 53 144 62 83 3 15 66 161 149 192 60
These parameters appear to work as we can see a green dot in the center of the puck and the robot mallet foam in the video window when the AHR.bat file runs.
I've attached the screen capture you requested of the Robot and puck foams as seen by the vision system.    
Find all posts by this user
Quote this message in a reply
01-27-2017, 09:56 AM
Post: #4
RE: Help with California AH Robot...
1) You will have to connect the Arduino to you computer via WIFI, that is the way the code has been made.
Here is the link (remove the final ")" : http://www.jjrobots.com/air-hockey-robot...ide-v-1-0/ but I guess you have already seen that page...
2) Nice! That is important.
3) Try connecting the robot to the computer via WIFI
Visit this user's website Find all posts by this user
Quote this message in a reply
01-27-2017, 11:32 PM
Post: #5
RE: Help with California AH Robot...
Excellent - this is something new to try. Will try this weekend.

A little confused however: we started our project over a year ago (I know, I know, we're slow) so we may be working with an old design for the AH Robot from your GitHub. The build file doesn't include a WiFi shield and there are not directions about hooking up WiFi.

We're just working with an Arduino Mega 2560 and a RAMPS 1.4 with A4988 stepper motor drivers. I've attached the Build File we're using and a screen grab from the build file here (no WiFi shield).

Should I buy a WiFi shield and follow the new directions in the link you sent me?


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
01-29-2017, 05:44 PM
Post: #6
RE: Help with California AH Robot...
Oh, I see. I thought you were working with the current version of the Air hockey Robot (WIFI controlled). The current code supports the WIFI connection instead the serial.
About buying the Brain shield: it could be easier to use it as the new code has been optimised and changed for the smartphone version or PS3 version. Links below:
PS3 version (new): http://www.jjrobots.com/air-hockey-robot...ide-v-1-0/
Smartphone version: http://www.jjrobots.com/air-hockey-robot...ide-v-1-2/
Visit this user's website Find all posts by this user
Quote this message in a reply
01-30-2017, 03:13 AM (This post was last modified: 01-30-2017 03:27 AM by DCRAW.)
Post: #7
RE: Help with California AH Robot...
(01-29-2017 05:44 PM)jpedroc Wrote:  Oh, I see. I thought you were working with the current version of the Air hockey Robot (WIFI controlled). The current code supports the WIFI connection instead the serial.
About buying the Brain shield: it could be easier to use it as the new code has been optimised and changed for the smartphone version or PS3 version. Links below:
PS3 version (new): http://www.jjrobots.com/air-hockey-robot...ide-v-1-0/
Smartphone version: http://www.jjrobots.com/air-hockey-robot...ide-v-1-2/

OK - that may be the best approach.

Since we're so close with the "original AH Robot", are you able to offer words of advice on getting us across the finish line?

We spent time this weekend and have isolated the problem more closely. We tracked the AHRobot program - it runs as such:

1. launches the main loop
2. launches packetRead
a. SKIPS/DOES NOT EXECUTE any of these steps....
// Puck detection and trajectory prediction
cameraProcess(puckPixX,puckPixY,dt);
Serial.print("PUCK DETECTED! ");
Serial.print("PUCK PIXEL POSITION: ");
Serial.print(puckPixX);
Serial.print(",");
Serial.println(puckPixY);
3. launches robotStrategy
4. moves to defense position
5. back to step 1 and repeat indefinitely

Our conclusion is that the Arduino is not finding any data in the serial port buffer so it skips past these steps.

Things we've tried already:

a. Checked the port assignment in AHR.bat matches the port assigned by Windows to the Arduino. Both are assigned com4.
b. Assigned the port to 115200 baud rate. One suspicion we have is that this port appears to default back to 9600 - this happens on both Windows computers. Not sure if this is important.
c. Made sure the AHR.bat is recognizing the puck and mallet - both have green dots indicating the PS3-eye is recognizing them. When we move the puck, we can see the c++ code predicting trajectories (both straight and bounce trajectories).
d. Moved everything to another PC to be sure nothing was hardware related - exact same behavior.

Any help would be appreciated! We suspect we're really close and something simple will make it work.
Find all posts by this user
Quote this message in a reply
02-05-2017, 03:32 PM
Post: #8
RE: Help with California AH Robot...
OK. So "buy our latest kit or no help from jjrobots". Got it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)