Go to Post Q&A is certainly a good route to take, but depending on how gray the topic in question is, CD is certainly a good place to ask the question. - slijin [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 16-02-2012, 19:39
Herbblood's Avatar
Herbblood Herbblood is offline
Knowledgeable
AKA: Ally
FRC #3044 (OxBE4)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2008
Location: Ballston Spa
Posts: 247
Herbblood is an unknown quantity at this point
Re: Robot Nightmare!

The criolayout is different i am not postive of what is it but it goes somehting like this
Slot1: analog
slot2: digital
slot3 solenoid
slot 4: empty(or if using the 4 slot crio can be any.)
Slot5: analog
slot6: digital
slot7: solenoid
slot 8: empty(or if using the 4 slot crio can be any.)

I don't know about watch dog,but my team does not use it so i suspect it will not stay on.
And with the DriverstationLCD it is used to send user messages to your classmate. (but there is also regular DriverStation).

not sure if i am much help, but here you go!
__________________
Off to WPI!
Go OxBE4
Reply With Quote
  #2   Spotlight this post!  
Unread 17-02-2012, 19:05
nickpeq nickpeq is offline
Turing-complete
FRC #1255 (Blarglefish)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Baytown, TX
Posts: 60
nickpeq is an unknown quantity at this point
Re: Robot Nightmare!

Quote:
Originally Posted by Herbblood View Post
The criolayout is different i am not postive of what is it but it goes somehting like this
Slot1: analog
slot2: digital
slot3 solenoid
slot 4: empty(or if using the 4 slot crio can be any.)
Slot5: analog
slot6: digital
slot7: solenoid
slot 8: empty(or if using the 4 slot crio can be any.)

I don't know about watch dog,but my team does not use it so i suspect it will not stay on.
And with the DriverstationLCD it is used to send user messages to your classmate. (but there is also regular DriverStation).

not sure if i am much help, but here you go!
And I believe you should only be using the first 3 slots this year. It's suddenly really specific.
Reply With Quote
  #3   Spotlight this post!  
Unread 17-02-2012, 21:01
NS_Radication's Avatar
NS_Radication NS_Radication is offline
Student
AKA: Marco Schoener
FRC #1369 (Minotaur)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Tampa
Posts: 88
NS_Radication is an unknown quantity at this point
Re: Robot Nightmare!

UPDATE: we have a moving drivetrain, working RSL (now that it's on, it is annoying, lol), working Jaguar and spikes, simple robot based Java program, not using encoders.

NEED TO DO: I understand what the symbols on micro switches do, but how do I plug it in? Where oncRIO and DSC? What wire do I use? Please be more specific. We are getting the Axis 106 camera and trying to get that to work as well as the Kinect. Any advice or tutorial would be appreciated and I know it is late to be working on this part this late in build season .

Can anyone tell me why IterativeRobot does not like my input, even when based off sample programs or other team's previous years' programs (for testing ONLY)?

Thank you again in advanced and for all your help! Happy Competition and good luck!
__________________
Team 1369
Senior
Head Programmer (Java)
Head Electrician
Reply With Quote
  #4   Spotlight this post!  
Unread 17-02-2012, 21:38
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Robot Nightmare!

The main issue I see with your IterativeRobot code is that you're using it as though it were a SimpleRobot. The startCompetition() method of iterative robot works like this:
Code:
while(robot is alive) {
    check for new driver station packet;
    if(new driver station packet has been received)
        periodic();
    continuous();
}
Obviously, there's more to it, but that's the basic setup. Your periodic() functions for both autonomous and teleop have loops inside them that never end. If periodic() never finishes, how is the robot going to update its driver station data (which includes, among other things, joystick values)? The best way to avoid a situation like this (commonly referred to as a "hang") is to have the robot's data, or "state", separate from its functionality.
However, doing something like this requires having your program work repeatedly on state data, which in turn requires a fairly different thought process from "typical" programming. Instead of asking "What series of steps gets me from point A to point B?", you must ask "If I start at A, how can I determine the next step toward B from the data generated from the previous step(s)?".

Long story short, IterativeRobot doesn't like your input because you never give it a chance to receive it.

Also, on the topic of the DriverStationLCD: when you start up the driver station, there's a light-gray section on the right. This is actually a text display area, and you can use DriverStationLCD to write to it, by doing
Code:
DriverStationLCD.getInstance().println(<line>,<column>,<text>);
DriverStationLCD.getInstance().updateLCD()
<line> is an enum (or as close as you can get with Java ME), with the first line being kMain6, and the rest being kUser2 to kUser6. Yeah, I know, weird naming system.
<column> is an int from 1 to 21, defining the start of where you want the text to be displayed.
<text> is the string you want to display.

On the LCD, 2 things happen that you might not be expecting. First, your text is truncated to fit into the 21 character limit. So, for example, if you tell it to write "Hello, World!" starting from the 10th column, it will become "Hello, Worl", because the last 2 characters don't fit within the limits. Secondly, things overwrite each other. So if you first print out "Hello", then print out "hi" to the same line, you will end up with "hillo".

Best of luck in the upcoming crunch-time!
Reply With Quote
  #5   Spotlight this post!  
Unread 18-02-2012, 18:40
NS_Radication's Avatar
NS_Radication NS_Radication is offline
Student
AKA: Marco Schoener
FRC #1369 (Minotaur)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Tampa
Posts: 88
NS_Radication is an unknown quantity at this point
Re: Robot Nightmare!

UPDATE: the microswitch was are operational, the robot is wireless, the Driver Station reads voltage.

NEEDED: what are some methods of reading when the micro switches are active because I can only think of the driver station lass in Java. Or does it show up on the driver station. I saw the PSOC I/O device and I had it installed before re-imaging the Classmate, so does that mean that I have to do that again?

When I try to run a default camera program, I get an error in a Windriver code not existing (this is java not c++. Silly netbeans) but seriously, it is confusing to find out how to make the Axis 206 camera working. If I can get an image to feed to the driver station, then I can attempt to build code to detect the environment with tutorials and chiefdelphi!

I have downloaded and installed the Kinect SDK and FRC Knect Server. I plan to test it tomorrow but how does it respond? I could only set it up today. We tested the Kinect via the SDK and it is operatnal!

TIPS: I have learned that when. Jaguar is moving a motor (for sample:CIM Motor), that when a conveyor belt system has enough friction, the following can occur:

With too much friction and the wire sparks and heats up, direct battery Test on CIM motor.

When there is some friction, the Jaguar has to accelerate. If it goes from 0 to 1.0 in speed with force, it overheats for 3-4 seconds and resets. So you have to accelerate or inch closer until the speed is just enough to have full power from that point.

**As for photos, I will see if I can get some tomorrow. We got our cannon initially mounted, so the electronics board looks like a scary cave with an orange RSL and blue and green power LEDs.

Thank you all agin in advanced and this crunch time robot is workin faster, how strange? Well Happy Competitns and have a merry crunch session!
__________________
Team 1369
Senior
Head Programmer (Java)
Head Electrician
Reply With Quote
  #6   Spotlight this post!  
Unread 18-02-2012, 19:34
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Robot Nightmare!

The C++ error is actually a C++ error, because the camera (and most of the image processing code) is written in C++ and called from java via JNA.
I had this problem earlier in the season, and if I remember correctly, I fixed it by doing 2 things: formatting the camera (I can't remember exactly where the software to do this is, but it's definitely in the KOP), and not specifying the IP when calling AxisCamera.getInstance() (although I can't remember what IP I gave it, so it was probably just that it was the wrong one ). Basically, the camera defaults to 10.te.am.11, and you have to access it as such. If you can connect to the robot, you should be able to connect to the camera if it's been configured correctly.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:02.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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