程序代写代做 Project 1

Project 1
(Due on: Fri, April 17 by 8:00PM)
Figure 1 depicts a Cozmo robot (top view). Using its camera we can measure the distance ri and the angular position αi of a ground marker i. The distance ri is measured from the origin of the robot’s reference frame (depicted in red) and the angular position αi is measured from the x axis of the reference frame which is aligned with the robot’s heading. The robot is capable of keeping track of the global position (x,y) and the heading angle θ of the robot’s frame, i.e., its pose given by the triple (x, y, θ). The heading angle θ is measured with respect to the direction of ⃗i of the global coordinate system. The limits of the camera’s angular range are depicted with the dashed-dot lines.
Figure 1:
Now consider a scenario in which the robot observes a certain number of ground markers from the two poses depicted in Fig. 2. In Pose A, the robot knows its own position and heading angle, and it observes six markers at posi- tions defined by ri and αi , i = 1, 2, …6. These are as follows:
􏰘 Robot A pose (xA, yA, θ(deg)): (9.95, -1.00, 60.18)
􏰘 Robot A measurements ri:12.34, 20.28, 8.70, 7.99, 12.05, 12.92
􏰘 Robot A measurements αi(deg): 58.84, 38.78, -46.53, -7.17, 36.94, -13.77
In Pose B, the robot knows its own position and heading angle, and observes three markers at positions defined by ri and αi, i = 1, 2, 3. These are as follows:
􏰘 Robot B pose (xB,yB,θ(deg)): (11.78, 9.28, 134.07) 􏰘 Robot B measurements rj: 7.84, 10.95, 3.72
􏰘 Robot B measurements αj(deg): 42.20, -16.95, 19.22
Note that while the marker observations from Pose A and Pose B are differ- ent, some of them can correspond to the same ground markers. If (Axi,Ayi) is the position of marker i measured in the Pose A coordinate frame and (Axj , Ayj )
1

is the position of marker j measured in the Pose B coordinate frame, but ex- pressed with respect to the Pose A coordinate frame, then these coordinates correspond to the same marker if 􏰗(Axi − Axj)2 + (Ayi − Ayj)2 ≤ 1
Part a. Write a MATLAB code that converts the Pose B measurements into coordinates with respect to the Pose A coordinate frame (⃗iA,⃗jA) and computes the number of markers detected from these two poses.
Part b. Compute the number of detected markers for each of the three data sets (Data Set 2, Data Set 3, Data Set 4) posted on the webpage. Each set includes information about Pose A, Pose B and coordinates that are measured with respect to the Pose A and Pose B coordinate frames.
Example: Figure 2 is provided as an example in which the robot observes 3 markers (i = 1,2,3) from Pose A and 2 markers (j = 1,2) from Pose B. Note that the robot may label the markers differently in each pose, for example, marker 3 in Pose A is marker 1 in Pose B and marker 1 in Pose A is not observed in Pose B. The total number of markers observed in these two poses is 3.
Figure 2:
Important note: Important note: You should submit your project report through Canvas as a single pdf and all your code in a single .zip file. Make sure that the pdf document can be easily read from a laptop screen. The document should include the title “Project 1” and your name. Please DO NOT include any additional personal data such as your student ID.
2