Go to Post I'm basically only posting this so that future Shaker Robotics kids will see it and tell themselves "never again"... - Chris is me [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-11-2009, 19:40
BEEKMAN BEEKMAN is offline
Registered User
AKA: Brendan McLeod
FRC #0190 (Gompei and the Herd)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Londonderry, NH
Posts: 138
BEEKMAN is a splendid one to beholdBEEKMAN is a splendid one to beholdBEEKMAN is a splendid one to beholdBEEKMAN is a splendid one to beholdBEEKMAN is a splendid one to beholdBEEKMAN is a splendid one to behold
Communicating with a laptop

Okay, so, now that all of team 1058's competitons are over, we are playing around with some coding. We plan on making our robot driven via a wireless 360 controller. Currently we have it working via a Laptop, passeing data to an arduino, then to the digital/analog IO on teh DS, however, this is inefficient, and slow. Is ther a way i can directly communicate from a laptop to the DS (or maybe even to the robot with wifi???".

I'm not 100% sure, but cant i send an array of bytes through a digital port from a serial port on the laptop (wit the proper hard ware of course)?? How do I do that?

Can i use teh second ethernet port, and send data that way?
Reply With Quote
  #2   Spotlight this post!  
Unread 04-11-2009, 06:46
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: Communicating with a laptop

To have the laptop control the robot directly, take a look at [Dave Flowerday]'s virtual driver station software.

For information on sending serial data through the DS's digital inputs, check out this prior discussion.

--Ryan
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Reply With Quote
  #3   Spotlight this post!  
Unread 30-11-2009, 07:54
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,088
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Communicating with a laptop

Also keep in mind that there is a full network stack in vxWorks, so you can communicate over the network too using traditional socket programming. We put a lightweight webserver on our bot so we can control it by accessing a webpage.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #4   Spotlight this post!  
Unread 06-12-2009, 00:27
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Communicating with a laptop

So using the socket programming in vxWorks you can set up a socket on your laptop and a socket on your laptop and communicate with the two?

What about the user data packet already sent back to the robot from the DS? Is there any way to access that?
__________________
Reply With Quote
  #5   Spotlight this post!  
Unread 06-12-2009, 00:33
virtuald's Avatar
virtuald virtuald is online now
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,088
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Communicating with a laptop

Quote:
Originally Posted by slavik262 View Post
So using the socket programming in vxWorks you can set up a socket on your laptop and a socket on your laptop and communicate with the two?
Yes. If you've done sockets before, this is probably the most flexible way to go. Probably not legal to use during a competition though.

Quote:
What about the user data packet already sent back to the robot from the DS? Is there any way to access that?
Yes, look into the dashboard class. The official dashboard stuff is done in labview, but I know I saw some threads about someone who made one in C# or C++ or something...
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #6   Spotlight this post!  
Unread 06-12-2009, 00:41
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Communicating with a laptop

I'm not a huge fan of LabVIEW... I'm kind of a C++ guy. Would sending data back using the DS be legal in competition?
__________________
Reply With Quote
  #7   Spotlight this post!  
Unread 06-12-2009, 09:25
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Communicating with a laptop

Quote:
Originally Posted by slavik262 View Post
I'm not a huge fan of LabVIEW... I'm kind of a C++ guy. Would sending data back using the DS be legal in competition?
It was legal last year. That's exactly what the Dashboard packets are for.
Reply With Quote
  #8   Spotlight this post!  
Unread 06-12-2009, 09:29
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Communicating with a laptop

Sorry, I misspoke. How could a laptop get access to the DS packets going back to the robot so that the laptop can communicate to the robot without using LabVIEW?
__________________
Reply With Quote
  #9   Spotlight this post!  
Unread 06-12-2009, 12:55
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Communicating with a laptop

Quote:
Originally Posted by slavik262 View Post
Sorry, I misspoke. How could a laptop get access to the DS packets going back to the robot so that the laptop can communicate to the robot without using LabVIEW?
I misunderstood the question anyway. Sending arbitrary data to the robot is not supported by the Dashboard protocol; it's one-way UDP from the robot only.
Reply With Quote
  #10   Spotlight this post!  
Unread 06-12-2009, 14:03
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Communicating with a laptop

Thanks for clearing up the confusion. And using sockets during competition would probably be illegal. That's unfortunate... I was hoping for two-way communication. Oh well... at least we can have it for debugging.
__________________
Reply With Quote
  #11   Spotlight this post!  
Unread 06-12-2009, 19:36
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,590
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Communicating with a laptop

Last year, I did not find any rule that made it illegal to use your own socket interface to communicate from the dashboard to the robot. It would be very easy for FIRST to firewall off unnecessary ports (I don't know if they did or not). There was a few questions on the Q/A about what ports were open, but there was never an adequate answer.
Reply With Quote
  #12   Spotlight this post!  
Unread 11-12-2009, 10:18
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Communicating with a laptop

So we shouldn't completely rule it out then, but try to get a better answer to whether FIRST will allow us to use sockets?

Also, if it wouldn't be too inconvenient, would you kindly give me a link to the networking API for VxWorks? I'm browsing around in the library documentation but dont' know where to look.

EDIT: Is this what I'm looking for?

http://www.slac.stanford.edu/exp/gla...ckLib.html#top
__________________

Last edited by slavik262 : 11-12-2009 at 10:35.
Reply With Quote
  #13   Spotlight this post!  
Unread 12-12-2009, 08:41
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Communicating with a laptop

yes, that is the docs.
see http://www.chiefdelphi.com/forums/sh...ad.php?t=72874 and download the link on the 4th post for a small library using sockLib
the man documentation is also in C:\WindRiver\vxworks-6.3\man\cat1\sockLib.1
and C:\WindRiver\vxworks-6.3\man\cat2\functionname.2
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #14   Spotlight this post!  
Unread 05-01-2010, 11:00
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Communicating with a laptop

Sorry to bump this, but where is the Q & A where we can ask about using sockets? Will it be on the FRC website once competitions start up?
__________________
Reply With Quote
  #15   Spotlight this post!  
Unread 05-01-2010, 15:06
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Communicating with a laptop

Quote:
Originally Posted by slavik262 View Post
Sorry to bump this, but where is the Q & A where we can ask about using sockets? Will it be on the FRC website once competitions start up?
FIRST forums for official answers
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inventor Install with Vista64 Laptop??? Ziaholic Inventor 9 11-01-2009 23:52
Control a vex with a laptop? antiNeo Programming 17 24-06-2008 12:51
Help: IFI loader not communicating with control unit red_alert_13 Programming 9 20-01-2006 17:30
Problem with communicating with STAMP through serial port Skabana159 Technical Discussion 2 06-02-2003 21:10


All times are GMT -5. The time now is 13:30.

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