{"id":375,"date":"2022-03-18T03:50:21","date_gmt":"2022-03-18T03:50:21","guid":{"rendered":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/?page_id=375"},"modified":"2022-12-13T04:21:26","modified_gmt":"2022-12-13T04:21:26","slug":"planning","status":"publish","type":"page","link":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/implementation\/planning\/","title":{"rendered":"Planning"},"content":{"rendered":"\n<p>The follower motion planning consists of two parts: waypoints generation and follower target position generation. The inputs for the desired waypoints generation of the follower are the relative pose estimated from perception subsystem and the follower pose estimated by the localization subsystem. Then the follower target pose is selected to have a longitudinal offset from leader&#8217;s position. A flowchart of this subsystem is shown in Figure 1.<\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><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\/planning-900x361.png\" alt=\"\" class=\"wp-image-802\" width=\"465\" height=\"186\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/planning-900x361.png 900w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/planning-300x120.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/planning-768x308.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/12\/planning.png 924w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><figcaption>Figure 1. Subsystem Architecture<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Waypoint Generation<\/h3>\n\n\n\n<p>The first step in follower waypoint generation is to obtain the leader\u2019s waypoints. The output of the perception subsystem is the tf transform between the camera frame and the leader base frame. Based on tf transforms, we compute the leader\u2019s base pose in the follower odometry frame and the leader\u2019s path is recovered. By adding a lateral offset on the estimated leader\u2019s waypoints, we generate the follower\u2019s waypoints, which form the follower path. There is an initial gap between the leader and the follower. We interpolate n waypoints from the initial position of the follower to the first waypoint among the generated waypoints. This is illustrated in Figure 2.<\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><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\/04\/path-1-900x455.png\" alt=\"\" class=\"wp-image-504\" width=\"619\" height=\"312\" srcset=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/04\/path-1-900x455.png 900w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/04\/path-1-300x152.png 300w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/04\/path-1-768x388.png 768w, https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-content\/uploads\/sites\/62\/2022\/04\/path-1.png 1200w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><figcaption>Figure 2. Lateral offset Illustration<\/figcaption><\/figure><\/div>\n\n\n\n<p>We compute a KDT tree at every time step to find the waypoint closest to the current position in the follower desired path. Then, we take some waypoints from the closest one to form a local desired path which will be published to the lateral controller. This is illustrated in Figure 3.<\/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.04.43-900x469.png\" alt=\"\" class=\"wp-image-803\" width=\"554\" height=\"287\" \/><figcaption>Figure 3. Local Path Illustration<\/figcaption><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Target Position Generation<\/h3>\n\n\n\n<p>The three steps to generate the target position of the follower:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Calculate the longitudinal offset based on the arc length of the leader\u2019s path. <\/li><li>Get virtual follower by taking lateral and longitudinal offset of the estimated leader. <\/li><li>Set the virtual follower as the targeting pose<\/li><\/ol>\n\n\n\n<div class=\"wp-block-image is-style-default\"><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\/10\/target-position-1-900x463.png\" alt=\"\" class=\"wp-image-690\" width=\"612\" height=\"313\" \/><figcaption>Figure 6. Target Position of the Follower (Virtual Follower)<\/figcaption><\/figure><\/div>\n\n\n\n<p>At each time step, the follower target position is published through ROS topic to the longitudinal controller, so that the longitudinal controller can output the velocity commands for the follower to maintain a constant longotudinal distance from the leader.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The follower motion planning consists of two parts: waypoints generation and follower target position generation. The inputs for the desired waypoints generation of the follower are the relative pose estimated from perception subsystem and the follower pose estimated by the localization subsystem. Then the follower target pose is selected to have a longitudinal offset from<br \/><a class=\"moretag\" href=\"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/implementation\/planning\/\">+ Read More<\/a><\/p>\n","protected":false},"author":292,"featured_media":598,"parent":361,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-375","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/pages\/375","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=375"}],"version-history":[{"count":9,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/pages\/375\/revisions"}],"predecessor-version":[{"id":825,"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/pages\/375\/revisions\/825"}],"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\/598"}],"wp:attachment":[{"href":"https:\/\/mrsdprojects.ri.cmu.edu\/2022teami\/wp-json\/wp\/v2\/media?parent=375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}