Log in

View Full Version : RoboEmu 1.09 (supports PBASIC 2.5)


rbayer
09-01-2003, 02:49
Well, I'm only 6 hours (or 30, depending on which promise) late, but here it is: RoboEmu 1.09. It includes support for everything in the spiffy new default code, as well as a number of bug fixes and new features.

Notably, it now supports PBASIC 2.5, has a user_mode display, supports autonomous mode. There's also some experimental support for user-changeable run speeds, but that may go away in the next version depending on how it works

As always, it's available at http://www.robbayer.com/software.html or in the white papers.

I know I ask this every time, but it's especially necesary this time: let me know how it works! I've checked everything I could think of, but with a whole new language, I'm sure I missed something. Likewise, I would like to know if anybody finds any other PBASIC 2.5 commands aside from SELECT, DO, LOOP, and the new forms of IF.

--Rob

Caleb Fulton
09-01-2003, 06:45
I'd just like to thank you for your continuing service to the FIRST community, Rob!!!!

cybermind
09-01-2003, 12:13
Thanks. Your programs are REALLY helpful!

rbayer
09-01-2003, 13:27
You're all very welcome. As long as people keep using them, I'll keep maintaining them.

I do have one question for some PBASIC gurus out there: What makes a line a complete command? I realized that I forgot to add the ability for commands to span multiple line to version 1.09, mainly because I spent a lot of time trying to figure out how to determine whether a line was "complete" or whether it spilled over into the next one. Here's what I've got so far:

Equal number of "(" and ")". Same with [ and ]. Even number of quote marks. No commas hanging off the end.

Anything else that defines a complete statement?

Caleb Fulton
09-01-2003, 16:29
I *think* a backslash at the end of a line will contain the next line in the command..

like

Serin COMA\COMB, INBAUD, [oi_swA,oi_swB,rc_swA,rc_swB, \
p2_x,p1_x,p4_x,p3_x,PB_mode, \
packet_num,p2_y,p1_y,p4_y,p3_y, \
p2_wheel,p1_wheel,p4_wheel,p3_wheel]

Noah
09-01-2003, 16:52
The trailing backslash will continue the line in this (http://www.chiefdelphi.com/forums/papers.php?s=&action=single&paperid=51) preprocessor, but it is not a standard language feature. It would be nice to have support for it in RoboEmu though... I would also like to give Rob my sincere thanks for creating and maintaining such a valuable aid!

rbayer
09-01-2003, 19:27
Originally posted by Caleb Fulton
I *think* a backslash at the end of a line will contain the next line in the command..


If only life were so simple...

If you look at the new default code, you will see:

Serout USERCPU, OUTBAUD, [255,255,p1_y,relayA,p2_y,relayB,p3_y,p4_y,p1_x,p2_ x,p3_x,p4_x,
p1_wheel,p2_wheel,p3_wheel,p4_wheel]

I think I've gotten it straightened out now, but I want to test it a little more before I release 1.09b. The change just isn't significant enough to merit a whole new version number...

Gobiner
09-01-2003, 19:28
Once I get some free time (haha, right) I'm planning on doing major testing. I do QA testing at a small software company, so I think I make a pretty qualified tester. Of course, my reasons are selfish, I just want the best tool possible to use when it actually matters. Just waiting for the free time to smack me in the face.

nwagers
12-01-2003, 01:35
could you add the OUTH variable. It's just a the Output pins 8-15. It'll make it easier to program the output byte for usermode

rbayer
12-01-2003, 01:39
No problem. It's on the list of things to do for 1.10.

Adam Collet
14-01-2003, 19:30
OK, I'm having issues with the new RoboEmu 2.5 Select support - I know you said its beta, but maybe some specific feedback will help.

I get the error "variable >132 does not exist"
I am doing a select command similar to what follow:

Select (arm_joint1) [hint hint about 159]
Case >ajoint1+slack
'some code
Case....
..........
Case Else
.............
EndSelect

Assumably, ajoint+slack is evaluated to be 132; and your program expects a variable there.

According to the examples that Parallax gave us for 2.5, an operator should be able to come directly after the "Case" statement. I'll send you the code.

rbayer
14-01-2003, 19:52
Hmmm... I definately never saw any documentation from Parallax, so I didn't even know you could put an operator in there like that.

You're getting the current error because it only expects expressions, meaning it evaluates them recursively. Thus it added ajoint1 and slack and then replaced the appropriate part of the expression with the value it got back. It then tried to re-evaluate the new expression, thought it was a variable because it is only one word, and tried to lookup ">132."

Thanks for the heads up and I'll try to incorporate that into the next version as it should be VERY easy to fix. I also kinda forgot about the OUTH variable, so I'll do that too.

--Rob

Adam Collet
14-01-2003, 23:16
Do you mean your program would expect something more like:

Select arm_joint1
CASE arm_joint1>ajoin+slack
etc.
etc.
EndSelect

Or that it only supports:

Select arm_joint1
CASE 0 to ajoin+slack
etc.
etc.
EndSelect

It would be much appreciated to have that update...when can we expect it?

rbayer
14-01-2003, 23:20
No, I mean that my program doesn't expect any operator there and tries to evaluate the expression "couter=CASE", which in this instance turned into "arm_joint1=>132". Not pretty. I'm actually kinda surprised it didn't blow up. Oh well.

I'm REALLY busy until 9:00pm Thursday night (my Eagle Scoutmaster Conference), but I'll try to work on it after that. It shouldn't take more than an hour to add the support. As soon as I finish it, I'll let you know.

Greg Ross
15-01-2003, 18:02
Randomly playing around with RoboEmu and the default code. Clicked Switch 5, and up popped "Error: Variable P3_YMAX127 does not exist. Can't get value."

Looks like single line IF...THEN doesn't handle MIN and MAX operators.

rbayer
15-01-2003, 18:50
Yeah, somebody else just told me about that last night. I'm now hitting my head against my desk repeatedly for adding a call to removeSpaces withing the makeCmdIf function. Stupid, stupid, stupid, stupid, stupid...

Look for yet another new version by tomorrow night.

Mike Soukup
16-01-2003, 22:01
Does RoboEmu support the modulus operator (//)? I have a statement:
if (CCDataIn <> ((PrevDataIn + 2) // 256)) then
and it give the error "Error: Variable /256 does not exist. Can't get value. While processing If @((CCDATAIN;((PREVDATAIN+2)//256)))"

Thanks for the tool, it's been a big help while we're sitting around waiting for a robot to play with.

Mike

rbayer
16-01-2003, 22:03
Ooops. Kinda forgot that one. Look for it in 1.10 as it definately should be there.

rust710
21-01-2003, 07:37
Does the RoboEMU support delta_t?

rbayer
21-01-2003, 09:09
No. It wouldn't really work, either, due to the speed differences between computers. If I figure out a way of making it work, I might add it. Anyway, 1.10 is done now, so grab that.

rust710
21-01-2003, 15:07
I have the 1.10 but I posted in the wrong forum. Thanks for the response. What will the program do when it incounters delta_t?

rbayer
21-01-2003, 17:08
I honestly don't know. It shouldn't crash, but it may return some insane number. Let me know if you find out.

rust710
21-01-2003, 17:22
Well I tried it and it just returns a 0. Which actually is fine. The Stamp will return a 0 if the code is executed in 26ms or less. So my code works fine. delta_t has to be declared and is in the serin so it acts like a varible not set.

One thing that you program doesn't support is toggle. For example toggle 15 changes the state for one of the relay lights. Really same as out15 = ~(out15).

I really like your program. I have been using it even when I have a robot controller because it is easier to setup.