Pilot does not move?

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

New User
Posts: 16
Joined: Thu Jun 15, 2017 1:52 pm

Pilot does not move?

Postby poulabildgaard » Sun Sep 03, 2017 10:33 am

Why does my robot not move at all? The program is running because I can turn it off using EV3 Contorl Center, but the robot is standing still.

Thanks Poul

import lejos.hardware.Button;
import lejos.hardware.motor.Motor;
import lejos.robotics.chassis.Chassis;
import lejos.robotics.chassis.Wheel;
import lejos.robotics.chassis.WheeledChassis;
import lejos.robotics.navigation.MovePilot;

public class FastDriver {

public static void main(String[] args) {
Wheel wheel1 = WheeledChassis.modelWheel(Motor.A, 81.6).offset(-70);
Wheel wheel2 = WheeledChassis.modelWheel(Motor.D, 81.6).offset(70);
Chassis chassis = new WheeledChassis(new Wheel[]{wheel1, wheel2}, WheeledChassis.TYPE_DIFFERENTIAL);
MovePilot pilot = new MovePilot(chassis);

pilot.travel(50); // cm
pilot.rotate(-90); // degree clockwise
pilot.travel(-50,true); // move backward for 50 cm


User avatar
leJOS Team Member
Posts: 6021
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Pilot does not move?

Postby gloomyandy » Sun Sep 03, 2017 1:19 pm

A few things to try...
1) Don't use Motor.A, Motor.B instead create the motor classes explicitly like this...
new EV3LargeRegulatedMotor(MotorPort.A);
2) Check that you have the motors connected correctly, do they turn if you don't use the Pilot?
3) Try setting the speed and acceleration for the Pilot.
4. Add some trace code to your program so that you can be sure that your code is actually running, display a message on the EV3 display.
leJOS news https://lejosnews.wordpress.com/

New User
Posts: 16
Joined: Thu Jun 15, 2017 1:52 pm

Re: Pilot does not move?

Postby poulabildgaard » Mon Sep 04, 2017 11:52 am

Thanks. Changing to Motor.B and Mortor.C did the trick. It has been a problem in other small programs of mine. :)

Return to “EV3 Software”

Who is online

Users browsing this forum: No registered users and 1 guest