{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-16T00:12:35.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2026-04-16T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":44820,"title":"Relative pose in 2D: problem 2","description":"We consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\r\nWith respect to the robot's coordinate frame, the world frame origin is at a distance of 67.2m in the x-direction and 32.4m in the y-direction, and at a bearing angle of 42 degrees.\r\nWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: normal; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"display: block; min-width: 0px; padding-top: 0px; vertical-align: baseline; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eWith respect to the robot's coordinate frame\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003e, the world frame origin is at a distance of 67.2m in the x-direction and 32.4m in the y-direction, and at a bearing angle of 42 degrees.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function T = your_fcn_name()\r\n  % return a 3x3 matrix describing the robot's pose\r\n  T = [];\r\nend","test_suite":"%%\r\nT = your_fcn_name;\r\nassert(all(size(T)==3), 'The matrix must be 3x3');\r\nassert(isreal(T), 'The matrix must be real, not complex');\r\n\r\n%% bottom row\r\nT = your_fcn_name;\r\nassert(isequal(T(3,:), [0 0 1]), 'The bottom row of the homogeneous transformation matrix is not correct')\r\n\r\n%% x coordinate\r\nT = your_fcn_name;\r\nassert(abs(T(1,3)+71.619164)\u003c1e-4, 'The representation of the x-coordinate is not correct')\r\n\r\n%% y coordinate\r\nT = your_fcn_name;\r\nassert(abs(T(2,3)-20.88768)\u003c1e-4, 'The representation of the y-coordinate is not correct')\r\n\r\n%% valid rotation matrix\r\nT = your_fcn_name;\r\nR = T(1:2,1:2);\r\nassert( abs(det(R)-1) \u003c 0.01, 'The determinant of the rotation submatrix is not correct')\r\n\r\n%% correct rotation matrix\r\nT = your_fcn_name;\r\nR = T(1:2,1:2);\r\nassert( abs(atan2d(R(2,1), R(1,1)) + 42) \u003c 0.1, 'The rotation matrix is not correct, check your calculation of the heading SSW and whether you are using radians or degrees')\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":5,"created_by":13332,"edited_by":26769,"edited_at":"2022-04-12T14:43:28.000Z","deleted_by":null,"deleted_at":null,"solvers_count":109,"test_suite_updated_at":"2022-04-12T14:43:28.000Z","rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-06T08:01:07.000Z","updated_at":"2026-03-07T11:25:11.000Z","published_at":"2019-01-06T08:10:58.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eWith respect to the robot's coordinate frame\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, the world frame origin is at a distance of 67.2m in the x-direction and 32.4m in the y-direction, and at a bearing angle of 42 degrees.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":44837,"title":"Composing relative poses in 2D: problem 1","description":"We consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. \r\n\r\nThere is a playing field with a reference frame denoted by {F}.  The rigid-body displacement from {O} to {F} is given by the homogenous transformation |TF| .\r\n\r\nThere are two robots (robot 1 and robot 2) on the playing field, with attached body-fixed coordinate frame {B} and {C} respectively with their origins at the centre of the robot. The x-axis of each robot's frame points in the robot's forward direction.  \r\n\r\nThe rigid-body displacement of robot 1 with respect to the world frame is estimated by GPS to be the homogenous transformation |TB| .  The displacement of robot 2 with respect to robot 1 is estimated by a novel radar sensor and is given by the homogenous transformation |TBC| .\r\n\r\nWhere is robot 2 with respect to the field?","description_html":"\u003cp\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north.\u003c/p\u003e\u003cp\u003eThere is a playing field with a reference frame denoted by {F}.  The rigid-body displacement from {O} to {F} is given by the homogenous transformation \u003ctt\u003eTF\u003c/tt\u003e .\u003c/p\u003e\u003cp\u003eThere are two robots (robot 1 and robot 2) on the playing field, with attached body-fixed coordinate frame {B} and {C} respectively with their origins at the centre of the robot. The x-axis of each robot's frame points in the robot's forward direction.\u003c/p\u003e\u003cp\u003eThe rigid-body displacement of robot 1 with respect to the world frame is estimated by GPS to be the homogenous transformation \u003ctt\u003eTB\u003c/tt\u003e .  The displacement of robot 2 with respect to robot 1 is estimated by a novel radar sensor and is given by the homogenous transformation \u003ctt\u003eTBC\u003c/tt\u003e .\u003c/p\u003e\u003cp\u003eWhere is robot 2 with respect to the field?\u003c/p\u003e","function_template":"function TFC = user_function(TF, TB, TBC)\r\n  % Input:  TF a 3x3 homogeneous transformation matrix\r\n  %         TB a 3x3 homogeneous transformation matrix\r\n  %         TBC a 3x3 homogeneous transformation matrix\r\n  %         P a 2x1 vector representing the coordinate of a point\r\n  % Output: TFC a 3x3 homogeneous transformation matrix\r\n  %\r\n  TFC = ;\r\nend","test_suite":"th = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nTF = [R t; 0 0 1];\r\n\r\nth = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nTB = [R t; 0 0 1];\r\n\r\nth = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nTBC = [R t; 0 0 1];\r\n\r\n\r\n%%\r\nT = user_function(TF, TB, TBC)\r\n\r\nassert(all(size(T)==3), 'The matrix must be 3x3');\r\nassert(isreal(T), 'The matrix must be real, not complex');\r\n\r\n%% bottom row\r\nT = user_function(TF, TB, TBC)\r\nassert(isequal(T(3,:), [0 0 1]), 'The bottom row of the homogeneous transformation matrix is not correct')\r\n\r\n%% valid rotation matrix\r\nT = user_function(TF, TB, TBC)\r\nR = T(1:2,1:2);\r\nassert( abs(det(R)-1) \u003c 0.01, 'The determinant of the rotation submatrix is not correct')\r\n\r\n%% correct value\r\nT = user_function(TF, TB, TBC)\r\nTref = inv(TB*TBC)*TF*T;\r\nassert( norm(Tref-eye(3,3)) \u003c 1e-6, 'The homogeneous transform value is not correct')","published":true,"deleted":false,"likes_count":2,"comments_count":1,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":64,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-20T08:11:47.000Z","updated_at":"2026-03-08T02:06:59.000Z","published_at":"2019-01-20T08:33:16.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThere is a playing field with a reference frame denoted by {F}. The rigid-body displacement from {O} to {F} is given by the homogenous transformation\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eTF\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e .\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThere are two robots (robot 1 and robot 2) on the playing field, with attached body-fixed coordinate frame {B} and {C} respectively with their origins at the centre of the robot. The x-axis of each robot's frame points in the robot's forward direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe rigid-body displacement of robot 1 with respect to the world frame is estimated by GPS to be the homogenous transformation\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eTB\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e . The displacement of robot 2 with respect to robot 1 is estimated by a novel radar sensor and is given by the homogenous transformation\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eTBC\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e .\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWhere is robot 2 with respect to the field?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44819,"title":"Relative pose in 2D: problem 1","description":"We consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north.  There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\r\n\r\n*With respect to the world frame origin* , the robot's centre is at a distance of 123m in the x-direction and -74.6m in the y-direction.  The car's heading angle is exactly SSW.\r\n\r\nWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.*","description_html":"\u003cp\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north.  There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\u003c/p\u003e\u003cp\u003e\u003cb\u003eWith respect to the world frame origin\u003c/b\u003e , the robot's centre is at a distance of 123m in the x-direction and -74.6m in the y-direction.  The car's heading angle is exactly SSW.\u003c/p\u003e\u003cp\u003eWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.*\u003c/p\u003e","function_template":"function T = user_function()\r\n  % return a 3x3 matrix describing the pose\r\n  T = [];\r\nend","test_suite":"%%\r\nT = user_function\r\n\r\nassert(all(size(T)==3), 'The matrix must be 3x3');\r\nassert(isreal(T), 'The matrix must be real, not complex');\r\n\r\n%% bottom row\r\nT = user_function\r\nassert(isequal(T(3,:), [0 0 1]), 'The bottom row of the homogeneous transformation matrix is not correct')\r\n\r\n%% x coordinate\r\nT = user_function\r\nassert(isequal(T(1,3),123), 'The representation of the x-coordinate is not correct')\r\n\r\n%% y coordinate\r\nT = user_function\r\nassert(isequal(T(2,3),-74.6), 'The representation of the y-coordinate is not correct')\r\n\r\n%% valid rotation matrix\r\nT = user_function\r\nR = T(1:2,1:2);\r\nassert( abs(det(R)-1) \u003c 0.01, 'The determinant of the rotation submatrix is not correct')\r\n\r\n%% correct rotation matrix\r\nT = user_function\r\nR = T(1:2,1:2);\r\nassert( abs(atan2d(R(2,1), R(1,1)) + 112.5) \u003c 0.1, 'The rotation matrix is not correct, check your calculation of the heading SSW and whether you are using radians or degrees')","published":true,"deleted":false,"likes_count":3,"comments_count":7,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":174,"test_suite_updated_at":"2019-01-20T07:53:15.000Z","rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-06T07:56:12.000Z","updated_at":"2026-03-17T12:53:16.000Z","published_at":"2019-01-06T08:55:49.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eWith respect to the world frame origin\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e , the robot's centre is at a distance of 123m in the x-direction and -74.6m in the y-direction. The car's heading angle is exactly SSW.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.*\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44830,"title":"Twists in 2D","description":"So far we have represented the pose of an object in the plane using a homogeneous transformation, a 3x3 matrix belonging to the special Euclidean group SE(2), which is also a Lie group.\r\n\r\nAn alternative, and compact, representation of pose is as a twist, a 3-vector comprising the unique elements of the corresponding 3x3 matrix in the Lie algebra se(2).  The matrix exponential of the Lie algebra matrix is a Lie group matrix.\r\n\r\nGiven a homogeneous transformation, return the corresponding twist as a column vector with the translational elements first.  ","description_html":"\u003cp\u003eSo far we have represented the pose of an object in the plane using a homogeneous transformation, a 3x3 matrix belonging to the special Euclidean group SE(2), which is also a Lie group.\u003c/p\u003e\u003cp\u003eAn alternative, and compact, representation of pose is as a twist, a 3-vector comprising the unique elements of the corresponding 3x3 matrix in the Lie algebra se(2).  The matrix exponential of the Lie algebra matrix is a Lie group matrix.\u003c/p\u003e\u003cp\u003eGiven a homogeneous transformation, return the corresponding twist as a column vector with the translational elements first.\u003c/p\u003e","function_template":"function tw = user_function(T)\r\n  % Input: T a 3x3 homogeneous transformation matrix\r\n  % Outout: tw a 3x1 twist vector with translational elements first\r\n  tw = ;\r\nend","test_suite":"th = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nT = [R t; 0 0 1];\r\n\r\ntw = user_function(T);\r\n%%\r\nassert(all(size(tw)==[3 1]), 'The twist must be a 3-element column vector');\r\n%%\r\nassert(isreal(tw), 'The twist must be real, not complex');\r\n\r\n%%\r\nTT = expm([0 -tw(3) tw(1); tw(3) 0 tw(2); 0 0 0]);\r\nassert(norm(abs(TT-T)) \u003c 1e-6, 'The twist is not correct')\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":17,"test_suite_updated_at":"2019-01-10T07:12:32.000Z","rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-10T06:47:50.000Z","updated_at":"2026-02-15T06:57:38.000Z","published_at":"2019-01-10T07:12:32.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSo far we have represented the pose of an object in the plane using a homogeneous transformation, a 3x3 matrix belonging to the special Euclidean group SE(2), which is also a Lie group.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAn alternative, and compact, representation of pose is as a twist, a 3-vector comprising the unique elements of the corresponding 3x3 matrix in the Lie algebra se(2). The matrix exponential of the Lie algebra matrix is a Lie group matrix.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eGiven a homogeneous transformation, return the corresponding twist as a column vector with the translational elements first.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44824,"title":"Relative points in 2D: problem 2","description":"The 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A landmark point is observed by the robot, as a 2x1 coordinate vector P. What is the coordinate of the landmark with respect to the world coordinate frame?","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 63px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 408px 31.5px; transform-origin: 408px 31.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A landmark point is observed by the robot, as a 2x1 coordinate vector P. What is the coordinate of the landmark with respect to the world coordinate frame?\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function P = user_function(T, PB)\r\n  % Input:  T a 3x3 homogeneous transformation matrix\r\n  %         PB a 2x1 vector representing the coordinate of a point\r\n  % Output: P a 2x1 vector representing the coordinate of a point\r\n  P = ;\r\nend","test_suite":"%\r\nth = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nT = [R t; 0 0 1];\r\nPB = rand(2,1)*10-5;\r\n\r\nP = user_function(T, PB);\r\n%\r\nassert(all(size(P) == [2 1]), 'The point should be described by a 2x1 vector')\r\n%\r\nassert(isreal(P), 'The point should be described by a vector of real, not complex, numbers');\r\n%\r\nPref = R'*PB - R' * t;\r\nassert( all(abs(P-Pref) \u003c 0.001), 'The relative coordinates are not correct')\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":10,"created_by":13332,"edited_by":413679,"edited_at":"2025-12-15T20:32:55.000Z","deleted_by":null,"deleted_at":null,"solvers_count":68,"test_suite_updated_at":"2025-12-15T20:32:55.000Z","rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-10T01:16:32.000Z","updated_at":"2026-03-17T13:29:59.000Z","published_at":"2019-01-10T01:16:32.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A landmark point is observed by the robot, as a 2x1 coordinate vector P. What is the coordinate of the landmark with respect to the world coordinate frame?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":44828,"title":"Pose interpolation in 2D","description":"Consider two poses represented by homogeneous transformation matrices: |T1| and |T2|.  Write an algorithm to interpolate between these poses according to 0 \u003c= |s| \u003c= 1.  When s=0 the algorithm should return |T1| and when |s| =1 it should return |T2| .  For intermediate values of |s| it should return a proper homogeneous transformation matrix.  Orientation angle should increase in a positive (counter clockwise) direction.","description_html":"\u003cp\u003eConsider two poses represented by homogeneous transformation matrices: \u003ctt\u003eT1\u003c/tt\u003e and \u003ctt\u003eT2\u003c/tt\u003e.  Write an algorithm to interpolate between these poses according to 0 \u0026lt;= \u003ctt\u003es\u003c/tt\u003e \u0026lt;= 1.  When s=0 the algorithm should return \u003ctt\u003eT1\u003c/tt\u003e and when \u003ctt\u003es\u003c/tt\u003e =1 it should return \u003ctt\u003eT2\u003c/tt\u003e .  For intermediate values of \u003ctt\u003es\u003c/tt\u003e it should return a proper homogeneous transformation matrix.  Orientation angle should increase in a positive (counter clockwise) direction.\u003c/p\u003e","function_template":"function T = user_function(T1, T2, s)\r\n  % Input:  T1 a 3x3 homogeneous transformation matrix, initial pose\r\n  %         T2 a 3x3 homogeneous transformation matrix, final pose\r\n  %         s  a scalar between 0 and 1\r\n  % Outout: T  a 3x3 homogeneous transformation matrix, interpolated pose\r\n  T = ;\r\nend","test_suite":"th1 = 2*pi*rand - pi;\r\nt1 = rand(2,1)*20-10;\r\nR1 = [cos(th1) -sin(th1); sin(th1) cos(th1)];\r\nT1 = [R1 t1; 0 0 1];\r\nth2 = 2*pi*rand - pi;\r\nt2 = rand(2,1)*20-10;\r\nR2 = [cos(th2) -sin(th2); sin(th2) cos(th2)];\r\nT2 = [R2 t2; 0 0 1];\r\ns = 0.2 + rand*0.5;\r\n\r\nTi0 = user_function(T1, T2, 0);\r\nTi1 = user_function(T1, T2, 1);\r\nTis = user_function(T1, T2, s);\r\n\r\n\r\n\r\n%%\r\nassert(all(size(Ti0)==3), 's=0: the matrix must be 3x3');\r\n%\r\nassert(isreal(Ti0), 's=0: the matrix must be real, not complex');\r\n% bottom row\r\nassert(isequal(Ti0(3,:), [0 0 1]), 's=0: the bottom row of the homogeneous transformation matrix is not correct')\r\n%\r\nassert( max(max(abs(Ti0-T1))) \u003c 0.0001, 's=0: the interpolated value for s=0 is not correct');\r\n% translation\r\nassert(norm(Ti0(1:2,3)-t1) \u003c 0.0001, 's=0: the translation component is not correct')\r\n% determinant\r\nassert(abs(det(Ti0)-1) \u003c 1e-6, 's=0: the rotation submatrix is not proper')\r\n%\r\nth = atan2(Ti0(2,1), Ti0(1,1));\r\ndth = th - th1;\r\nassert(abs(dth) \u003c 0.0001, 's=0: the rotation submatrix is not correct')\r\n\r\n%%\r\nassert(all(size(Ti1)==3), 's=1: the matrix must be 3x3');\r\n%\r\nassert(isreal(Ti1), 's=1: the matrix must be real, not complex');\r\n% bottom row\r\nassert(isequal(Ti1(3,:), [0 0 1]), 's=1: the bottom row of the homogeneous transformation matrix is not correct')\r\n% translation\r\nassert(norm(Ti1(1:2,3)-t2) \u003c 0.0001, 's=1: the translation component is not correct')\r\n%% determinant\r\nassert(abs(det(Ti1)-1) \u003c 1e-6, 's=1: the rotation submatrix is not proper')\r\n% rotation\r\nth = atan2(Ti1(2,1), Ti1(1,1));\r\ndth = th - th2;\r\nassert(abs(dth) \u003c 0.0001, 's=1: the rotation submatrix is not correct')\r\n\r\n\r\n%%\r\nassert(all(size(Tis)==3), 's=%f: the matrix must be 3x3', s);\r\nassert(isreal(Tis), 's=%f: the matrix must be real, not complex', s);\r\n% bottom row\r\nassert(isequal(Tis(3,:), [0 0 1]), 's=%f: the bottom row of the homogeneous transformation matrix is not correct', s)\r\n% determinant\r\nassert(abs(det(Tis)-1) \u003c 1e-6, 's=%f: the rotation submatrix is not proper', s)\r\n\r\n\r\n% translation\r\nTD = inv(T1) * T2;\r\nTDi = inv(T1) * Tis;\r\ndx = TD(1,3)*s - TDi(1,3);\r\ndy = TD(2,3)*s - TDi(2,3);\r\nassert(abs(dx) \u003c 0.0001, 's=%f: the x-translation component is not correct', s)\r\nassert(abs(dy) \u003c 0.0001, 's=%f: the y-translation component is not correct', s)\r\n% rotation matrix\r\nLDi = logm(TDi);\r\ndrot = LDi(2,1)  + th1*s - th2*s;\r\nwhile drot \u003e pi\r\n    drot = drot - 2*pi;\r\nend\r\nwhile drot \u003c -pi\r\n    drot = drot + 2*pi;\r\nend\r\nassert(abs(drot) \u003c 0.0001, 's=%f: the rotation submatrix is not correct')\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":28,"test_suite_updated_at":"2019-01-21T22:44:17.000Z","rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-10T06:21:41.000Z","updated_at":"2026-02-15T06:56:03.000Z","published_at":"2019-01-10T06:42:31.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eConsider two poses represented by homogeneous transformation matrices:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eT1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eT2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e. Write an algorithm to interpolate between these poses according to 0 \u0026lt;=\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003es\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u0026lt;= 1. When s=0 the algorithm should return\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eT1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and when\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003es\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e =1 it should return\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eT2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e . For intermediate values of\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003es\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e it should return a proper homogeneous transformation matrix. Orientation angle should increase in a positive (counter clockwise) direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44825,"title":"Relative points in 2D: problem 3","description":"The 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T.  A landmark point is observed by the robot, as a bearing angle relative to its x-axis (in degrees and increasing counter clockwise) and a range.  What is the coordinate of the landmark with respect to the world coordinate frame?","description_html":"\u003cp\u003eThe 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T.  A landmark point is observed by the robot, as a bearing angle relative to its x-axis (in degrees and increasing counter clockwise) and a range.  What is the coordinate of the landmark with respect to the world coordinate frame?\u003c/p\u003e","function_template":"function PB = user_function(T, bearing, range)\r\n  % Input:  T a 3x3 homogeneous transformation matrix\r\n  %         bearing a scalar angle\r\n  %         range a scalar distance\r\n  % Output: PB a 2x1 vector representing the coordinate of a point\r\n  P = ;\r\nend","test_suite":"th = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nT = [R t; 0 0 1];\r\nPB = rand(2,1)*10-5;\r\nbearing = rand*360-180;\r\nrange = rand*20+5;\r\n\r\nP = user_function(T, bearing, range);\r\n%%\r\nassert(all(size(P) == [2 1]), 'The point should be described by a 2x1 vector')\r\n%%\r\nassert(isreal(P), 'The point should be described by a vector of real, not complex, numbers');\r\n%%\r\nPB = range*[cosd(bearing); sind(bearing)];\r\nPref = R'*PB - R' * t;\r\nassert( all(abs(P-Pref) \u003c 0.001), 'The relative coordinates are not correct')\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":59,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-10T01:23:18.000Z","updated_at":"2026-03-07T18:50:42.000Z","published_at":"2019-01-10T01:23:18.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A landmark point is observed by the robot, as a bearing angle relative to its x-axis (in degrees and increasing counter clockwise) and a range. What is the coordinate of the landmark with respect to the world coordinate frame?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44838,"title":"Pose from bearing angles in 2D","description":"A robot moving on the plane has a sensor that measures the bearing angle to two mapped landmarks, that is, the world frame coordinates of the landmarks are known and represented by position vectors |P1| and |P2| .  The bearing angles to the landmarks, with respect to the x-axis of the robot's coordinate frame are |th1| and |th2| respectively.  The robot's forward direction is parallel to its x-axis and its heading angle, with respect to magnetic north is |thb| .\r\n\r\nDetermine the pose of the robot expressed as a homogeneous transformation matrix with respect to the world coordinate frame.  In surveying this is known as a resection problem.","description_html":"\u003cp\u003eA robot moving on the plane has a sensor that measures the bearing angle to two mapped landmarks, that is, the world frame coordinates of the landmarks are known and represented by position vectors \u003ctt\u003eP1\u003c/tt\u003e and \u003ctt\u003eP2\u003c/tt\u003e .  The bearing angles to the landmarks, with respect to the x-axis of the robot's coordinate frame are \u003ctt\u003eth1\u003c/tt\u003e and \u003ctt\u003eth2\u003c/tt\u003e respectively.  The robot's forward direction is parallel to its x-axis and its heading angle, with respect to magnetic north is \u003ctt\u003ethb\u003c/tt\u003e .\u003c/p\u003e\u003cp\u003eDetermine the pose of the robot expressed as a homogeneous transformation matrix with respect to the world coordinate frame.  In surveying this is known as a resection problem.\u003c/p\u003e","function_template":"function T = user_function(P1, P2, th1, th2, thb)\r\n% Input:  P1 a 2x1 vector representing the coordinate of a point\r\n%         P2 a 2x1 vector representing the coordinate of a point\r\n%         th1 bearing, a scalar angle\r\n%         th2 bearing, a scalar angle\r\n%         thb heading, a scalar angle\r\n% Output: T a 3x3 homogeneous transformation matrix\r\n  T = ;\r\nend","test_suite":"%\r\nP1 = [10 20]';\r\nP2 = [20 20]';\r\nP = rand(2,1)*5 + [5 5]';\r\nthb = rand*0.2;\r\nx = P1 - P;\r\nth1 = atan2(x(2), x(1)) - thb;\r\nx = P2 - P;\r\nth2 = atan2(x(2), x(1)) - thb;\r\n\r\nT = user_function(P1, P2, th1, th2, thb);\r\n\r\n%% test size and complexity\r\nassert(all(size(T)==3), 'The matrix must be 3x3');\r\nassert(isreal(T), 'The matrix must be real, not complex');\r\n\r\n%% bottom row\r\nassert(isequal(T(3,:), [0 0 1]), 'The bottom row of the homogeneous transformation matrix is not correct')\r\n\r\n%% x coordinate\r\nassert(abs(T(1,3)-P(1))\u003c1e-4, 'The representation of the x-coordinate is not correct')\r\n\r\n%% y coordinate\r\nassert(abs(T(2,3)-P(2))\u003c1e-4, 'The representation of the y-coordinate is not correct')\r\n\r\n%% valid rotation matrix\r\nR = T(1:2,1:2);\r\nassert( abs(det(R)-1) \u003c 1e-4, 'The determinant of the rotation submatrix is not correct')\r\n\r\n%% correct rotation matrix\r\nR = T(1:2,1:2);\r\nassert( abs(atan2(R(2,1), R(1,1)) - thb) \u003c 1e-4, 'The rotation matrix is not correct, check your calculation of the heading SSW and whether you are using radians or degrees')\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":20,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-21T00:32:56.000Z","updated_at":"2026-02-15T06:52:16.000Z","published_at":"2019-01-21T00:37:35.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA robot moving on the plane has a sensor that measures the bearing angle to two mapped landmarks, that is, the world frame coordinates of the landmarks are known and represented by position vectors\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eP1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eP2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e . The bearing angles to the landmarks, with respect to the x-axis of the robot's coordinate frame are\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eth1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eth2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e respectively. The robot's forward direction is parallel to its x-axis and its heading angle, with respect to magnetic north is\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ethb\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e .\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eDetermine the pose of the robot expressed as a homogeneous transformation matrix with respect to the world coordinate frame. In surveying this is known as a resection problem.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":44820,"title":"Relative pose in 2D: problem 2","description":"We consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\r\nWith respect to the robot's coordinate frame, the world frame origin is at a distance of 67.2m in the x-direction and 32.4m in the y-direction, and at a bearing angle of 42 degrees.\r\nWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.","description_html":"\u003cdiv style = \"text-align: start; line-height: 20px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: normal; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"display: block; min-width: 0px; padding-top: 0px; vertical-align: baseline; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"font-weight: bold; \"\u003eWith respect to the robot's coordinate frame\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003e, the world frame origin is at a distance of 67.2m in the x-direction and 32.4m in the y-direction, and at a bearing angle of 42 degrees.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-bottom: 9px; margin-left: 4px; margin-right: 10px; margin-top: 2px; text-align: left; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; \"\u003e\u003cspan style=\"\"\u003eWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function T = your_fcn_name()\r\n  % return a 3x3 matrix describing the robot's pose\r\n  T = [];\r\nend","test_suite":"%%\r\nT = your_fcn_name;\r\nassert(all(size(T)==3), 'The matrix must be 3x3');\r\nassert(isreal(T), 'The matrix must be real, not complex');\r\n\r\n%% bottom row\r\nT = your_fcn_name;\r\nassert(isequal(T(3,:), [0 0 1]), 'The bottom row of the homogeneous transformation matrix is not correct')\r\n\r\n%% x coordinate\r\nT = your_fcn_name;\r\nassert(abs(T(1,3)+71.619164)\u003c1e-4, 'The representation of the x-coordinate is not correct')\r\n\r\n%% y coordinate\r\nT = your_fcn_name;\r\nassert(abs(T(2,3)-20.88768)\u003c1e-4, 'The representation of the y-coordinate is not correct')\r\n\r\n%% valid rotation matrix\r\nT = your_fcn_name;\r\nR = T(1:2,1:2);\r\nassert( abs(det(R)-1) \u003c 0.01, 'The determinant of the rotation submatrix is not correct')\r\n\r\n%% correct rotation matrix\r\nT = your_fcn_name;\r\nR = T(1:2,1:2);\r\nassert( abs(atan2d(R(2,1), R(1,1)) + 42) \u003c 0.1, 'The rotation matrix is not correct, check your calculation of the heading SSW and whether you are using radians or degrees')\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":5,"created_by":13332,"edited_by":26769,"edited_at":"2022-04-12T14:43:28.000Z","deleted_by":null,"deleted_at":null,"solvers_count":109,"test_suite_updated_at":"2022-04-12T14:43:28.000Z","rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-06T08:01:07.000Z","updated_at":"2026-03-07T11:25:11.000Z","published_at":"2019-01-06T08:10:58.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eWith respect to the robot's coordinate frame\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, the world frame origin is at a distance of 67.2m in the x-direction and 32.4m in the y-direction, and at a bearing angle of 42 degrees.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":44837,"title":"Composing relative poses in 2D: problem 1","description":"We consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. \r\n\r\nThere is a playing field with a reference frame denoted by {F}.  The rigid-body displacement from {O} to {F} is given by the homogenous transformation |TF| .\r\n\r\nThere are two robots (robot 1 and robot 2) on the playing field, with attached body-fixed coordinate frame {B} and {C} respectively with their origins at the centre of the robot. The x-axis of each robot's frame points in the robot's forward direction.  \r\n\r\nThe rigid-body displacement of robot 1 with respect to the world frame is estimated by GPS to be the homogenous transformation |TB| .  The displacement of robot 2 with respect to robot 1 is estimated by a novel radar sensor and is given by the homogenous transformation |TBC| .\r\n\r\nWhere is robot 2 with respect to the field?","description_html":"\u003cp\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north.\u003c/p\u003e\u003cp\u003eThere is a playing field with a reference frame denoted by {F}.  The rigid-body displacement from {O} to {F} is given by the homogenous transformation \u003ctt\u003eTF\u003c/tt\u003e .\u003c/p\u003e\u003cp\u003eThere are two robots (robot 1 and robot 2) on the playing field, with attached body-fixed coordinate frame {B} and {C} respectively with their origins at the centre of the robot. The x-axis of each robot's frame points in the robot's forward direction.\u003c/p\u003e\u003cp\u003eThe rigid-body displacement of robot 1 with respect to the world frame is estimated by GPS to be the homogenous transformation \u003ctt\u003eTB\u003c/tt\u003e .  The displacement of robot 2 with respect to robot 1 is estimated by a novel radar sensor and is given by the homogenous transformation \u003ctt\u003eTBC\u003c/tt\u003e .\u003c/p\u003e\u003cp\u003eWhere is robot 2 with respect to the field?\u003c/p\u003e","function_template":"function TFC = user_function(TF, TB, TBC)\r\n  % Input:  TF a 3x3 homogeneous transformation matrix\r\n  %         TB a 3x3 homogeneous transformation matrix\r\n  %         TBC a 3x3 homogeneous transformation matrix\r\n  %         P a 2x1 vector representing the coordinate of a point\r\n  % Output: TFC a 3x3 homogeneous transformation matrix\r\n  %\r\n  TFC = ;\r\nend","test_suite":"th = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nTF = [R t; 0 0 1];\r\n\r\nth = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nTB = [R t; 0 0 1];\r\n\r\nth = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nTBC = [R t; 0 0 1];\r\n\r\n\r\n%%\r\nT = user_function(TF, TB, TBC)\r\n\r\nassert(all(size(T)==3), 'The matrix must be 3x3');\r\nassert(isreal(T), 'The matrix must be real, not complex');\r\n\r\n%% bottom row\r\nT = user_function(TF, TB, TBC)\r\nassert(isequal(T(3,:), [0 0 1]), 'The bottom row of the homogeneous transformation matrix is not correct')\r\n\r\n%% valid rotation matrix\r\nT = user_function(TF, TB, TBC)\r\nR = T(1:2,1:2);\r\nassert( abs(det(R)-1) \u003c 0.01, 'The determinant of the rotation submatrix is not correct')\r\n\r\n%% correct value\r\nT = user_function(TF, TB, TBC)\r\nTref = inv(TB*TBC)*TF*T;\r\nassert( norm(Tref-eye(3,3)) \u003c 1e-6, 'The homogeneous transform value is not correct')","published":true,"deleted":false,"likes_count":2,"comments_count":1,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":64,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-20T08:11:47.000Z","updated_at":"2026-03-08T02:06:59.000Z","published_at":"2019-01-20T08:33:16.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThere is a playing field with a reference frame denoted by {F}. The rigid-body displacement from {O} to {F} is given by the homogenous transformation\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eTF\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e .\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThere are two robots (robot 1 and robot 2) on the playing field, with attached body-fixed coordinate frame {B} and {C} respectively with their origins at the centre of the robot. The x-axis of each robot's frame points in the robot's forward direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe rigid-body displacement of robot 1 with respect to the world frame is estimated by GPS to be the homogenous transformation\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eTB\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e . The displacement of robot 2 with respect to robot 1 is estimated by a novel radar sensor and is given by the homogenous transformation\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eTBC\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e .\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWhere is robot 2 with respect to the field?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44819,"title":"Relative pose in 2D: problem 1","description":"We consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north.  There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\r\n\r\n*With respect to the world frame origin* , the robot's centre is at a distance of 123m in the x-direction and -74.6m in the y-direction.  The car's heading angle is exactly SSW.\r\n\r\nWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.*","description_html":"\u003cp\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north.  There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\u003c/p\u003e\u003cp\u003e\u003cb\u003eWith respect to the world frame origin\u003c/b\u003e , the robot's centre is at a distance of 123m in the x-direction and -74.6m in the y-direction.  The car's heading angle is exactly SSW.\u003c/p\u003e\u003cp\u003eWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.*\u003c/p\u003e","function_template":"function T = user_function()\r\n  % return a 3x3 matrix describing the pose\r\n  T = [];\r\nend","test_suite":"%%\r\nT = user_function\r\n\r\nassert(all(size(T)==3), 'The matrix must be 3x3');\r\nassert(isreal(T), 'The matrix must be real, not complex');\r\n\r\n%% bottom row\r\nT = user_function\r\nassert(isequal(T(3,:), [0 0 1]), 'The bottom row of the homogeneous transformation matrix is not correct')\r\n\r\n%% x coordinate\r\nT = user_function\r\nassert(isequal(T(1,3),123), 'The representation of the x-coordinate is not correct')\r\n\r\n%% y coordinate\r\nT = user_function\r\nassert(isequal(T(2,3),-74.6), 'The representation of the y-coordinate is not correct')\r\n\r\n%% valid rotation matrix\r\nT = user_function\r\nR = T(1:2,1:2);\r\nassert( abs(det(R)-1) \u003c 0.01, 'The determinant of the rotation submatrix is not correct')\r\n\r\n%% correct rotation matrix\r\nT = user_function\r\nR = T(1:2,1:2);\r\nassert( abs(atan2d(R(2,1), R(1,1)) + 112.5) \u003c 0.1, 'The rotation matrix is not correct, check your calculation of the heading SSW and whether you are using radians or degrees')","published":true,"deleted":false,"likes_count":3,"comments_count":7,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":174,"test_suite_updated_at":"2019-01-20T07:53:15.000Z","rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-06T07:56:12.000Z","updated_at":"2026-03-17T12:53:16.000Z","published_at":"2019-01-06T08:55:49.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWe consider a world reference frame denoted by {0} which has its x-axis pointing east and its y-axis pointing north. There is a robot with an attached body-fixed coordinate frame {B} whose origin is in the centre of the robot, and whose x-axis points in the robot's forward direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eWith respect to the world frame origin\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e , the robot's centre is at a distance of 123m in the x-direction and -74.6m in the y-direction. The car's heading angle is exactly SSW.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a 3x3 matrix homogeneous transformation matrix that expresses the pose of the robot frame {B} with respect to the world frame {O}.*\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44830,"title":"Twists in 2D","description":"So far we have represented the pose of an object in the plane using a homogeneous transformation, a 3x3 matrix belonging to the special Euclidean group SE(2), which is also a Lie group.\r\n\r\nAn alternative, and compact, representation of pose is as a twist, a 3-vector comprising the unique elements of the corresponding 3x3 matrix in the Lie algebra se(2).  The matrix exponential of the Lie algebra matrix is a Lie group matrix.\r\n\r\nGiven a homogeneous transformation, return the corresponding twist as a column vector with the translational elements first.  ","description_html":"\u003cp\u003eSo far we have represented the pose of an object in the plane using a homogeneous transformation, a 3x3 matrix belonging to the special Euclidean group SE(2), which is also a Lie group.\u003c/p\u003e\u003cp\u003eAn alternative, and compact, representation of pose is as a twist, a 3-vector comprising the unique elements of the corresponding 3x3 matrix in the Lie algebra se(2).  The matrix exponential of the Lie algebra matrix is a Lie group matrix.\u003c/p\u003e\u003cp\u003eGiven a homogeneous transformation, return the corresponding twist as a column vector with the translational elements first.\u003c/p\u003e","function_template":"function tw = user_function(T)\r\n  % Input: T a 3x3 homogeneous transformation matrix\r\n  % Outout: tw a 3x1 twist vector with translational elements first\r\n  tw = ;\r\nend","test_suite":"th = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nT = [R t; 0 0 1];\r\n\r\ntw = user_function(T);\r\n%%\r\nassert(all(size(tw)==[3 1]), 'The twist must be a 3-element column vector');\r\n%%\r\nassert(isreal(tw), 'The twist must be real, not complex');\r\n\r\n%%\r\nTT = expm([0 -tw(3) tw(1); tw(3) 0 tw(2); 0 0 0]);\r\nassert(norm(abs(TT-T)) \u003c 1e-6, 'The twist is not correct')\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":17,"test_suite_updated_at":"2019-01-10T07:12:32.000Z","rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-10T06:47:50.000Z","updated_at":"2026-02-15T06:57:38.000Z","published_at":"2019-01-10T07:12:32.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSo far we have represented the pose of an object in the plane using a homogeneous transformation, a 3x3 matrix belonging to the special Euclidean group SE(2), which is also a Lie group.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAn alternative, and compact, representation of pose is as a twist, a 3-vector comprising the unique elements of the corresponding 3x3 matrix in the Lie algebra se(2). The matrix exponential of the Lie algebra matrix is a Lie group matrix.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eGiven a homogeneous transformation, return the corresponding twist as a column vector with the translational elements first.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44824,"title":"Relative points in 2D: problem 2","description":"The 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A landmark point is observed by the robot, as a 2x1 coordinate vector P. What is the coordinate of the landmark with respect to the world coordinate frame?","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none; white-space: normal; \"\u003e\u003cdiv style=\"block-size: 63px; display: block; min-width: 0px; padding-block-start: 0px; padding-inline-start: 2px; padding-left: 2px; padding-top: 0px; perspective-origin: 408px 31.5px; transform-origin: 408px 31.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space-collapse: preserve; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A landmark point is observed by the robot, as a 2x1 coordinate vector P. What is the coordinate of the landmark with respect to the world coordinate frame?\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function P = user_function(T, PB)\r\n  % Input:  T a 3x3 homogeneous transformation matrix\r\n  %         PB a 2x1 vector representing the coordinate of a point\r\n  % Output: P a 2x1 vector representing the coordinate of a point\r\n  P = ;\r\nend","test_suite":"%\r\nth = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nT = [R t; 0 0 1];\r\nPB = rand(2,1)*10-5;\r\n\r\nP = user_function(T, PB);\r\n%\r\nassert(all(size(P) == [2 1]), 'The point should be described by a 2x1 vector')\r\n%\r\nassert(isreal(P), 'The point should be described by a vector of real, not complex, numbers');\r\n%\r\nPref = R'*PB - R' * t;\r\nassert( all(abs(P-Pref) \u003c 0.001), 'The relative coordinates are not correct')\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":10,"created_by":13332,"edited_by":413679,"edited_at":"2025-12-15T20:32:55.000Z","deleted_by":null,"deleted_at":null,"solvers_count":68,"test_suite_updated_at":"2025-12-15T20:32:55.000Z","rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-10T01:16:32.000Z","updated_at":"2026-03-17T13:29:59.000Z","published_at":"2019-01-10T01:16:32.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A landmark point is observed by the robot, as a 2x1 coordinate vector P. What is the coordinate of the landmark with respect to the world coordinate frame?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":44828,"title":"Pose interpolation in 2D","description":"Consider two poses represented by homogeneous transformation matrices: |T1| and |T2|.  Write an algorithm to interpolate between these poses according to 0 \u003c= |s| \u003c= 1.  When s=0 the algorithm should return |T1| and when |s| =1 it should return |T2| .  For intermediate values of |s| it should return a proper homogeneous transformation matrix.  Orientation angle should increase in a positive (counter clockwise) direction.","description_html":"\u003cp\u003eConsider two poses represented by homogeneous transformation matrices: \u003ctt\u003eT1\u003c/tt\u003e and \u003ctt\u003eT2\u003c/tt\u003e.  Write an algorithm to interpolate between these poses according to 0 \u0026lt;= \u003ctt\u003es\u003c/tt\u003e \u0026lt;= 1.  When s=0 the algorithm should return \u003ctt\u003eT1\u003c/tt\u003e and when \u003ctt\u003es\u003c/tt\u003e =1 it should return \u003ctt\u003eT2\u003c/tt\u003e .  For intermediate values of \u003ctt\u003es\u003c/tt\u003e it should return a proper homogeneous transformation matrix.  Orientation angle should increase in a positive (counter clockwise) direction.\u003c/p\u003e","function_template":"function T = user_function(T1, T2, s)\r\n  % Input:  T1 a 3x3 homogeneous transformation matrix, initial pose\r\n  %         T2 a 3x3 homogeneous transformation matrix, final pose\r\n  %         s  a scalar between 0 and 1\r\n  % Outout: T  a 3x3 homogeneous transformation matrix, interpolated pose\r\n  T = ;\r\nend","test_suite":"th1 = 2*pi*rand - pi;\r\nt1 = rand(2,1)*20-10;\r\nR1 = [cos(th1) -sin(th1); sin(th1) cos(th1)];\r\nT1 = [R1 t1; 0 0 1];\r\nth2 = 2*pi*rand - pi;\r\nt2 = rand(2,1)*20-10;\r\nR2 = [cos(th2) -sin(th2); sin(th2) cos(th2)];\r\nT2 = [R2 t2; 0 0 1];\r\ns = 0.2 + rand*0.5;\r\n\r\nTi0 = user_function(T1, T2, 0);\r\nTi1 = user_function(T1, T2, 1);\r\nTis = user_function(T1, T2, s);\r\n\r\n\r\n\r\n%%\r\nassert(all(size(Ti0)==3), 's=0: the matrix must be 3x3');\r\n%\r\nassert(isreal(Ti0), 's=0: the matrix must be real, not complex');\r\n% bottom row\r\nassert(isequal(Ti0(3,:), [0 0 1]), 's=0: the bottom row of the homogeneous transformation matrix is not correct')\r\n%\r\nassert( max(max(abs(Ti0-T1))) \u003c 0.0001, 's=0: the interpolated value for s=0 is not correct');\r\n% translation\r\nassert(norm(Ti0(1:2,3)-t1) \u003c 0.0001, 's=0: the translation component is not correct')\r\n% determinant\r\nassert(abs(det(Ti0)-1) \u003c 1e-6, 's=0: the rotation submatrix is not proper')\r\n%\r\nth = atan2(Ti0(2,1), Ti0(1,1));\r\ndth = th - th1;\r\nassert(abs(dth) \u003c 0.0001, 's=0: the rotation submatrix is not correct')\r\n\r\n%%\r\nassert(all(size(Ti1)==3), 's=1: the matrix must be 3x3');\r\n%\r\nassert(isreal(Ti1), 's=1: the matrix must be real, not complex');\r\n% bottom row\r\nassert(isequal(Ti1(3,:), [0 0 1]), 's=1: the bottom row of the homogeneous transformation matrix is not correct')\r\n% translation\r\nassert(norm(Ti1(1:2,3)-t2) \u003c 0.0001, 's=1: the translation component is not correct')\r\n%% determinant\r\nassert(abs(det(Ti1)-1) \u003c 1e-6, 's=1: the rotation submatrix is not proper')\r\n% rotation\r\nth = atan2(Ti1(2,1), Ti1(1,1));\r\ndth = th - th2;\r\nassert(abs(dth) \u003c 0.0001, 's=1: the rotation submatrix is not correct')\r\n\r\n\r\n%%\r\nassert(all(size(Tis)==3), 's=%f: the matrix must be 3x3', s);\r\nassert(isreal(Tis), 's=%f: the matrix must be real, not complex', s);\r\n% bottom row\r\nassert(isequal(Tis(3,:), [0 0 1]), 's=%f: the bottom row of the homogeneous transformation matrix is not correct', s)\r\n% determinant\r\nassert(abs(det(Tis)-1) \u003c 1e-6, 's=%f: the rotation submatrix is not proper', s)\r\n\r\n\r\n% translation\r\nTD = inv(T1) * T2;\r\nTDi = inv(T1) * Tis;\r\ndx = TD(1,3)*s - TDi(1,3);\r\ndy = TD(2,3)*s - TDi(2,3);\r\nassert(abs(dx) \u003c 0.0001, 's=%f: the x-translation component is not correct', s)\r\nassert(abs(dy) \u003c 0.0001, 's=%f: the y-translation component is not correct', s)\r\n% rotation matrix\r\nLDi = logm(TDi);\r\ndrot = LDi(2,1)  + th1*s - th2*s;\r\nwhile drot \u003e pi\r\n    drot = drot - 2*pi;\r\nend\r\nwhile drot \u003c -pi\r\n    drot = drot + 2*pi;\r\nend\r\nassert(abs(drot) \u003c 0.0001, 's=%f: the rotation submatrix is not correct')\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":28,"test_suite_updated_at":"2019-01-21T22:44:17.000Z","rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-10T06:21:41.000Z","updated_at":"2026-02-15T06:56:03.000Z","published_at":"2019-01-10T06:42:31.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eConsider two poses represented by homogeneous transformation matrices:\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eT1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eT2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e. Write an algorithm to interpolate between these poses according to 0 \u0026lt;=\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003es\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u0026lt;= 1. When s=0 the algorithm should return\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eT1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and when\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003es\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e =1 it should return\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eT2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e . For intermediate values of\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003es\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e it should return a proper homogeneous transformation matrix. Orientation angle should increase in a positive (counter clockwise) direction.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44825,"title":"Relative points in 2D: problem 3","description":"The 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T.  A landmark point is observed by the robot, as a bearing angle relative to its x-axis (in degrees and increasing counter clockwise) and a range.  What is the coordinate of the landmark with respect to the world coordinate frame?","description_html":"\u003cp\u003eThe 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T.  A landmark point is observed by the robot, as a bearing angle relative to its x-axis (in degrees and increasing counter clockwise) and a range.  What is the coordinate of the landmark with respect to the world coordinate frame?\u003c/p\u003e","function_template":"function PB = user_function(T, bearing, range)\r\n  % Input:  T a 3x3 homogeneous transformation matrix\r\n  %         bearing a scalar angle\r\n  %         range a scalar distance\r\n  % Output: PB a 2x1 vector representing the coordinate of a point\r\n  P = ;\r\nend","test_suite":"th = 2*pi*rand;\r\nt = rand(2,1)*20-10;\r\nR = [cos(th) -sin(th); sin(th) cos(th)];\r\nT = [R t; 0 0 1];\r\nPB = rand(2,1)*10-5;\r\nbearing = rand*360-180;\r\nrange = rand*20+5;\r\n\r\nP = user_function(T, bearing, range);\r\n%%\r\nassert(all(size(P) == [2 1]), 'The point should be described by a 2x1 vector')\r\n%%\r\nassert(isreal(P), 'The point should be described by a vector of real, not complex, numbers');\r\n%%\r\nPB = range*[cosd(bearing); sind(bearing)];\r\nPref = R'*PB - R' * t;\r\nassert( all(abs(P-Pref) \u003c 0.001), 'The relative coordinates are not correct')\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":59,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-10T01:23:18.000Z","updated_at":"2026-03-07T18:50:42.000Z","published_at":"2019-01-10T01:23:18.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A landmark point is observed by the robot, as a bearing angle relative to its x-axis (in degrees and increasing counter clockwise) and a range. What is the coordinate of the landmark with respect to the world coordinate frame?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44838,"title":"Pose from bearing angles in 2D","description":"A robot moving on the plane has a sensor that measures the bearing angle to two mapped landmarks, that is, the world frame coordinates of the landmarks are known and represented by position vectors |P1| and |P2| .  The bearing angles to the landmarks, with respect to the x-axis of the robot's coordinate frame are |th1| and |th2| respectively.  The robot's forward direction is parallel to its x-axis and its heading angle, with respect to magnetic north is |thb| .\r\n\r\nDetermine the pose of the robot expressed as a homogeneous transformation matrix with respect to the world coordinate frame.  In surveying this is known as a resection problem.","description_html":"\u003cp\u003eA robot moving on the plane has a sensor that measures the bearing angle to two mapped landmarks, that is, the world frame coordinates of the landmarks are known and represented by position vectors \u003ctt\u003eP1\u003c/tt\u003e and \u003ctt\u003eP2\u003c/tt\u003e .  The bearing angles to the landmarks, with respect to the x-axis of the robot's coordinate frame are \u003ctt\u003eth1\u003c/tt\u003e and \u003ctt\u003eth2\u003c/tt\u003e respectively.  The robot's forward direction is parallel to its x-axis and its heading angle, with respect to magnetic north is \u003ctt\u003ethb\u003c/tt\u003e .\u003c/p\u003e\u003cp\u003eDetermine the pose of the robot expressed as a homogeneous transformation matrix with respect to the world coordinate frame.  In surveying this is known as a resection problem.\u003c/p\u003e","function_template":"function T = user_function(P1, P2, th1, th2, thb)\r\n% Input:  P1 a 2x1 vector representing the coordinate of a point\r\n%         P2 a 2x1 vector representing the coordinate of a point\r\n%         th1 bearing, a scalar angle\r\n%         th2 bearing, a scalar angle\r\n%         thb heading, a scalar angle\r\n% Output: T a 3x3 homogeneous transformation matrix\r\n  T = ;\r\nend","test_suite":"%\r\nP1 = [10 20]';\r\nP2 = [20 20]';\r\nP = rand(2,1)*5 + [5 5]';\r\nthb = rand*0.2;\r\nx = P1 - P;\r\nth1 = atan2(x(2), x(1)) - thb;\r\nx = P2 - P;\r\nth2 = atan2(x(2), x(1)) - thb;\r\n\r\nT = user_function(P1, P2, th1, th2, thb);\r\n\r\n%% test size and complexity\r\nassert(all(size(T)==3), 'The matrix must be 3x3');\r\nassert(isreal(T), 'The matrix must be real, not complex');\r\n\r\n%% bottom row\r\nassert(isequal(T(3,:), [0 0 1]), 'The bottom row of the homogeneous transformation matrix is not correct')\r\n\r\n%% x coordinate\r\nassert(abs(T(1,3)-P(1))\u003c1e-4, 'The representation of the x-coordinate is not correct')\r\n\r\n%% y coordinate\r\nassert(abs(T(2,3)-P(2))\u003c1e-4, 'The representation of the y-coordinate is not correct')\r\n\r\n%% valid rotation matrix\r\nR = T(1:2,1:2);\r\nassert( abs(det(R)-1) \u003c 1e-4, 'The determinant of the rotation submatrix is not correct')\r\n\r\n%% correct rotation matrix\r\nR = T(1:2,1:2);\r\nassert( abs(atan2(R(2,1), R(1,1)) - thb) \u003c 1e-4, 'The rotation matrix is not correct, check your calculation of the heading SSW and whether you are using radians or degrees')\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":13332,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":20,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":77,"created_at":"2019-01-21T00:32:56.000Z","updated_at":"2026-02-15T06:52:16.000Z","published_at":"2019-01-21T00:37:35.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA robot moving on the plane has a sensor that measures the bearing angle to two mapped landmarks, that is, the world frame coordinates of the landmarks are known and represented by position vectors\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eP1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eP2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e . The bearing angles to the landmarks, with respect to the x-axis of the robot's coordinate frame are\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eth1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eth2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e respectively. The robot's forward direction is parallel to its x-axis and its heading angle, with respect to magnetic north is\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ethb\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e .\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eDetermine the pose of the robot expressed as a homogeneous transformation matrix with respect to the world coordinate frame. In surveying this is known as a resection problem.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"term":"tag:\"homogeneous transformation\"","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"tag:\"homogeneous transformation\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"homogeneous transformation\"","","\"","homogeneous transformation","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007fdd4583cb40\u003e":null,"#\u003cMathWorks::Search::Field:0x00007fdd4583caa0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007fdd4583c1e0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007fdd4583cdc0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007fdd4583cd20\u003e":50,"#\u003cMathWorks::Search::Field:0x00007fdd4583cc80\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007fdd4583cbe0\u003e":"tag:\"homogeneous transformation\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007fdd4583cbe0\u003e":"tag:\"homogeneous transformation\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"cody-search","password":"78X075ddcV44","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"homogeneous transformation\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"homogeneous transformation\"","","\"","homogeneous transformation","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007fdd4583cb40\u003e":null,"#\u003cMathWorks::Search::Field:0x00007fdd4583caa0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007fdd4583c1e0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007fdd4583cdc0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007fdd4583cd20\u003e":50,"#\u003cMathWorks::Search::Field:0x00007fdd4583cc80\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007fdd4583cbe0\u003e":"tag:\"homogeneous transformation\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007fdd4583cbe0\u003e":"tag:\"homogeneous transformation\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":44820,"difficulty_rating":"easy-medium"},{"id":44837,"difficulty_rating":"easy-medium"},{"id":44819,"difficulty_rating":"easy-medium"},{"id":44830,"difficulty_rating":"medium"},{"id":44824,"difficulty_rating":"medium"},{"id":44828,"difficulty_rating":"medium"},{"id":44825,"difficulty_rating":"medium"},{"id":44838,"difficulty_rating":"medium"}]}}