Go to Post Reading Andy Bakers post- priceless :D - thoughtful [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 12 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 07-01-2014, 19:05
virtuald's Avatar
virtuald virtuald is offline
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,040
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
RobotPy 2014.1 and pynetworktables 2014.1 released

It's that time of year again! I've updated RobotPy with this year's WPILib updates. Additionally, this year I've compiled RobotPy using the GCC 4.8 linux cross-compiler instead of using Wind River. Let me know if you find any problems using this release.

pynetworktables is a python library that allows you to communicate via NetworkTables to your robot or the SmartDashboard. It has been verified on Linux and Windows platforms.

Note that RobotPy 2014.1 has not been ran on a cRio yet, and as such is marked as 'early availability'. I probably won't be able to test it until this weekend at the earliest, but I don't have any reason to think it won't work.

Github links:
Download links (RobotPy installer and pynetworktables Windows binaries):
__________________
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
  #2   Spotlight this post!  
Unread 08-01-2014, 19:46
virtuald's Avatar
virtuald virtuald is offline
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,040
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: RobotPy 2014.1 and pynetworktables 2014.1 released

I've been able to test RobotPy on a cRio running a simple program, and it works.
__________________
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
  #3   Spotlight this post!  
Unread 16-01-2014, 08:03
robobenklein's Avatar
robobenklein robobenklein is offline
Registered User
FRC #3966
 
Join Date: Dec 2013
Location: Knoxville, TN
Posts: 3
robobenklein is an unknown quantity at this point
I've tested it, working for me. Thanks, Python is my favorite language.
Reply With Quote
  #4   Spotlight this post!  
Unread 22-01-2014, 21:57
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: RobotPy 2014.1 and pynetworktables 2014.1 released

I tried to compile using python 2.7 and I got this error.


build/temp.linux-armv7l-2.7/sippynetworktablesNetworkTable.cpp:62:14: error: invalid covariant return type for ‘virtual ITable* sipNetworkTable::GetSubTable(std::string)’
ITable * GetSubTable(std::string);
^
In file included from /home/odroid/Robot/robotpy/Packages/wpilib/sip/networktables/NetworkTable.sip:57:0:
/home/odroid/Robot/robotpy/Packages/wpilib/WPILib/networktables/NetworkTable.h:179:16: error: overriding ‘virtual NetworkTable* NetworkTable::GetSubTable(std::string)’
NetworkTable* GetSubTable(std::string key);
^
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
odroid@odroid2053:~/Robot/pynetworktables$
Reply With Quote
  #5   Spotlight this post!  
Unread 22-01-2014, 21:58
virtuald's Avatar
virtuald virtuald is offline
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,040
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: RobotPy 2014.1 and pynetworktables 2014.1 released

What version of gcc are you using to compile?
__________________
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 22-01-2014, 22:10
virtuald's Avatar
virtuald virtuald is offline
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,040
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: RobotPy 2014.1 and pynetworktables 2014.1 released

Also, I'm guessing that you may not have checked out the RobotPy source code correctly. You need to (a) checkout the correct branch (2014) and (b) make sure you do your submodule update.

The GetSubtable function on my version of the code is returning a NetworkTable*, not an ITable*.
__________________
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
  #7   Spotlight this post!  
Unread 22-01-2014, 22:39
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: RobotPy 2014.1 and pynetworktables 2014.1 released

I did this:

git clone https://github.com/robotpy/robotpy.git robotpy
cd robotpy
git checkout 2014
git submodule init
git submodule update

then I did this

cd ../

git clone https://github.com/robotpy/pynetworktables.git

odroid@odroid2053:~/Robot/pynetworktables$ ROBOTPY="/home/odroid/Robot/robotpy" python setup.py build

Then I get the errors

I am using this:

odroid@odroid2053:~/Robot/pynetworktables$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.1-10ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu9)
Reply With Quote
  #8   Spotlight this post!  
