{"id":377,"date":"2022-03-18T03:50:39","date_gmt":"2022-03-18T03:50:39","guid":{"rendered":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/?page_id=377"},"modified":"2022-12-13T04:21:47","modified_gmt":"2022-12-13T04:21:47","slug":"control","status":"publish","type":"page","link":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/implementation\/control\/","title":{"rendered":"Control"},"content":{"rendered":"\n<p>The main function of the control subsystem is to generate the low-level control commands that will be sent to the drive by wire actuators to control the motion of the follower. To make the control task easier, we have divided the subsystem into 2 main controller subsystems: <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">a. <strong>Pure Pursuit Lateral Controller<\/strong><\/h3>\n\n\n\n<p>Pure pursuit is a path tracking algorithm. It computes the heading angle which is used to compute the steering angle command that moves the vehicle from its current position to reach some look-ahead point in front of the robot. The linear velocity is assumed constant, hence you can change the linear velocity of the robot at any point. The algorithm then moves the look-ahead point on the path based on the current position of the robot until the last point of the path. You can think of this as the robot constantly chasing a point in front of it. The property LookAheadDistance decides how far the look-ahead point is placed.<\/p>\n\n\n\n<p>The inputs of the lateral control subsystem are the follower local path from the Planning Subsystem and the follower current pose from the Localization Subsystem. The output is steering commands. The subsystem is shown in Figure 1.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u53489.24.44-900x655.png\" alt=\"\" class=\"wp-image-805\" width=\"392\" height=\"285\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u53489.24.44-900x655.png 900w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u53489.24.44-300x218.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u53489.24.44-768x559.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u53489.24.44.png 946w\" sizes=\"auto, (max-width: 392px) 100vw, 392px\" \/><figcaption>Figure 1. Lateral Controller<\/figcaption><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Test 1.  Waypoint Following on ATV<\/h4>\n\n\n\n<p>We tested the waypoints following on ATV to test the lateral controller as shown below. The follower was able to follow a prerecorded path.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"540\" style=\"aspect-ratio: 960 \/ 540;\" width=\"960\" controls src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/atv-lateral.mp4\"><\/video><figcaption>Waypoints Following on ATV<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Test 2.  <strong>Leader Following on ATV<\/strong><\/h4>\n\n\n\n<p>Instead of following a prerecorded path, we tested the lateral controller by combining perception subsystem. The follower was able to follow the leader&#8217;s path with pure pursuit controller.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"540\" style=\"aspect-ratio: 960 \/ 540;\" width=\"960\" controls src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/leader-atv.mp4\"><\/video><figcaption>Leader Following on ATV<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Test 3.  <strong>Waypoints Following on <\/strong>Zamboni Ice Resurfacer<\/h4>\n\n\n\n<p>We tested the waypoints following to test lateral controller as shown below. The follower wad able to follow a prerecorded path.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"540\" style=\"aspect-ratio: 960 \/ 540;\" width=\"960\" controls src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/lateral.mp4\"><\/video><figcaption>Waypoints Following on Ice Resurfacer<\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.00.15-900x459.png\" alt=\"\" class=\"wp-image-807\" width=\"591\" height=\"302\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.00.15-900x459.png 900w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.00.15-300x153.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.00.15-768x391.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.00.15-1536x783.png 1536w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.00.15.png 2000w\" sizes=\"auto, (max-width: 591px) 100vw, 591px\" \/><figcaption>Figure 2. Waypoints Following Rviz Visualization<\/figcaption><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Test 4. Leader Following on Zamboni Ice Resurfacer<\/h4>\n\n\n\n<p>We tested the lateral controller by combining perception subsystem. The follower was able to follow the leader&#8217;s path with pure pursuit controller.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.23.57-900x441.png\" alt=\"\" class=\"wp-image-811\" width=\"584\" height=\"285\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.23.57-900x441.png 900w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.23.57-300x147.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.23.57-768x376.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.23.57-1536x752.png 1536w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.23.57.png 2000w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><figcaption>Figure 3. Rviz Visualization for Leader Following on Ice Resurfacer<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>b. PID Longitudinal Controller<\/strong><\/h3>\n\n\n\n<p>A PID longitudinal controller is used to get the target velocity of the vehicle, so that the follower is able to follow the leader with a constant longitudinal distance. The inputs of longitudinal control subsystem are the follower target pose from the Planning Subsystem&nbsp;and the ollower current pose from the Localization Subsystem. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/10\/target-position-1-900x463.png\" alt=\"\" class=\"wp-image-690\" width=\"591\" height=\"303\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/10\/target-position-1-900x463.png 900w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/10\/target-position-1-300x154.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/10\/target-position-1-768x395.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/10\/target-position-1-1536x790.png 1536w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/10\/target-position-1-2048x1054.png 2048w\" sizes=\"auto, (max-width: 591px) 100vw, 591px\" \/><figcaption>Figure 4. Target Position of the Follower (Virtual Follower)<\/figcaption><\/figure><\/div>\n\n\n\n<p>From Figure 4, the longitudinal error e<sub>x<\/sub> between the target position and the current position of the follower can be calculated. The target velocity of the follower is assumed to be an equation as:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.39.01-900x151.png\" alt=\"\" class=\"wp-image-813\" width=\"420\" height=\"70\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.39.01-900x151.png 900w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.39.01-300x50.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.39.01-768x128.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.39.01-1536x257.png 1536w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/\u622a\u5c4f2022-12-12-\u4e0b\u534810.39.01.png 1734w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/figure><\/div>\n\n\n\n<p>For DBW Zamboni vehicle platform, the velocity is controlled by the position of the throttle pedal. Therefore, the velocity in the equation is actually the percentage of throttle value.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Test 1.  Longitudinal Control Testing on ATV<\/h4>\n\n\n\n<p>We tested the longitudinal controller on ATV by following the leader in a straight path as shown below. <\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"540\" style=\"aspect-ratio: 960 \/ 540;\" width=\"960\" controls src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/longiatv.mp4\"><\/video><figcaption>Longitudinal Control Testing on ATV<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Test 2. Longitudinal Control Testing on Zamboni Ice Resurfacer<\/h4>\n\n\n\n<p>We tested the longitudinal controller on Zamboni ice resurfacer as shown below. The vehicle was able to slow down and stop when the distance to the leader was less than the threshold.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"540\" style=\"aspect-ratio: 960 \/ 540;\" width=\"960\" controls src=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/zambonilongi.mp4\"><\/video><figcaption>Longitudinal Control Testing on Zamboni Ice Resurfacer<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>The main function of the control subsystem is to generate the low-level control commands that will be sent to the drive by wire actuators to control the motion of the follower. To make the control task easier, we have divided the subsystem into 2 main controller subsystems: a. Pure Pursuit Lateral Controller Pure pursuit is<br \/><a class=\"moretag\" href=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/implementation\/control\/\">+ Read More<\/a><\/p>\n","protected":false},"author":292,"featured_media":492,"parent":361,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-377","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/pages\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/users\/292"}],"replies":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/comments?post=377"}],"version-history":[{"count":8,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/pages\/377\/revisions"}],"predecessor-version":[{"id":826,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/pages\/377\/revisions\/826"}],"up":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/pages\/361"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/media\/492"}],"wp:attachment":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/media?parent=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}