Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MEC8057 Mechatronics and Robotics : Assignment

Introduction

You are required to develop an autonomous robot to work in a hospital. This assignment is based on a previous European project in which Newcastle University was involved:

https://cordis.europa.eu/project/id/045254

Your particular task will be to develop a delivery robot, the assignment specification for what is required is given

below. Your work will be submitted as a video presentation of your accomplishments. The marks indicated below are the maximum marks for each section, there are 100 marks available in total.

Assignment specifications - criteria

1) Webots Simulation Task (30 marks)

The Webots part of the assignment is as follows. Note that you should write only one program to complete all the required tasks. You should fully label your code with comments using //.

a) In Webots, create a simulated hospital environment. This should be approximated as follows:

.   Create a room of size 15m x 15m with a floor tile size of 0.5m x 0.5m. Have an area of size 10m x 10m bounded by a perimeter wall of height 0.4m. In the centre of this room, create a cylinder of radius 0.05m and height 0.001m and colour this cylinder as white. Position it to mark the centre of the room whilst not being an obstacle for the robot.

.   Construct a differential drive robot of dimensions (l,w,h) of no greater than 0.25m x 0.25m x 0.3m. This should

have only 2 drive wheels and at least one stability wheel, this stability wheel can be approximated to being a low friction sphere. You may place any sensors on the robot that you think are suitable to help complete the required tasks. Place this robot at the centre of the room.

.   Construct 6 blue boxes of various sizes but with dimensions (l,w,h) of at least 0.5m x 0.25m x 0.4m and place  these randomly at least 2m from the centre of the room. These boxes will present objects in the hospital that must be avoided.

.   Construct 2 green spheres (or balls) with a radius of 0.15m and place these randomly at least 2m from the centre of the room. These spheres represent patients that are possibly walking around the hospital. You can mimic their walking by applying a force to get them to rotate.

.   Construct 2 red cylinders with a radius of 0.15m and height 0.3m and place them in two locations in the room.

One should be within line of sight of the centre of the room and one should be out of line of sight from the centre being placed behind one of the blue boxes. These red cylinders represent hospital staff.

.   Finally construct 2 small boxes coloured cyan (a green/blue combination), of size of approximately 0.1m x 0.1m x 0.1m and place these close to the centre of the room (but far enough away not to interfere with the operation of the robot). These are packages that need to be delivered to members of hospital staff.

Note: The colouring has been arranged so that the robot will need to look for red objects but avoid other colours.

Video demonstration: Your video needs to show all these elements and you need to give a verbal description of what is being shown (there is no need to describe how you set these up).

b) Finite state diagram

The robot is to be classed as a finite state machine with the following states:

.   State 1: Wait for 10s

.   State 2: Move in a figure of 8 (this movement is one complete circle clockwise and then one complete circle anticlockwise  keep the radius of these circles to less than 1m)

.   State 3: Look for a member of hospital staff (you should be looking for a red object)

.   State 4: Deliver package (wait for the package to be removed)

.   State 5: Reverse for 1 second (the robot should automatically avoid collisions but if something collides with it,

then it should back up – this can be demonstrated in your video by rolling one of the green spheres (patients) into the front of the robot).

.   State 6: Return to home position, this home position being the centre of the room marked with the white cylinder.

Note: This is the minimum number of states that you need. You may add more states if you wish if you find that offers a better solution to the problem specification.

The robot should start in the centre of the room on the white flat cylinder. It should be in state 2 for one complete figure 8 movement and then move into state 1 to wait for 10s. It should keep repeating this state 2 then state 1 cycle unless an object is placed on top of it whilst it is in state 2.

If an object is placed on the robot it should go into state 3 and look to find a red coloured member of staff. It should approach them but stop just before colliding with them (this will be the point where a camera image will be mainly   filled with red pixels). Once the person is found, it should then move into state 4 and once the package is delivered,  it should go into state 6.