Unread 22-01-2014, 22:42
virtuald's Avatar
virtuald virtuald is offline
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,040
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: RobotPy 2014.1 and pynetworktables 2014.1 released

Interesting. Seems ok. I just compiled it on my linux box with GCC 4.8, and it worked fine (though, with the x64 compiler, not the ARM compiler).

I'm using sip version 4.15.3. What version are you using?
__________________
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
  #9   Spotlight this post!  
Unread 22-01-2014, 22:47
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: RobotPy 2014.1 and pynetworktables 2014.1 released

odroid@odroid2053:~/Robot/pynetworktables$ sip -V
4.15.2
odroid@odroid2053:~/Robot/pynetworktables$
Reply With Quote
  #10   Spotlight this post!  
Unread 22-01-2014, 23:12
virtuald's Avatar
virtuald virtuald is offline
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,040
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: RobotPy 2014.1 and pynetworktables 2014.1 released

Very bizarre. Perhaps try upgrading to 4.15.4? (I'm actually using 4.15.4, now that I look at it). There is a note in the 4.15.3 changelog that they fixed something regarding virtual functions.

Also, what does your sippynetworktables... cpp look like? The class definition looks like this, and yours should be relatively identical:

Code:
class sipNetworkTable : public NetworkTable
{
public:
    sipNetworkTable(std::string,NetworkTableProvider&);
    virtual ~sipNetworkTable();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool IsServer();
    bool IsConnected();
    void RemoveConnectionListener(IRemoteConnectionListener *);
    void AddConnectionListener(IRemoteConnectionListener *,bool);
    void RemoveTableListener(ITableListener *);
    void AddSubTableListener(ITableListener *);
    void AddTableListener(ITableListener *);
    bool GetBoolean(std::string) throw(TableKeyNotDefinedException);
    void PutBoolean(std::string,bool);
    std::string GetString(std::string) throw(TableKeyNotDefinedException);
    void PutString(std::string,std::string);
    double GetNumber(std::string) throw(TableKeyNotDefinedException);
    void PutNumber(std::string,double);
    void PutValue(std::string,ComplexData&);
    bool ContainsSubTable(std::string);
    bool ContainsKey(std::string);
    NetworkTable * GetSubTable(std::string);

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipNetworkTable(const sipNetworkTable &);
    sipNetworkTable &operator = (const sipNetworkTable &);

    char sipPyMethods[17];
};
If yours doesn't look like that, then your code is out of sync for some reason.
__________________
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
  #11   Spotlight this post!  
Unread 22-01-2014, 23:29
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: RobotPy 2014.1 and pynetworktables 2014.1 released

I would have to build SIP from source. This distro only has http://packages.ubuntu.com/saucy/python-sip-dbg. I will get back to you later about the files (as in are the different)
Reply With Quote
  #12   Spotlight this post!  
Unread 22-01-2014, 23:30
virtuald's Avatar
virtuald virtuald is offline
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,040
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: RobotPy 2014.1 and pynetworktables 2014.1 released

Building sip from source is pretty simple.

Code:
<unpack it somewhere>
python configure.py
make
sudo make install
__________________
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
  #13   Spotlight this post!  
Unread 23-01-2014, 21:49
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: RobotPy 2014.1 and pynetworktables 2014.1 released

Quote:
Originally Posted by virtuald View Post
Building sip from source is pretty simple.

Code:
<unpack it somewhere>
python configure.py
make
sudo make install
That did the trick. With the latest SIP it is all working now. Thanks!
Reply With Quote
  #14   Spotlight this post!  
Unread 24-01-2014, 00:33
virtuald's Avatar
virtuald virtuald is offline
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,040
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: RobotPy 2014.1 and pynetworktables 2014.1 released

Quote:
Originally Posted by PaulDavis1968 View Post
That did the trick. With the latest SIP it is all working now. Thanks!
I'll update the docs, thanks for the feedback!
__________________
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
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 19:51.

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