Programme a robot using Java -- 3

Job ID: 36102886

Budget: £20 – £250 GBP

The purpose of this program is to navigate the Swiftbot using colour codes inputted using the camera.The traffic lights have three colours; red, green and blue. You can use a coloured image instead of an actual light. The Swiftbot should respond to traffic lights when the traffic lights are within 20 cm from the Swiftbot. To start the program, the user should press button ‘A’ in the Swiftbot. This should make the Swiftbot, first, turn the underlights(bottom LEDs) to yellow, and, then, start moving forward at a low speed(initial speed)until it encounters the traffic light. The Swiftbot should respond to the traffic light when it is 20 cm(or less)ahead ofthe robot.If the traffic lightcolour is green, the underlights should be set to green and the Swiftbot should pass the traffic light within 2 seconds.You can calculate the speed that the Swiftbot should move forward by experimenting with your Swiftbot and using simple mathematics.After passing the traffic light,the Swiftbot should stop for half a second, set the underlights to yellow,and then the robot should move forward in its initial speed until it detects the next traffic light.If the traffic lightcolour is red, the underlights should be set to red and the Swiftbot should come to a stop at the traffic light. After half a second, the Swiftbot should start moving forward at its initial speed until it detects the next traffic light.If the traffic lightcolour is blue, the Swiftbot should stop for half a second, blink the underlights in blue and then,should change direction by turning 90 degrees to left.The robot should then move at a low speed for 1 second and stop.After half a second, the Swiftbot should retrace its movement and move back to the original path. Then the robot should move forward at its initial speed until it detects the next traffic light.The program should stop when the userpressesthe ‘X’buttonin Swiftbot. Before the program terminates it should ask the user whether it should display the log of the execution. If the user responds ‘Yes’, the program should display the following information:
▪The number of times the Swiftbot encountered traffic lights.
▪The most frequent traffic lightcolour the Swiftbot encountered and the numberof times the light was detected.
▪The duration of the execution.
This program should be implemented using a command-lineuser interface