When in state 6 and it returns to the home position, it should then go into the state 2 / state 1 repeating cycle until another delivery is needed. It should avoid colliding with objects at all times when in states 3 and 6. If something collides into it, it should go into state 5 before returning back to the state in which it transitioned from.

Video demonstration: Draw out an appropriate finite state diagram for this problem and give a clear verbal description of how it operates.

c) Program your finite state diagram into Webots using event driven programming. Use switch case statements in the main program loop to act on appropriate states and events. Note that you will need to poll devices on Webots rather than use interrupts. Run the simulation to demonstrate the full functionality of your robot. The robot is required to successfully deliver two packages with the robot returning to the home position after each delivery.

Note: When placing or removing the package (cyan box), pause the simulation and place/remove the box from the top of the robot, then resume the simulation.

Note: Once a red member of staff has received a package and the robot is returning home, pause the simulation    and place this member of staff and corresponding package outside of the perimeter wall. This will prevent further packages being delivered to the same person.

Video demonstration: The coding for the main program for each state should be shown and explained and the simulation ran demonstrating successful implementation of each state and transition. You will need to verbally explain what you are demonstrating. You should aim to show two deliveries and at least one patient colliding with the front of the robot.

2) Tinkercad Prototype Task (20 marks)

The Tinkercad part of the assignment is as follows.

a) The robot should contain a flex sensor to measure an object being placed on top of it. This flex sensor will change  from 30 ka when unloaded to 33 ka when loaded. Design a circuit to convert the resistance change in the sensor to  a voltage of approximately 0V (when unloaded) to approximately 5V (when loaded). Feed this output voltage into an Arduino and display a message on the serial comms to show if an object has been placed on the robot.

Video demonstration: Build this circuit on Tinkercad and demonstrate its functionality. Give a verbal description of how the circuit works.

b) Using Tinkercad, construct the complete circuit that would replicate you constructing the electronics for your robot. The electrical circuit should simulate as many components as possible used in the Webots program including any motors and sensors (including the force sensor developed in part 2a). Show a schematic for this circuit.

Note: Parts that are not available on Tinkercad can be approximated for the purpose of this demonstration, for example you can use switches or type in values into the serial comms to replicate a sensor signal.

Video demonstration: Show the completed build of this circuit on Tinkercad and show a schematic of it. Circuit and program functionality will be demonstrated in part 2c.

c) In your Tinkercad simulation, program the Arduino controller to replicate the controller used in the Webots model. Your program code should replicate the coding structure used in Webots as much as possible, for example write an Arduino function to replicate the Webots wb_motor_set_velocity(motor, speed) command, etc for the other functions. You may use polling for sensor interrogation (to replicate your Webots code) but in your description, discuss whether an interrupt would be a better option in particular cases.

Video demonstration: To demonstrate your code, you should run the simulation and monitor the speed of the motors to show that the robot is functioning as required, for example different wheel speeds when in state 2, zero wheel speed when in state 1, etc for all states and transitions. The Webots coding should be shown alongside your Arduino coding in your video submission to demonstrate their similarity. Give a verbal description of how the circuit works. You may wish to display the current state in the serial comms window to add clarity to your demonstration.

3) Inventor Design Task 4 (20 marks)

You need to produce a full mechanical assembly drawing of your robot in Inventor. Your structure should be structurally robust without being excessively heavy. Be sure to include good design practises, for example bearings in suitable places to support loads (packages may be heavy). You do not need to add individual wiring but wire tracking should be indicated by appropriate cabling structures in your design (for example holes in the chassis to feed wires through). Any parts that would need custom manufacturing needs to be accurately drawn. Specialist parts (for example Arduino, sensors, etc) can be approximated by a box of similar dimensions.

Video demonstration: In your presentation, show an assembly of your complete robot clearly highlighting each important feature in the design. Discuss why you have chosen to design/position them in this way. Then choose one custom part of this assembly and show a full engineering drawing for that one part, indicating any tolerances required.

4) Security Design Task (30 marks)

On completion of this first prototype, you decide you would like to add some additional security features to your design. These do not need to be implemented in Webots or Tinkercad but should be design for potential future use.

