GithubHelp home page GithubHelp logo

Comments (3)

jkenney2 avatar jkenney2 commented on August 24, 2024

Are you trying to use the road-runner-quick-start code?

If so, the issue is that the quickstart code makes use of both the roadrunner core, and additional code from acmerobotics (and some from FTC, google, etc) that is separate from the roadrunner core, and is not supported in virtual_robot.

The solution will be: 1) add some code to virtual_robot to minimize the incompatibility; then, 2) User removes a few non-critical things from road-runner-quickstart to allow virtual_robot to build.

Work on item (1) is ongoing. Will include instructions for item (2) when this issue is closed.

from virtual_robot.

jkenney2 avatar jkenney2 commented on August 24, 2024

EDITED 3/7/2023 (again)

Changes have been made to better accommodate the use of road-runner-quickstart. However, several changes to the quickstart files will still be necessary:

From the util package, delete: Logfiles.java, LoggingUtil.java, LynxModuleUtil.java, and AssetsTrajectoryManager.java.

From the drive.opmode package, delete: AutomaticFeedForwardTuner.java

In trajectorysequence.TrajectorySequenceRunner.java, comment out line 26:
//import org.firstinspires.ftc.teamcode.util.LogFiles;

In trajectorysequence.TrajectorySequenceRunner.java, comment out lines 212-217:
// if (targetPose != null) {
// LogFiles.record(
// targetPose, poseEstimate, voltage,
// lastDriveEncPositions, lastDriveEncVels, lastTrackingEncPositions, lastTrackingEncVels
// );
// }

In SampleMecanumDrive.java, comment out line 34:
//import org.firstinspires.ftc.teamcode.util.LynxModuleUtil;

In SampleMecanumDrive.java, comment out line 87:
// LynxModuleUtil.ensureMinimumFirmwareVersion(hardwareMap);

In SampleMecanumDrive.java, change the names of motors in lines 101-104 as follows:
leftFront = hardwareMap.get(DcMotorEx.class, "front_left_motor");
leftRear = hardwareMap.get(DcMotorEx.class, "back_left_motor");
rightRear = hardwareMap.get(DcMotorEx.class, "back_right_motor");
rightFront = hardwareMap.get(DcMotorEx.class, "front_right_motor");

In SampleTankDrive.java, comment out line 34:
//import org.firstinspires.ftc.teamcode.util.LynxModuleUtil;

In SampleTankDrive.java, comment out line 81:
// LynxModuleUtil.ensureMinimumFirmwareVersion(hardwareMap);

In SampleMecanumDrive.java, at the "TODO" comment, line 119, reverse the directions of the left motors:
// TODO: reverse any motors using DcMotor.setDirection()
leftFront.setDirection(DcMotorSimple.Direction.REVERSE);
leftRear.setDirection(DcMotorSimple.Direction.REVERSE);

It is necessary to provide some information about the robot in DriveConstants.java.
The following work well with the Mecanum robot configuraiton in virtual_robot:

TICKS_PER_REV = 1120
MAX_RPM = 160
RUN_USING_ENCODER = true
TRACK_WIDTH = 17.91
MAX_VEL = 28
MAX_ACCEL = 28

Also, max linear and turn velocities can be set as follows:
public static double MAX_VEL = 28;
public static double MAX_ACCEL = 28;
public static double MAX_ANG_VEL = Math.toRadians(175);
public static double MAX_ANG_ACCEL = Math.toRadians(175);

from virtual_robot.

graceliu avatar graceliu commented on August 24, 2024

from virtual_robot.

Related Issues (20)

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.