Go to Post Thanks to ... Dave, who teaches us not to worry, it’s only rocket science. - JohnBoucher [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-07-2010, 17:12
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Adding Scripting support to Java

Hello,

I know this should be in the Java section, but I thought i would get any input i could possibly get, JIC.

I am currently working on a method to script the autonomous mode for my team's robot, and possibly teleop as well. I have no idea where to start, but i do know that I want to start with something like Rhino.

Help please.
  #2   Spotlight this post!  
Unread 25-07-2010, 17:51
gblake's Avatar
gblake gblake is offline
6th Gear Developer; Mentor
AKA: Blake Ross
no team (6th Gear)
Team Role: Mentor
 
Join Date: May 2006
Rookie Year: 2006
Location: Virginia
Posts: 1,942
gblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond repute
Re: Adding Scripting support to Java

Quote:
Originally Posted by Robototes2412 View Post
Hello,

I know this should be in the Java section, but I thought i would get any input i could possibly get, JIC.

I am currently working on a method to script the autonomous mode for my team's robot, and possibly teleop as well. I have no idea where to start, but i do know that I want to start with something like Rhino.

Help please.
Robototes,

Please be more specific.

When/where will these scripts be created, tested and edited? What computing/editing devices will be used to do that work?

What sort of commands do you want to use in the scripts? What sort of (what level of sophistication) execution control logic (looping branching, subroutines, etc.) do you want to be in scripts.

Do you want to use a off the shelf scripting language that has a pre-made interpreter you use; or ar you wanting to string together a bunch of "macros" that you create?

Do you want to be able to have the script use sensors' measurements or other similar inputs from the robot/environment?

What is more inportant to you: Checking for typo-style mistakes before executing the script, or editing it in/on the robot right up to the moment you commit to using it?

A better description of what you think of when you say "scripting" will get you better answers .

Blake
__________________
Blake Ross, For emailing me, in the verizon.net domain, I am blake
VRC Team Mentor, FTC volunteer, 5th Gear Developer, Husband, Father, Triangle Fraternity Alumnus (ky 76), U Ky BSEE, Tau Beta Pi, Eta Kappa Nu, Kentucky Colonel
Words/phrases I avoid: basis, mitigate, leveraging, transitioning, impact (instead of affect/effect), facilitate, programmatic, problematic, issue (instead of problem), latency (instead of delay), dependency (instead of prerequisite), connectivity, usage & utilize (instead of use), downed, functionality, functional, power on, descore, alumni (instead of alumnus/alumna), the enterprise, methodology, nomenclature, form factor (instead of size or shape), competency, modality, provided(with), provision(ing), irregardless/irrespective, signage, colorized, pulsating, ideate
  #3   Spotlight this post!  
Unread 25-07-2010, 22:28
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: Adding Scripting support to Java

What i mean by scripting is the following to find and kick a ball:
Code:
BEGIN autonomous
var balls = 2
go forward 0.25 impulse
loop termcon=enabled:
  if kickersense == true:
    stop
    kick hard
    if balls == 0:
      gtfo this loop
    resume course and speed
END autonomous
I want to use some macros that call java functions, much like one would create python bindings for C programs.

I would also have it use sensors, but only the sensors i allow, for instance the boolean sensor that we put by the kicker that detects the existence of a ball before you kick.
  #4   Spotlight this post!  
Unread 26-07-2010, 01:12
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Adding Scripting support to Java

if that's the kind of thing you want, I'd go look for an extendable scripting language for Java (if this was C I would jump to LUA) and add whatever interfaces you need

Perhaps this is what you are looking for? http://www.jython.org/
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"

Last edited by Radical Pi : 26-07-2010 at 01:18.
  #5   Spotlight this post!  
Unread 26-07-2010, 06:26
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,394
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: Adding Scripting support to Java

There was this thread a few months ago on scripting http://www.chiefdelphi.com/forums/sh...ad.php?t=86025

There are a tens of script languages built on top of Java that can be used. Do you want to pick something that is very complex (Python) or something simple that would support the example above? This goes back to gblake's post about design details.

You might want to check in with the people from the older thread and see where they are in their development and see if you want to join their efforts. (That many hands make light work thing). Its only a few weeks to the start of fall seasons in the US where most of us do training in new tools. We try not to learn new things during build season, so if you wanted wider use of your idea the time to roll it out is soon.

I won't hijack your thread to open up the discussion about do you need an Object Oriented scripting language to create winning robot code. There have been some interesting discussions on computer language forums on how "less" is often "more".
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
**FIRST EMAIL**/Java and Orbit Balls *****JAVA DISCUSSION*** Pjohn1959 Programming 37 31-08-2009 15:55
YMTC: SUPPORT/NOT SUPPORT (ramping) ALIBI General Forum 11 02-04-2007 07:36
kevin watsons scripting . . . Moloch Programming 2 18-02-2005 17:52
2005 scripting language? rjwalters Programming 1 02-02-2005 18:44


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

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