Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnBotJava Basic: Omni Linear OpMode not working #808

Open
Leifian19 opened this issue Oct 31, 2023 · 1 comment
Open

OnBotJava Basic: Omni Linear OpMode not working #808

Leifian19 opened this issue Oct 31, 2023 · 1 comment

Comments

@Leifian19
Copy link

When we activate the test code from the drivers hub, it gives an error saying as follows:

java.lang.IllegalArgumentException: Unable to find a hardware device with name “left_front_drive” and type DcMotor.

I have tried changing the names of the wheels in the configuration to match the code, but it didn’t fix it.

please help (:

@gearsincorg
Copy link

gearsincorg commented Oct 31, 2023

That error means that the name you have for the device in your code does not match the one in your robot configuration. You appear to understand that, and are saying that they are the same... But it's possible you are not being fussy enough in your checking of the name.

The name in the configuration file must be EXACTLY the same as the one in the code.. so that means the they must both have exactly the same uPPer and LowER case letters, and there must be underscores and not dashes etc, and no extra spaces or other characters. It also means that the names must be assigned to DC Motors, and not servos or other devices. Please go back to your robot configuration... and tripple check. Note: you probably have to fix all 4 motors if there was a change in naming, so make sure you are not just checking only one of the motors.
.
Also... make sure you are checking the configuration that you are actually using. Sometimes there may be several configurations on a robot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants