Go to Post Yes, machining a dog profile into a steel sprocket on a manual mill was an experience filled with pain and regret. - Joe G. [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 20-03-2007, 11:07
Mike Mahar Mike Mahar is offline
Registered User
FRC #0138
 
Join Date: Jan 2007
Location: Amherst, NH
Posts: 64
Mike Mahar will become famous soon enough
Is anyone using RoboEmu2 with the 2006/2007 controller

Is anyone using RoboEmu2 with the 2006/2007 controller? Based on the comments in the forum, it looks like a great tool, but the most recent reference to it that I can find in the forum is from 5/05.

I've downloaded the files. They are dated 11/04, and definitely refer to the pre-2006 controller. Before I spend a lot of time trying to make it work with the 2006 controller, I thought I'd check to see if anyone else has tried...
  #2   Spotlight this post!  
Unread 20-03-2007, 15:08
bear24rw's Avatar
bear24rw bear24rw is offline
Team 11 Programming Captain
AKA: Max T
FRC #0011 (MORT)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2005
Location: Flanders, NJ
Posts: 385
bear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to beholdbear24rw is a splendid one to behold
Send a message via AIM to bear24rw
Re: Is anyone using RoboEmu2 with the 2006/2007 controller

You might want to consider making this thread a poll.. But I have to say now, i didn't use it this year..
  #3   Spotlight this post!  
Unread 21-03-2007, 05:04
ace123's Avatar
ace123 ace123 is offline
Registered User
AKA: Patrick Horn
FRC #0008 (Paly Robotics - http://robotics.paly.net/)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Palo Alto, CA
Posts: 50
ace123 has a spectacular aura aboutace123 has a spectacular aura about
Send a message via AIM to ace123
Re: Is anyone using RoboEmu2 with the 2006/2007 controller

I tried to get it working with this year's robot... I don't think there is any good reason that it shouldn't work... however I recommend applying the roboemu-specific changes to your code rather than trying to start with his files.

Two years ago, I hooked in some camera handlers to RoboEmu which basically used two of the analog or joystick sliders as center x and y coordinates of the camera blob.
Code:
void camera() {
	data_rdy=0;
	if (parse_mode==0) {
		Serial_Char_Callback('A');
		Serial_Char_Callback('C');
		Serial_Char_Callback('K');
		Serial_Char_Callback('\r');
	} else {
		Serial_Char_Callback('T');
		Serial_Char_Callback((char)ana_ins[4]);
		Serial_Char_Callback((char)ana_ins[5]);
		Serial_Char_Callback((char)ana_ins[4]);
		Serial_Char_Callback((char)ana_ins[5]);
		Serial_Char_Callback((char)ana_ins[4]);
		Serial_Char_Callback((char)ana_ins[5]);
		Serial_Char_Callback((char)20);
		Serial_Char_Callback((char)rc_dig_in18?90:0);
		Serial_Char_Callback((char)ana_ins[6]);
		Serial_Char_Callback((char)ana_ins[7]);
		Serial_Char_Callback('\r');
	}
}
all of those are analog inputs just getting fed directly back to the program, I believe, so they were easy to change in runtime and see how the code reacts...

Then, To hook up the camera, make your own copies of "Write_Serial_Port_Two" and "Read_Serial_Port_Two" to replace serial_ports.c and do some additional parsing to see whether the code expects an "ACK" after the command, or if it expects a "T" packet...
Again, this is a lot of work, but if you get it, it may be worthwhile.

For some reason, the auto box still comes greyed out... I think it works if you just enable it in the code, though he claimed "it tended to cause infinite loops."

You might be able to think of a few other easier ways that could involve re_core and using something like the "user_display_mode" checkbox.

In addition, I added pot and encoder code by interpreting the motor output, for example:
Code:
		 hall_effect_add_1 = (pwm01-127)/4;
		 if (hall_effect_add_1<0)
			 hall_effect_add_1=-hall_effect_add_1;
		 
		 hall_effect_add_2 = ((255-pwm02)-127)/4;
		 if (hall_effect_add_2<0)
			 hall_effect_add_2=-hall_effect_add_2;
		 
		 arm_position_2+=(pwm03-127)/4;
		 arm_position_1+=(pwm04-127)/16;

		 if (arm_position_1<0)
			 arm_position_1=0;
		 if (arm_position_1>254)
			 arm_position_1=254;

		 if (arm_position_2<0)
			 arm_position_2=0;
		 if (arm_position_2>254)
			 arm_position_2=254;
}
/* And later in my update inputs function: */

		for (i=0;i<hall_effect_add_1;++i) {
			INTCON3bits.INT2IF=INTCON3bits.INT2IE=1;
			InterruptHandlerLow ();
		}
		
		for (i=0;i<hall_effect_add_2;++i) {
			INTCON3bits.INT3IF=INTCON3bits.INT3IE=1;
			InterruptHandlerLow ();
		}

		ana_ins[0]=arm_position_1;
		ana_ins[1]=arm_position_2;
Anyway, I really liked the idea of RoboEmu2, and it's kind of sad that it's just a little too hard to get working to be worthwhile in most cases.

If you get a nice and clean implementation of these features, I would be interested in seeing it (though in my case it was about as hacked up as you can get).
__________________
-Patrick Horn, Paly Robotics

Check out the space simulator called Vega Strike, modelled after the space simulator games Elite and Wing Commander. It's Open Source too!
If you have ever played Wing Commander, or especially Privateer, and had a feeling of nostalga derived from the you will enjoy these two Vega Strike mods: Privateer Gemini Gold and Privateer Remake!
I'm working on adding multiplayer support this year...
  #4   Spotlight this post!  
Unread 03-04-2007, 14:37
Mike Mahar Mike Mahar is offline
Registered User
FRC #0138
 
Join Date: Jan 2007
Location: Amherst, NH
Posts: 64
Mike Mahar will become famous soon enough
Re: Is anyone using RoboEmu2 with the 2006/2007 controller

Patrick,

I apologize for not responding sooner, I got pulled off onto something else. Thanks for taking the time to reply, and including your code samples.

I will continue to work on this for next year, and let you know if I come up with something generally useful.
  #5   Spotlight this post!  
Unread 26-08-2007, 22:30
WizardOfAz's Avatar
WizardOfAz WizardOfAz is offline
Lead Mentor
AKA: Bill Bennett
FRC #1011 (CRUSH)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Tucson, AZ
Posts: 101
WizardOfAz will become famous soon enough
Send a message via AIM to WizardOfAz
Anybody know where Rob Bayer or roboemu2 is??

Looking for a tool to allow classroom full of students to play with robot code without an RC per student. I thought roboemu2 would be the cat's meow, but can't find it anywhere and robbayer.com is a dead site. Anybody got a clue?

Bill
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
2007 vs 2006 controller psh Programming 17 11-09-2007 13:16
Legality of Using 2005/2006 Kitbot Gearbox on 2007 Robot Gusman1188 Rules/Strategy 1 12-01-2007 15:44
Using auxiliary joystick buttons with IFI controller. Eric W. Jones Programming 9 03-12-2006 22:26
Problem with RoboEmu2? Calvin Programming 1 12-02-2005 11:27
Using Accelerometer with '04 controller sanddrag Control System 4 20-02-2004 12:18


All times are GMT -5. The time now is 01:25.

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