Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The goal of this lab is to write a software library that enables a differential drive robot to follow a simple motion patterns and then

The goal of this lab is to write a software library that enables a differential drive robot to follow a simple motion patterns and then to combine these patterns to make the robot move follow more complex paths.

Hello I would like help with this lab.

I would like some help identifying what each code means and some direction with performing the lab.

image text in transcribedimage text in transcribedimage text in transcribed

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

When you perform the following tasks, ensure that the robot is not in contact with the ground. Hold it in your hand or put it on something so that the wheels do not touch the table. 4. Ensure that the robot is not in contact with the ground; i.e. hold it in your hand or put it on something so that the wheels do not touch the table. Use the CalibrationApp application within the project to determine the zero position values for each of the left and right wheel motors. Use the application to answer the following questions: 4.1) Which motor axis corresponds to the left wheel? 4.2) Which motor axis corresponds to the right wheel? 4.3) What position' correspond to the left wheel having a maximum forward and backward velocity? 4.4) What position' corresponds the right wheel having a maximum forward and backward velocity? 4.5) What position' ranges correspond to the left wheel rotating so that the robot would move forward? 4.6) What position ranges correspond to the right wheel rotating so that the robot would move forward? 4.7) Perhaps most critically: what is the 'zero point' for the left and right wheels? 4.8) Document this calibration process in your e- Portfolio For the rest of the tasks, you will have to operate the vehicle on the floor in order to reduce the potential for disasters (the robot may fall off the table and pull your gear with at). tethered robots. Even larger scale robots are secured with a tether for communication or power. The figure above shows the AQUA robot, a tethered amphibious robot, and some of the problems associated with its tether. Tether management, and dealing with poor tether management, is a practical problem for these types of robots. When running your robot on the floor it is important that you have one of your team members keep track of the robot. If things start to go poorly the robot takes off and stretches the tether, it gets caught in itself, etc., pick up the robot. You will find it useful to sort out the tether before you turn the robot on. 6. The CalibrationMotionApp is an application that you can use to determine the appropriate velocities for linear (i.e. translational) and rotational motion for your vehicle. It is intended that your vehicle should move forward at 20cm/sec. That is, that it runs at lm every five seconds, and that when commanded to rotate 90 degrees either clockwise or counter clockwise, the robot will do this in two seconds. Use the Calibration MotionApp to determine the appropriate speeds for rotation and translational motion for your vehicle. 7. What left and right speeds did you find as appropriate in order to make this happen. Document the motion of your vehicle once you Q0 5. Move the robot and servo controller to the floor and use the supplied extension cable to power your servo. You should also want to put the laptop on the floor. This working arrangement is typical for have tuned it. 8. The program SquareApp is a program that you will complete to cause the robot to move in a square. Read through the code. You will observe that the program is based upon three methods: moveStraight(double distance), turnLeft() and turnRight(). (The method turnRight() is not used, but you will need it to complete the advanced exercises. You will need to complete these methods. moveStraight() should move the robot in the direction it is currently facing a distance (in meters) given as the argument. It should do this at 20cm/ sec. turnLeft() and turnRight() should rotate the robot 90 degrees in 2 seconds either counter- clockwise (turnLeft) or clockwise (turnRight). Hint: You should be motivated by the code provided in the calibration applications and use the calibration constants you determined in steps 3 and 4 above. Document your efforts in your e Report and include a video of the robot executing a square path around a square with sides that are 1m long. I Task List x Find All Activate... eclipse-workspace - EECS1021 Lab5/src/lab5/MotionCalibrationApp.java - Eclipse IDE DIETENCES Package Explorer X - CalibrateAp.. MotionCalibr... MotionCalibr... X ) Square.java S quare App.java EECS1021Lab4 31 package lab5; EECS1021Labs 3 public class MotionCalibrationApp src lab5 5 public static void main(String[] args) Calibrate.java CalibrateApp.java boolean debug = false; MotionCalibration.java Motioncalibration calibrate = new Motioncalibration(debug: calibrate.startMonitoring(); MotionCalibrationApp.java Square.java SquareApp.java JRE System Library [JavaSE-17] Referenced Libraries lib EECS1021 Lab5.zip_expanded EECS1021Practise LaboPart1 LT1 Sample Starter LT1 Sample Starter.zip_expanded mtutorial1 practise Outline x lab5 MotionCalibrationApp main(String(): void Console X Coverage R Problems Javadoc . Declaration No consoles to display at this time. Writable Smart Insert 1:1:0 211 M of 256M eclipse-workspace - EECS1021 Lab5/src/lab5/Motion Calibration.java - Eclipse IDE 19 - SquareApp.java " Task List x CalibrateAp... MotionCalibr... X MotionCalibr.. Square.java 1 ckage lab5; 30 port che.phidget.Hardware Interface;/ 9 blic class MotionCalibration extends Hardware Interface Find All Activate... --- Attributes private static final double SERVO_@_POSITION = 115; private static final double SERVO_I_POSITION = 115; Package Explorer X EECS1021Lab4 EECS1021Labs src lab5 Calibrate.java CalibrateApp.java MotionCalibration.java MotionCalibrationApp.java Square.java SquareApp.java JRE System Library [JavaSE-17] Referenced Libraries lib EECS1021 Lab5.zip_expanded EECS1021Practise LaboPart1 LT1 Sample Starter LT1 Sample Starter.zip_expanded mtutorial1 practise private Scanner input; private double translationSpeed; private double rotationSpeed; private long timerDelay: --Constructor public MotionCalibration( boolean debug) Outline x super(debug); this.input = new Scanner(System.in); this.translationSpeed = : this. rotationSpeed = 0; this.timerDelay = 1000; this.setTimer(this.timerDelay); -------------Timer @Override public void timerCallback() lab5 MotionCalibration AF SERVO_O_POSITION:double SERVO_1_POSITION:double input: Scanner translation Speed: double rotation Speed: double . timerDelay : long MotionCalibration(boolean) . timerCallback() : void 35 AdvancedServoPhidget servo = this.getServoBoard(); if (servo == null) System.out.println("Waiting for servo to wake up ...) this.setTimer(this.timerDelay); Console X Coverage R Problems @ Javadoc Declaration No consoles to display at this time. Writable Smart Insert 61:78: 1878 798M of 256M eclipse-workspace - EECS 1021Lab5/src/lab5/Calibrate App.java - Eclipse IDE - MotionCalibr... MotionCalibr.. Square.java DSquareApp.java : Task List x CalibrateAp.. X 1 package Lab5; 3 public class CalibrateApp Find All Activate... 5@ public static void main(String[] args) boolean debug = false; Calibrate calibrate = new Calibrate(debug); calibrate.startMonitoring(); Package Explorer X EECS1021Lab4 EECS1021Labs src lab5 Calibrate.java CalibrateApp.java MotionCalibration.java MotionCalibrationApp.java Square.java SquareApp.java JRE System Library [JavaSE-17] Referenced Libraries lib EECS1021 Lab5.zip_expanded EECS1021Practise LaboPart1 LT1 Sample Starter LT1 Sample Starter.zip_expanded mtutorial1 practise Outline x !! lab5 e Calibrate App main(String(): void Console x 2 Coverage R Problems @ Javadoc Declaration No consoles to display at this time. Writable Smart Insert 1:1:0 185M of 256M eclipse-workspace - EECS1021 Lab5/src/lab5/Square App.java - Eclipse IDE - Square.java DSquareApp.java X Task List x CalibrateAp.. MotionCalibr... MotionCalibr.. 1 package Lab5; 3 public class squareApp 5@ public static void main(String[] args) Find All Activate... boolean debug = false; Square square = new Square (debug); square.startMonitoring(); } 10 11 ) Package Explorer X EECS1021Lab4 EECS1021Labs src lab5 Calibrate.java CalibrateApp.java MotionCalibration.java MotionCalibrationApp.java Square.java SquareApp.java JRE System Library [JavaSE-17] Referenced Libraries lib EECS1021 Lab5.zip_expanded EECS1021Practise LaboPart1 LT1 Sample Starter LT1 Sample Starter.zip_expanded mtutorial1 practise Outline x lab5 SquareApp main(String(): void Console X Coverage R Problems Javadoc . Declaration No consoles to display at this time. Writable Smart Insert 1:1:0 132M of 256MM eclipse-workspace - EECS1021 Lab5/src/lab5/Square.java - Eclipse IDE - Square.java X DSquareApp.java : Task List x CalibrateAp.. MotionCalibr... MotionCalibr.. 1 package Lab5; 30 import c4e.phidget.Hardware Interface;/ 9 public class Square extends Hardware Interface 19 { Find All Activate... Package Explorer X EECS1021Lab4 EECS1021Labs src lab5 Calibrate.java CalibrateApp.java MotionCalibration.java MotionCalibrationApp.java Square.java SquareApp.java JRE System Library [JavaSE-17] Referenced Libraries lib EECS1021 Lab5.zip_expanded EECS1021Practise LaboPart1 LT1 Sample Starter LT1 Sample Starter.zip_expanded mtutorial1 practise --Attributes private static final double SERVO_@_POSITION = 115; private static final double SERVO_1_POSITION = 115; private static final double TRANSLATION_SPEER = -10; // speed needed for 28cm/5 forward linear private static final double ROTATOIL SPEED = = 0; // speed needed for 22.5 dea/ses rotational OS private Scanner inuti private long timerDelay; ---------Constructor public Square(boolean debug) Outline x super(debug); this.input = new Scanner(System.in); this.timerDelay = 1000; this.setTimer(this.timerDelay); public void turnleft() System.out.printf("Robot turning 90 degrees left:n"); !! lab5 Square A SERVO_O_POSITION:double SERVO_1_POSITION : double TRANSLATION SPEED: double ROTATION_SPEED: double input : Scanner . timerDelay : long Square(boolean) e turnLeft) : void turnRight:void . moveForward(double): vaid 350 public void turnRight() System.out.printf("Robot turning 90 degrees to the right n") 48@ public void moveForward(double distance) Console X Coverage R Problems Javadoc . Declaration No consoles to display at this time. Writable Smart Insert 16:62:481 122M of 256MU When you perform the following tasks, ensure that the robot is not in contact with the ground. Hold it in your hand or put it on something so that the wheels do not touch the table. 4. Ensure that the robot is not in contact with the ground; i.e. hold it in your hand or put it on something so that the wheels do not touch the table. Use the CalibrationApp application within the project to determine the zero position values for each of the left and right wheel motors. Use the application to answer the following questions: 4.1) Which motor axis corresponds to the left wheel? 4.2) Which motor axis corresponds to the right wheel? 4.3) What position' correspond to the left wheel having a maximum forward and backward velocity? 4.4) What position' corresponds the right wheel having a maximum forward and backward velocity? 4.5) What position' ranges correspond to the left wheel rotating so that the robot would move forward? 4.6) What position ranges correspond to the right wheel rotating so that the robot would move forward? 4.7) Perhaps most critically: what is the 'zero point' for the left and right wheels? 4.8) Document this calibration process in your e- Portfolio For the rest of the tasks, you will have to operate the vehicle on the floor in order to reduce the potential for disasters (the robot may fall off the table and pull your gear with at). tethered robots. Even larger scale robots are secured with a tether for communication or power. The figure above shows the AQUA robot, a tethered amphibious robot, and some of the problems associated with its tether. Tether management, and dealing with poor tether management, is a practical problem for these types of robots. When running your robot on the floor it is important that you have one of your team members keep track of the robot. If things start to go poorly the robot takes off and stretches the tether, it gets caught in itself, etc., pick up the robot. You will find it useful to sort out the tether before you turn the robot on. 6. The CalibrationMotionApp is an application that you can use to determine the appropriate velocities for linear (i.e. translational) and rotational motion for your vehicle. It is intended that your vehicle should move forward at 20cm/sec. That is, that it runs at lm every five seconds, and that when commanded to rotate 90 degrees either clockwise or counter clockwise, the robot will do this in two seconds. Use the Calibration MotionApp to determine the appropriate speeds for rotation and translational motion for your vehicle. 7. What left and right speeds did you find as appropriate in order to make this happen. Document the motion of your vehicle once you Q0 5. Move the robot and servo controller to the floor and use the supplied extension cable to power your servo. You should also want to put the laptop on the floor. This working arrangement is typical for have tuned it. 8. The program SquareApp is a program that you will complete to cause the robot to move in a square. Read through the code. You will observe that the program is based upon three methods: moveStraight(double distance), turnLeft() and turnRight(). (The method turnRight() is not used, but you will need it to complete the advanced exercises. You will need to complete these methods. moveStraight() should move the robot in the direction it is currently facing a distance (in meters) given as the argument. It should do this at 20cm/ sec. turnLeft() and turnRight() should rotate the robot 90 degrees in 2 seconds either counter- clockwise (turnLeft) or clockwise (turnRight). Hint: You should be motivated by the code provided in the calibration applications and use the calibration constants you determined in steps 3 and 4 above. Document your efforts in your e Report and include a video of the robot executing a square path around a square with sides that are 1m long. I Task List x Find All Activate... eclipse-workspace - EECS1021 Lab5/src/lab5/MotionCalibrationApp.java - Eclipse IDE DIETENCES Package Explorer X - CalibrateAp.. MotionCalibr... MotionCalibr... X ) Square.java S quare App.java EECS1021Lab4 31 package lab5; EECS1021Labs 3 public class MotionCalibrationApp src lab5 5 public static void main(String[] args) Calibrate.java CalibrateApp.java boolean debug = false; MotionCalibration.java Motioncalibration calibrate = new Motioncalibration(debug: calibrate.startMonitoring(); MotionCalibrationApp.java Square.java SquareApp.java JRE System Library [JavaSE-17] Referenced Libraries lib EECS1021 Lab5.zip_expanded EECS1021Practise LaboPart1 LT1 Sample Starter LT1 Sample Starter.zip_expanded mtutorial1 practise Outline x lab5 MotionCalibrationApp main(String(): void Console X Coverage R Problems Javadoc . Declaration No consoles to display at this time. Writable Smart Insert 1:1:0 211 M of 256M eclipse-workspace - EECS1021 Lab5/src/lab5/Motion Calibration.java - Eclipse IDE 19 - SquareApp.java " Task List x CalibrateAp... MotionCalibr... X MotionCalibr.. Square.java 1 ckage lab5; 30 port che.phidget.Hardware Interface;/ 9 blic class MotionCalibration extends Hardware Interface Find All Activate... --- Attributes private static final double SERVO_@_POSITION = 115; private static final double SERVO_I_POSITION = 115; Package Explorer X EECS1021Lab4 EECS1021Labs src lab5 Calibrate.java CalibrateApp.java MotionCalibration.java MotionCalibrationApp.java Square.java SquareApp.java JRE System Library [JavaSE-17] Referenced Libraries lib EECS1021 Lab5.zip_expanded EECS1021Practise LaboPart1 LT1 Sample Starter LT1 Sample Starter.zip_expanded mtutorial1 practise private Scanner input; private double translationSpeed; private double rotationSpeed; private long timerDelay: --Constructor public MotionCalibration( boolean debug) Outline x super(debug); this.input = new Scanner(System.in); this.translationSpeed = : this. rotationSpeed = 0; this.timerDelay = 1000; this.setTimer(this.timerDelay); -------------Timer @Override public void timerCallback() lab5 MotionCalibration AF SERVO_O_POSITION:double SERVO_1_POSITION:double input: Scanner translation Speed: double rotation Speed: double . timerDelay : long MotionCalibration(boolean) . timerCallback() : void 35 AdvancedServoPhidget servo = this.getServoBoard(); if (servo == null) System.out.println("Waiting for servo to wake up ...) this.setTimer(this.timerDelay); Console X Coverage R Problems @ Javadoc Declaration No consoles to display at this time. Writable Smart Insert 61:78: 1878 798M of 256M eclipse-workspace - EECS 1021Lab5/src/lab5/Calibrate App.java - Eclipse IDE - MotionCalibr... MotionCalibr.. Square.java DSquareApp.java : Task List x CalibrateAp.. X 1 package Lab5; 3 public class CalibrateApp Find All Activate... 5@ public static void main(String[] args) boolean debug = false; Calibrate calibrate = new Calibrate(debug); calibrate.startMonitoring(); Package Explorer X EECS1021Lab4 EECS1021Labs src lab5 Calibrate.java CalibrateApp.java MotionCalibration.java MotionCalibrationApp.java Square.java SquareApp.java JRE System Library [JavaSE-17] Referenced Libraries lib EECS1021 Lab5.zip_expanded EECS1021Practise LaboPart1 LT1 Sample Starter LT1 Sample Starter.zip_expanded mtutorial1 practise Outline x !! lab5 e Calibrate App main(String(): void Console x 2 Coverage R Problems @ Javadoc Declaration No consoles to display at this time. Writable Smart Insert 1:1:0 185M of 256M eclipse-workspace - EECS1021 Lab5/src/lab5/Square App.java - Eclipse IDE - Square.java DSquareApp.java X Task List x CalibrateAp.. MotionCalibr... MotionCalibr.. 1 package Lab5; 3 public class squareApp 5@ public static void main(String[] args) Find All Activate... boolean debug = false; Square square = new Square (debug); square.startMonitoring(); } 10 11 ) Package Explorer X EECS1021Lab4 EECS1021Labs src lab5 Calibrate.java CalibrateApp.java MotionCalibration.java MotionCalibrationApp.java Square.java SquareApp.java JRE System Library [JavaSE-17] Referenced Libraries lib EECS1021 Lab5.zip_expanded EECS1021Practise LaboPart1 LT1 Sample Starter LT1 Sample Starter.zip_expanded mtutorial1 practise Outline x lab5 SquareApp main(String(): void Console X Coverage R Problems Javadoc . Declaration No consoles to display at this time. Writable Smart Insert 1:1:0 132M of 256MM eclipse-workspace - EECS1021 Lab5/src/lab5/Square.java - Eclipse IDE - Square.java X DSquareApp.java : Task List x CalibrateAp.. MotionCalibr... MotionCalibr.. 1 package Lab5; 30 import c4e.phidget.Hardware Interface;/ 9 public class Square extends Hardware Interface 19 { Find All Activate... Package Explorer X EECS1021Lab4 EECS1021Labs src lab5 Calibrate.java CalibrateApp.java MotionCalibration.java MotionCalibrationApp.java Square.java SquareApp.java JRE System Library [JavaSE-17] Referenced Libraries lib EECS1021 Lab5.zip_expanded EECS1021Practise LaboPart1 LT1 Sample Starter LT1 Sample Starter.zip_expanded mtutorial1 practise --Attributes private static final double SERVO_@_POSITION = 115; private static final double SERVO_1_POSITION = 115; private static final double TRANSLATION_SPEER = -10; // speed needed for 28cm/5 forward linear private static final double ROTATOIL SPEED = = 0; // speed needed for 22.5 dea/ses rotational OS private Scanner inuti private long timerDelay; ---------Constructor public Square(boolean debug) Outline x super(debug); this.input = new Scanner(System.in); this.timerDelay = 1000; this.setTimer(this.timerDelay); public void turnleft() System.out.printf("Robot turning 90 degrees left:n"); !! lab5 Square A SERVO_O_POSITION:double SERVO_1_POSITION : double TRANSLATION SPEED: double ROTATION_SPEED: double input : Scanner . timerDelay : long Square(boolean) e turnLeft) : void turnRight:void . moveForward(double): vaid 350 public void turnRight() System.out.printf("Robot turning 90 degrees to the right n") 48@ public void moveForward(double distance) Console X Coverage R Problems Javadoc . Declaration No consoles to display at this time. Writable Smart Insert 16:62:481 122M of 256MU

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions