Java Python COMP4620/8620: Advanced Topics in ML – Intelligent Robotics
Semester-2 2024 – Assignment 1
Due date: Monday, 26 August 2024 10.00am Canberra time
Grace period: 5 hours after the due date
Late submission: Not permitted
Please read the following notes first before starting to work on the assignment.
1. This is an individual assignment.
2. The maximum total mark for this assignment is 100 points
3. This assignment consists of two parts: Part A and Part B. Part A contains conceptual questions only. The maximum total mark for Part A is 30 points. Part B contains conceptual questions, programming and analysis. The maximum total mark for Part B is 70 points.
4. Submission Instruction:
(a) You can write your program in a programming language of your choice.
(b) You must submit all of your source codes. If your program consists of multiple files, you must place all files under a single folder, compress the folder into a single file with one of the following extensions: .zip or .7z or .tar.gz, and submit this compressed file. If your program consists of multiple files in multiple folders, your compressed file should preserve the folder structure.
(c) In your selection of programming language and in compressing the files, you must con- sider that during the demo, you will need to download your submission, extract your source codes, compile (if needed), and run the program in front of the tutor marking your assignment without making any changes to the source code.
(d) All non-programming parts of the assignment must be written in a single .pdf file.
(e) The two files (source codes and .pdf) must be submitted via wattle before the due date.
(f) Late submission is NOT permitted. However, we provide a 5 hours grace period. Within the grace period, you can still submit your assignment. However, after the grace period ends, you will NOT be able to submit your assignment.
5. Information about the in-person demo will be announced in the class forum.
PART A
The questions in this part aim to explore the relation between distance in the C-space and in the workspace.
To achieve the above objective, consider a planar kinematic chain robot as illustrated in Figure 1. It has a static base, K ro- tational joints and K links. Each joint is represented as a point. Each link is a straight line segment with length L. It has two end-points, called the origin and the extremity points. The po- sition of the origin of the first link is fixed. The origin of the ith link for i ∈ [2; K] coincides with the extremity of the (i-1)th link at a joint point. The robot operates in a 2D workspace populated by a set of obstacles Obs.
Figure 1: An illustration of the planar kinematic chain robot.
A configuration of the above robot can be represented by q = (θ1 ; θ2 ; · · · ; θK ), where θi ∈ [0; 2π) is the joint angle that defines the angle (in radian) between the base and the first link for i = 1,and between the ith and (i − 1)th link for i = [2; K]. The C-space of this robot can be represented as the space RK .
In addition, let us define the C-space distance between two configurations, q = (θ1 ; θ2 ; · · · ; θK ) and q/ = (θ1(/); θ2(/) ; · · · ; θK(/)), as: dC (q; q/) = max1≤i≤K jθi − θi(/)j. This distance metric is often used in motion planning because it is faster to compute, compared to the typical Euclidean distance. Please answer the following questions.
1. [20 pts] Given 2 configurations, q = (θ1 ; θ2 ; · · · ; θK ) and q/ = (θ1(/); θ2(/) ; · · · ; θK(/)), let us assume
the robot moves from q to q/ along a straight line segment qq/ in the C-space. It is known that during such a movement, all points on the robot traces a path of length less than or equal to α · dC (q; q/), where α is a constant that can be upper bounded in terms of the link length L and the number of links K. Please find this upper bound of α and expressed them in L and K. Please provide its derivation. Hints are available in the last page.
2. [10 pts] Now, recall that the workspace distance dW (q; Obs) between the configuration q and obstacles Obs in the workspace is defined as the distance between the closest pair of points on the robot placed at configuration q and Obs. Please find the radius τ of the neighbourhood Neigh(q) = {q/ j dC (q; q/) ≤ τ} that will guarantee the robot can move from configuration q to q/ (for any q/ ∈ Neigh(q)) collision-free, following a straight line path qq/. Please express τ in terms of the upper bound COMP4620/8620: Advanced Topics in ML – Intelligent Robotics Semester-2 2024 – Assignment 1Matlab α from A.1. and dW (q; Obs).
PART B
The questions in this part aim to provide hands-on experience and better understanding of Sampling- based Motion Planning. To this end, let’s consider K rigid-body sphere robots are navigating a 3D workspace [−50; 50] × [−50; 50] × [−50; 50] ⊂ R3 populated by obstacles in the shape of cubes. And suppose each robot can only translate. Please answer the questions below.
1. [5 pts] Please specify the C-space of the K robots. Assume that the origin of the coordinate system of each robot is at the center of the sphere.
2. [35 pts] Please write a sampling-based motion planning program for centralised planning of the robots. A collision-free path here means the robot will not collide with the obstacles and other robots. Please implement either PRM with any one or more sampling strategies discussed in class, EST, or RRT. You can use and extend the collision check methods discussed in the past two weeks tutorials. Note that an edge in a graph/tree in Sampling-based Motion Planning represents a straight line-segment in the C-space, which in this case represents K (sub-)paths for K robots. We assume all robots move in such a way that they spend the exact same duration and use constant velocity to traverse theirrespective (sub-)paths, though the velocity used by diferent robots may difer.
The input to your program must be a text (.txt) file and follows the format below.
(a) The file consists of K + jObsj + 2 lines, where K is the number of robots and jObsj is the number of obstacles in the environment.
(b) The first line contains two numbers separated by a single white space. The first number in this line is the number of robots, whilst the second number is the number of obstacles.
(c) The second line consists of K numbers, each separated by a white space. The ith number in this line is the radius of robot-i.
(d) Each of line-3 to line K + 2 contains 6 numbers, which specifies the initial and goal con-
figurations of the ith robot, where i = lineNumber 一 2. The format of each line is:
InitialConf X InitialConf Y InitialConf Z ; GoalConf X GoalConf Y GoalConf Z
(e) Each of line K + 3 to line K + jObsj + 2 contains 4 numbers separated by a white space, which specifies the position of the center point and side length of the jth obstacle where j = lineNumber 一 (K + 2) The format of each of these lines is:
CenterPt X CenterPt Y CenterPt Z SideLength
The output to your program must be a text (.txt) file that specifies the collision-free path (a sequence of line segments) for the robots to move from the given initial to goal configurations. The format of the output file is as follows.
(a) The file consists of n + 2 lines, where n is the number of line segments in your path (b) The first line is the number of line-segments
(c) The second line consists of 3K numbers, specifying the initial configuration of each of the K robots. Each configuration is separated by a semicolon, while each number in a configuration is separated by a white space. Specifically, the format of line-2 is:
ConfRobot-1 X ConfRobot-1 Y ConfRobot-1 Z ; ConfRobot-2 X ConfRobot-2 Y ConfRobot-2 Z ; · · · ; ConfRobot-K X ConfRobot-K Y ConfRobot-K Z
(d) The next n lines are the end configuration of each line segment. Each of these lines consists of 3K numbers and uses the format as specified for line-2 of the output file (above item)
During demonstration, we will test the correctness of your program. For this purpose, we will provide three problems and give your program up to 1 minute to solve each problem.
3. [12 pts] Please evaluate the required time that your program needs to solve queries (i.e., find collision free paths) as the number of robots increases. For this purpose, please run your pro- gram for K = {1; 3; 5; 7} on the same environment of your design. For each value of K, you should run for at least 10× to gather the average and 95%-confidence interval of the time to solve queries. If the time to find the solution is too long, you can put a limit on the run-time and record the success rate of solving queries within the given time, in addition to the time to solve queries. Please explain your selection of the environment, compare the results for the diferent K and explain your findings.
4. [12 pts] Please evaluate the performance of your program as the problem becomes more com- plex. To this end, please use K = 3 but alter the testing environment systematically, so as to tease out the complexity of sampling-based motion planning (hint: the concept of ∈; α; β could be useful in this design). For each environment, you should run for at least 10× to gather the average and 95%-confidence interval of the time to solve queries. If the time to find the solution is too long, you can put a limit on the run-time and record the success rate of solving queries within the given time, in addition to the time to solve queries. Please explain your selection of the environments, compare the results for the diferent environment, and explain your findings.
5. [6 pts] What do you think can be done to improve the performance you get in B.3 and B