Comments (16)
I don't own an Xbox controller, so I can't test it. Can you patch the pygame implementation so it's correct? The implementation seems to be pretty straightforward: https://github.com/robotpy/pyfrc/blob/master/lib/pyfrc/sim/pygame_joysticks.py
from pyfrc.
Okay, I'll see if I can.
E/ Scratch what i said before in this comment. Solved that problem, not the problem of this issue.
On Sun, Jan 10, 2016 at 3:06 PM, Dustin Spicuzza [email protected]
wrote:
I don't own an Xbox controller, so I can't test it. Can you patch the
pygame implementation so it's correct? The implementation seems to be
pretty straightforward:
https://github.com/robotpy/pyfrc/blob/master/lib/pyfrc/sim/pygame_joysticks.py—
Reply to this email directly or view it on GitHub
#40 (comment).
from pyfrc.
E/ scratch this as well, getAxis is different than getRawAxis.
Sorry, its been a year! D:
from pyfrc.
Where would I find this locally? there is no C:\Python34\Libs\pyfrc folder
from pyfrc.
It would be C:\Python34\Libs\site-packages\pyfrc
. But even better, what I would do is the following:
py -3 -m pip uninstall pyfrc
git clone https://github.com/robotpy/pyfrc.git
cd pyfrc
py -3 -m pip install -e .
This will install pyfrc in 'develop' mode, which means any changes you make in the git repository will automatically show up when you do a 'import pyfrc'.
See setuptools develop mode docs for more details.
from pyfrc.
Also, have you tried using XBoxController object?
from pyfrc.
Good question. You can delete the .deploy_cfg file. Should probably have an option to change it.
from pyfrc.
Yeah I found that file after some digging around. Maybe something in the
eclipse plugin, either a config option for "team IP address" or just a
"Deploy to new IP" would be good.
Also, after some tests, getRawAxis fixes my bug with the real robot but it
still shows the same issues in the simulator. XboxControiller did not solve
the issue either (its just a wrapper for getRawAxis anyway).
I looked in that directory and did not find pyfrc. Turns out that pyfrc
installed itself in the python 3.5 directory instead of the 3.4 (I
installed 3.4 over 3.5 because of issues with pygame), so I reinstalled
pyfrc in 3.4 and it seems to be correct now. I'll report back if I'm able
to find out why the discrepancy exists.
Also, for future reports, would you rather me communicate over the relevant
github repository or ChiefDelphi? I've been using github for a while so it
is pretty much second nature.
On Mon, Jan 11, 2016 at 12:48 PM, Dustin Spicuzza [email protected]
wrote:
Good question. You can delete the .deploy_cfg file. Should probably have
an option to change it.—
Reply to this email directly or view it on GitHub
#40 (comment).
from pyfrc.
github is preferred. I have a note somewhere to make a team IP address option available.
Are you using the eclipse plugins? I had found they weren't very useful so I haven't upgraded them for 2016.
from pyfrc.
Yes. I can't figure out how to make the "run" button actually work instead of using "run as" but other than that they are useful for me. I like to close out of tabs constantly so I end up closing the command line tab to deploy code and whatnot which is why I switched to the GUI version. (I also already had eclipse installed for work).
from pyfrc.
So there was really no way to ACTUALLY fix the issue, because pygame uses DirectInput and the driver station uses XInput (that may be backwards... but you get the issue).
My fork of the repo has a workaround fix for this- https://github.com/Arhowk/pyfrc
Basically, it added 2 to the maximum axes count than checked if it hit the axes maximum, than its probably an xbox controller and it will move the axes around accordingly.
There are a few issues..
- Triggers dont behave EXACTLY like in the robot. In the robot, both triggers are independent. In the sim, you can only have one held at a time. I have no way to fix this but its quite a rare scenario in which an issue arises.
- Controllers with 5 axes automatically get setup to be xbox controllers. Most 6 axis controllers are xbox or xbox-variant controllers anyway so, again, not a huge issue.
- The UI doesn't show axes besides X and Y properly. Not a huge issue using the controller but it removes the opportunity for xbox controllers to be played with via the interface if you don't have an xbox controller
Also, its worth noting that these tests were done with my DS4W controller but it has the same exact axis layout as an xbox controller.
from pyfrc.
Addition: current pysim has no POV support. (need todo)
from pyfrc.
Added POV support in 2016.1.3, but not in pygame support. The math is a bit messed up if you click it with a mouse, but I'm tired and don't use it. PR accepted. :)
from pyfrc.
Hm? wpilib.Joystick already had a getPov() but it returned nothing on the
sim
On Wednesday, January 20, 2016, Dustin Spicuzza [email protected]
wrote:
Added POV support in 2016.1.3, but not in pygame support. The math is a
bit messed up if you click it with a mouse, but I'm tired and don't use it.
PR accepted. :)—
Reply to this email directly or view it on GitHub
#40 (comment).
from pyfrc.
If you upgrade, you'll see a POV thing you can click on in the simulator.
from pyfrc.
Closing due to age.
from pyfrc.
Related Issues (20)
- Vision Simulator Referencing Old PhysicsInterface
- Remove exec from frcRunRobot.sh HOT 2
- Provide mechanism to pass git hash / other things as part of deploy HOT 14
- pyfrc.physics.core uses deprecated imp module HOT 1
- [BUG]: tests do not clear solenoid usage
- [BUG]: slow deploy HOT 2
- [BUG]: VisionSim computes the angle in radians HOT 1
- Add mypy or pyright checker on deploy HOT 1
- PhysicsEngine should be a Protocol for type checking HOT 3
- pyfrc tests don't work with pytest-xdist HOT 1
- Change pkg-resources stuff to not require strict versioning HOT 1
- Read team number/robot hostname from pyproject.toml HOT 1
- Basic tests don't run on blue or red alliance HOT 1
- Deploy fails because os.getlogin fails HOT 3
- [BUG]: Tests and Debugger don't get along well. HOT 1
- [BUG]: impossible to use profiler subcommand on sim
- [BUG] Cleanup doesn't occur correctly if tests fail HOT 1
- Run tests in subprocess instead of reloading robot code
- [BUG]: wpilib.SendableChooser subscriptions not cleaned between tests
- [BUG]: 2 second timeout on robot init is occasionally hit in tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyfrc.