Git Product home page Git Product logo

common's People

Contributors

cpaca avatar jacobjbublitz avatar johansu avatar king-shak avatar kraj011 avatar nullsnapshot avatar sudhir-c avatar vladimirkupryukhin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

common's Issues

Update gradle plugins and version

Current Gradle wrapper version is 4.8.1 but 5.0 is out.

Current GradleRIO plugin version for the robot library is 2018.06.21 but 2019.0.0-alpha-3 is out.

The GradleRIO plugin should be updated and the latest version of Gradle that GradleRIO supports should be used.

Document the Subsystem class

Describe the feature in question
Add documentation to the Subsystem class in the robot library.

Does this feature have a deadline? If so, when?

Does this feature rely on any others to be implemented first? If so, which?

Additional context

Use max centripetal acceleration instead of an arbitrary constant in order to slow down during turns in paths

Currently in order to slow down when approaching a turn in a path the trajectory constraint arcVelocityScalar is used. While it does work it can be hard to tune. Max centripetal acceleration can be used instead, it is much more intuitive to use and it is well-defined in physics.

Centripetal acceleration can be calculated using the equation A = V^2/r. The maximum velocity for an arc can be calculated by solving the previous equation for V: V = sqrt(Ar) where A is the maximum centripetal acceleration and r is the radius of the arc.

Optimize Rotation3 getRotationMatrix

Creating issue for tracking only, this is low impact and probably won't matter if/when we use a 3rd party math library anyway.

Generating a rotation matrix from euler angles can be done in-place, instead of separately creating an X, Y, and Z rotation matrix then multiplying them together.

private static double[][] getRotationMatrix(double[] eulerAngles) {
double[][] result_x = new double[][] {
{1, 0, 0},
{0, Math.cos(eulerAngles[0]), -Math.sin(eulerAngles[0])},
{0, Math.sin(eulerAngles[0]), Math.cos(eulerAngles[0])}
};
double[][] result_y = new double[][] {
{Math.cos(eulerAngles[1]), 0, Math.sin(eulerAngles[1])},
{0, 1, 0},
{-Math.sin(eulerAngles[1]), 0, Math.cos(eulerAngles[1])}
};
double [][] result_z = new double[][] {
{Math.cos(eulerAngles[2]), -Math.sin(eulerAngles[2]), 0},
{Math.sin(eulerAngles[2]), Math.cos(eulerAngles[2]), 0},
{0, 0, 1}
};
return multiplyMatrices(result_z, multiplyMatrices(result_y, result_x));
}

There appears to be an issue importing the Common class

Hi, I'm from Team 4450. We're trying to switch to swerve this year and wanted to use your code as a reference. Although as I built the class I got this error:

Could not determine the dependencies of task ':shadowJar'.

Could not resolve all dependencies for configuration ':runtimeClasspath'.
Could not resolve project :common:robot.
Required by:
project :
> No matching configuration of project :common:robot was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally but:
- None of the consumable configurations have attributes.

Not sure if I'm missing something, but any help would be much appreciated.

Add Azure CI to Verify PRs

We should add Azure CI to verify all pull requests that are proposed so that they can be automatically verified before it is merged.

Trajectory Following Example

Describe the feature in question
The Trajectory generation example you have in this repo is awesome! It would be really great if you guys would be willing to publish some sort of trajectory following using the trajectory generated in the current example!

Does this feature have a deadline? If so, when?
None

Does this feature rely on any others to be implemented first? If so, which?
None

Add gyroscope implementation for Pigeon

CTRE's Pigeon IMU is a commonly used gyroscope by FRC teams. We recently bought one for testing so it would be good to be able to integrate it with the rest of our code. To do this we need to add a driver for the Pigeon that implements the Gyroscope class.

Trajectory end point does not match path end point

Describe the bug
Trajectory end points do not match where the path ends and the velocity is not zero.

To Reproduce

  1. Create a path with multiple segments
  2. Create a trajectory
  3. Calculate ending segment of trajectory using trajectory.calculateSegment(trajectory.getDuration())
  4. Observe that the segment.translation does not equal the end of the path and that segment.velocity is not zero.

Expected behavior
segment.translation equals the end of the path and segment.velocity is zero.

Screenshots
Annotation 2019-07-05 124010

Use Kv and Ka to determine trajectory constraints instead of a constant max velocity and acceleration

Currently, to generate a trajectory a constant max velocity and acceleration is specified. While this can work, it is not ideal because when following the path the feedforward term might exceed 100%. Because the trajectory is precalculated, the feedforward term should be guaranteed not to exceed 100%. This will also for the fastest trajectory possible that the robot can follow.

Ka = 1 / max acceleration
Kv = 1 / max velocity
F = Kv * V + Ka * A

F should ideally always be equal to 1 for the fastest path. However, because error correction is needed the target value of F should be configurable in the trajectory constraints.

Move Drivetrain classes into common library

Moving the drivetrain classes into the common lib allows them to be unit tested. However, they currently use the WPILib Subsystem class which is not accessible in the common library.

Add support for using Falon 500s as angle motors with the Mk2SwerveModuleBuilder

Currently the Mk2SwerveModuleBuilder supports the CANSparkMax (Spark MAX w NEO) and generic SpeedController objects as angle motors. It would be good to add an override for TalonFX (Falcon 500) in order to take advantage of the integrated encoder and higher update rate.

In the meantime, Falcons should (meaning I think it will work) be able to be used by using the WPI_TalonFX class with the MotorType.CIM motor type. However, none of the integrated features of the Falcon will be used and the control loop will run on the roboRIO.
Example:
.angleMotor(new WPI_TalonFX(0), MotorType.CIM)

Add Limelight driver

Describe the feature in question
In order to use the limelight we have to communicate with it over NetworkTables. There is no provided "wrapper" over this communication so adding a wrapper class would be nice.

The wrapper class have methods like the following:

  • boolean hasValidTargets()
  • void setLedMode(LedMode mode)
  • void setActivePipeline(int pipeline)

This is in no way a complete list.

Does this feature have a deadline? If so, when?
2019-01-12

Does this feature rely on any others to be implemented first? If so, which?

Additional context
The Limelight documentation can be found here

Field Centric not functioning as intended.

Describe the bug
Field centric works when the robot is in certain orientations. For example, when I reset the gyroscope value, it works as in it resets the new forward backward etc. movement. When I rotate the robot 180 degrees it also works as intended. However, when rotating while moving, it is as if the robot disable field centric mode and starts moving in robot centric mode. For example, when i start rotating and move backwards, it moves towards the robot's backward position and not the driver's backward position.

To Reproduce
Steps to reproduce the behavior:

  1. Implement the example swerve code
  2. Reset gyro using button
  3. Rotate robot and move in any direction

Expected behavior
The robot should be moving forward always relative to the driver, not the robot.

Additional context
I have tried implementing both the example swerve code found in this Repo and also the example swerve code in SDS's github profile, but both have the same issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.