Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 18 16:48
    virtuald commented #38
  • May 18 15:23
    KevFri opened #38
  • May 17 13:55
    virtuald opened #714
  • May 14 07:27
    auscompgeek labeled #713
  • May 14 07:26
    auscompgeek opened #713
  • May 04 18:41
    virtuald commented #151
  • May 03 04:38
    TheTripleV synchronize #12
  • May 02 16:52

    github-actions[bot] on gh-pages

    Deploying to gh-pages from @ ro… (compare)

  • May 02 16:51

    virtuald on main

    Checkout full history to allow … (compare)

  • May 02 16:50

    virtuald on gh-pages

    Fix formatting Add project link (compare)

  • Apr 30 22:33
    TheTripleV synchronize #12
  • Apr 30 22:30
    TheTripleV synchronize #12
  • Apr 30 19:10

    virtuald on gh-pages

    Improve visual layout significa… (compare)

  • Apr 30 06:24

    virtuald on gh-pages

    Set font size to match editor (compare)

  • Apr 30 06:16
    virtuald commented #4
  • Apr 30 06:16
    virtuald closed #4
  • Apr 30 06:16

    virtuald on main

    Ignore .nojekyll file on deploy Add live demo link - Fixes #4 (compare)

  • Apr 30 06:12

    virtuald on gh-pages

    Disable jekyll (compare)

  • Apr 30 06:07

    github-actions[bot] on gh-pages

    Deploying to gh-pages from @ ro… (compare)

  • Apr 30 06:06

    virtuald on main

    Copy latest commit to interacti… (compare)

Dustin Spicuzza
@virtuald
neat, cxxheaderparser live demo is now at https://robotpy.github.io/cxxheaderparser/
Vasista Vovveti
@TheTripleV
This is an issue with multiple packages. You have to do multiple imports in the same package to get things to work.
So in commandsv2 currently, after you import commands2, trying to use commands2.button.Button fails. You have to import commands2.button separately. The same thing happens in other repos too (wpimath for one off the top of my head).
Dustin Spicuzza
@virtuald
yes, that's how python generally works
Vasista Vovveti
@TheTripleV
We should make sure those imports happen. ex. commands.init should import buttons.
Dustin Spicuzza
@virtuald
I mean, we never have
I guess they're all getting imported anyways, but maybe not in all cases?
davo
@david:vovo.id.au
[m]
please don't forcibly import more modules than necessary
my team's robot code has very little RAM headroom on the RIO 1
teams should import what they use
if all of wpimath was imported, I'm pretty sure you'd actually run out of RAM
Dustin Spicuzza
@virtuald
haha, maybe
you guys should get a rio2
David Vo
@auscompgeek
heh, waiting for them to be back in stock down under
Ben Bistline
@benjiboy50fonz
@virtuald Thanks for the recognization!
This is Weaver from Ben's team now, we have been seeing an error for a while now but haven't been able to identify the cause.
Invoked with:
[-548.53] CommandScheduler loop time overrun.
[-548.53] Warning at PrintEpochs: Warning: buttons.Run(): 0.056166s
[-548.53] Subsystem Periodic(): 0.000289s
[-548.53]
[-548.53] File "/usr/local/lib/python3.10/site-packages/wpilib/_impl/start.py", line 131, in _start
[-548.53] self.robot.startCompetition()
[-548.53]
[-548.53] Exception ignored in: 'wpiutil._stacktrace._stack_trace_hook'
[-548.52] Traceback (most recent call last):
[-548.52] File "/usr/local/lib/python3.10/site-packages/wpiutil/_stacktrace.py", line 14, in _stack_trace_hook
[-548.52] return "\tat <no python frames>\n" + getStackTraceDefault()
[-548.52] TypeError: getStackTraceDefault(): incompatible function arguments. The following argument types are supported:
[-548.52] 1. (offset: int) -> str
Dustin Spicuzza
@virtuald
oops
oh, that was fixed in 54d2c90577b1d6231f0c12e8a988dacf2052b013 ... wpiutil 2022.3.1.3
you guys must not have upgraded recently? that was released in February
Weaver Goldman
@We-Gold
Hmm, we did update and try it out, maybe it didnt upgrade everything. I’ll try it out again tomorrow.
Dustin Spicuzza
@virtuald
@We-Gold which version of wpiutil do you have installed? when your robot code starts, it prints out all of the versions
Vasista Vovveti
@TheTripleV
Hiding the _impl.so in a subfolder instead of package root might stop intellisense from recommending it: https://github.com/microsoft/pylance-release/issues/1288#issuecomment-1015888759
Dustin Spicuzza
@virtuald
it would be good if we could actually support the beta this year
I suppose this is one place where a monorepo would help -- would be easier to build against non-release artifacts
I suppose we could make releases with --pre tags, or some other kind of temporary storage... wonder if you could pass artifacts easily between github actions jobs in other repos
Anthony Gelsomini
@agelsomini

When is the first beta released? Since I hope to have more time available prior to the season start I had planned to at least see what I might be able to do be done this fall in advance of the game release. Do you have any "big" plans of things to change before the season starts, ie things like cxxheaderparser that we might also want to look at?

My hope was that personally I would find it easier to contribute as smaller change sets came in from WPILib where it might be more obvious what/why things changed as opposed to a full dump in January.

Vasista Vovveti
@TheTripleV
I don't think cross repo artifacts are supported
Dustin Spicuzza
@virtuald
The beta is generally in late September
It's possible that smaller change sets will be easier to grok... but I wouldn't hold your breath, those compile errors are still going to be huge
I do plan on refactoring robotpy-build and migrating to cxxheaderparser
Dustin Spicuzza
@virtuald
I need to look harder at whether wpilib needs to launch threads via a python thread factory
wpilib.shuffleboard needs to be implemented
another big project is frc-docs integration (see https://www.chiefdelphi.com/t/robotpy-in-frc-docs-help-needed/411083)
which requires examples to be implemented
I dunno, nobody complained about anything in the feedback thread on CD, so I guess everything is fine?
Dustin Spicuzza
@virtuald
oh, we should probably try to actually do the vscode robotpy plugin too
@agelsomini have you read the recent WPILib roadmap yet? it's useful if you want to understand what's coming down the pipe
Anthony Gelsomini
@agelsomini
This in Github? https://github.com/orgs/wpilibsuite/projects/8 Or something more formal somewhere else?
Anthony Gelsomini
@agelsomini
@virtuald I like that Python at least made the slides :+1:
Dustin Spicuzza
@virtuald
yep
Matthew Bardoe
@mbardoe

I am having a problem with SpeedControllerGroup.

import commands2
import ctre
from wpilib.drive import DifferentialDrive
from wpilib.interfaces import MotorController
from wpilib import SpeedControllerGroup
import wpilib


class Drivetrain(commands2.SubsystemBase):
    def __init__(self):
        super().__init__()
        self.gyro = ctre.PigeonIMU(10)
        self.gyro.setYaw(0, 0)
        self.m_left = ctre.TalonSRX(0)
        self.m_left_2 = ctre.VictorSPX(1)
        self.m_left_3 = ctre.VictorSPX(2)
        self.m_right = ctre.TalonSRX(3)
        self.m_right_2 = ctre.VictorSPX(4)
        self.m_right_3 = ctre.VictorSPX(5)

        self.leftMotors = wpilib.SpeedControllerGroup(self.m_left, self.m_left_2, self.m_left_3)
        self.rightMotors = wpilib.SpeedControllerGroup(self.m_right, self.m_right_2, self.m_right_3)

        self.m_right_encoder = ctre.CANCoder(9)
        self.m_left_encoder = ctre.CANCoder(11)

        self.drive = DifferentialDrive(self.leftMotors, self.rightMotors)

E RuntimeError: Unable to cast Python instance to C++ type (compile in debug mode for details)

Matthew Bardoe
@mbardoe

here is the version information:

17:08:43:813 INFO : wpilib : WPILib version 2022.4.1.6
17:08:43:815 INFO : wpilib : HAL version 2022.4.1.2
17:08:43:815 INFO : wpilib : Running with simulated HAL.
17:08:43:816 INFO : wpilib : robotpy-wpimath version 2022.4.1.3
17:08:43:816 INFO : wpilib : robotpy-wpiutil version 2022.4.1.2
17:08:43:816 INFO : wpilib : robotpy-halsim-gui version 2022.4.1.1
17:08:43:816 INFO : wpilib : robotpy-commands-v2 version 2022.4.1.1
17:08:43:816 INFO : wpilib : pyntcore version 2022.4.1.0
17:08:43:816 INFO : wpilib : robotpy-halsim-ws version 2022.4.1.0
17:08:43:816 INFO : wpilib : robotpy-halsim-ds-socket version 2022.4.1.0
17:08:43:816 INFO : wpilib : robotpy-commands-v1 version 2022.4.1.0
17:08:43:817 INFO : wpilib : robotpy-pathplannerlib version 2022.2.3
17:08:43:817 INFO : wpilib : robotpy-romi version 2022.2.1.0
17:08:43:817 INFO : wpilib : robotpy-ctre version 2022.1.1
17:08:43:817 INFO : wpilib : robotpy-photonvision version 2022.1.1
17:08:43:818 INFO : wpilib : robotpy-playingwithfusion version 2022.0.4
17:08:43:818 INFO : wpilib : robotpy-navx version 2022.0.2
17:08:43:818 INFO : wpilib : robotpy-rev version 2022.0.1
17:08:43:819 INFO : faulthandler : registered SIGUSR2 for PID 55674

Dustin Spicuzza
@virtuald
@mbardoe you need to create ctre.WPI_* objects, the non-WPI versions aren't compatible with SpeedControllerGroup
that does sound like a useless error though, what OS is that on?
Dustin Spicuzza
@virtuald
filed a bug for that, we should fix the error message to be less useless: robotpy/robotpy-wpilib#714
Matthew Bardoe
@mbardoe
MacOS
Dustin Spicuzza
@virtuald
yeah, I get the same error message when I put something invalid in. Will definitely want to fix it to be a less useless error message
Dustin Spicuzza
@virtuald
FYI, I'm traveling for the next month, so I'll be only mildly available for support