|
Re: RobotPy: Python for FRC
Hmm. I checked out from the git repository just this morning. However, all the other files seem to match the most recent changeset, so maybe it's a client-side issue.
Anyways, I'm happy to report that I've finished porting last year's code to Python, and as a separate project, modified our existing C++ code to load Python to run an autonomous script that our drive team can edit while queuing for a match with alliance members, with surprising ease. I copied the RobotPy/Python directory and the wchar.h and wchar.c files into the old directory, expanded the include paths to include the root directory (containing the wchar files), /Python/, and /Python/Include/, and compiled. In our autonomous method I put the contents of RobotTask(), replacing ROBOTPY_BOOT with the path (on the robot) to our Python autonomous script. Then I uploaded the resulting .out file to the robot, leaving the existing Python libraries intact.
NetConsole shows many error messages about duplicate symbols when Autonomous mode starts, probably as a result of linking WPILib to the C++ code and also loading the _wpilib.out from RobotPy. However, WPILib also throws (fatal) "resource resuse [sic]" errors when WPILib instances from the Python code are not properly deleted before the script ends and the same resources are used in teleoperated code. I'm still resolving the kinks in WPILib on Python, but Python itself runs fine.
|