a) At present, you robot only recognises hospital staff and not individuals so the next prototype should include this. Ideally this would be face recognition but for simplicity, we will image that each staff member wears a red shirt with the number 0 to 9 printed on it in white. Your robot needs to identify this number.

Design a neural network on Matlab to identify a white number on a red background. The network should consist of only one convolution layer. Characterise your network for accuracy with the available training data and then check it for functionality by seeing it will recognise an image of a number you have produced. This number should be the last digit of your student number.

Video demonstration: You should demonstrate the structure of your network using the Matlab Deep Network

Designer App to visualise what you have constructed. Give a verbal explanation of why you have included each layer and also discuss the accuracy of your network, both in terms of training data and your supplied image. Use a confusion matrix to demonstrate this accuracy. Be sure to indicate your student number during the presentation.

b) The only problem with face or shirt recognition is the limited accuracy of AI. Therefore as an additional safety feature, each member of hospital staff is to be allocated with a flashing LED indicator, this flashes at a frequency of WXYZ Hz where WXYZ is the last 4 digits of your student number (note if W=0 then you should use a frequency of 10XYZ). The robot should contain a sensing circuit to detect this frequency and only release the package if this frequency is detected. You may assume the signal is received on a photodiode which is equivalent to an a.c. current   source of 0.1 mA and this signal should be converted to a d.c. value of 5V with very little ripple (very little fluctuation in the 5V output). Design both send and receive circuits on MultiSim and demonstrate their functionality.

Video demonstration: You should give a clear working demonstration of each part of your circuits and clearly discuss what each part of the circuit is doing. Be sure to use an oscilloscope at each relevant point in your circuit to show that it is functioning correctly at this point. Be sure to indicate your student number during the presentation. You may assume you have a ±12V supply available to drive your circuit.

Submission

You need to produce a single video presentation of your work of length up to 12 minutes (10 minutes to 14 minutes will be acceptable, over 14 minutes will be penalised). You are only allowed to submit one video presentation. The video should show simulations running, details of design, coding and a voice over explaining what is happening.

You need to submit your video to Canvas by no later than 9am on Monday 26th  February 2024. You should name your file Surname_Forename.Fileformat where Fileformat is mp4. If your file size is too large to upload (i.e. significantly more than 100 MB) then you may need to use some compression software to reduce the size of your file.

Additional points:

.   It is very important to demonstrate functionality of your designs (i.e. it actually works on the simulators). You

should show your Webots simulation running as one single simulation to prove it works continuously, however you may wish to speed parts of it up (simulate at a faster speed) for aspects such as search for staff, etc. For TInkercad, you need to show the full circuit and coding but if the simulation is running excessively slow, you can demonstrate functionality by deleting out parts of your circuit or code to demonstrate this part – you will need to fully explain what you have done in the verbal description.

.   Even if some parts of your solutions are not working, you should try and demonstrate how far you got with this aspect. We want to see how much work you have done and give you credit for it.

.   Make sure your video is sharp (we will need to be able to read any text on the screen) and voice over is clear. Be sure to use your own voice in the presentation (rather than an AI generated voice) as we will use this to verify it is your submission.

.   You will be penalised 10% for every minute (rounded up to the nearest minute) that you are over 14 minutes. For example a video of 14:03 will be penalised by a 10% reduction in the overall assignment mark, a video of 16:01 will be penalised by a 30% reduction, etc. The video will have a label on it indicating its length, we will use this as  the indicator of presentation time (and not when you start/stop talking). We will not watch or mark any content after the 14 minute point.

.   You will not be able to ask academic staff any technical questions about the assignment, i.e. how to do

something. However you may post any non-technical questions on the discussion board if there is something that is not clear about the assignment (note that unless this is a personal issue, this must be posted on the discussion board rather than email so that everyone can see the answer). If in doubt you can always post the question and I  can reply with either an answer or with (in cases where the question is not suitable) ‘You will need to work that out for yourself’. In the latter case, the answer is probably somewhere in your tutorial notes.