Skip to main content Link Search Menu Expand Document (external link)

Project 5

Disclaimer

Please DO NOT distribute project material or solutions online (e.g. public GitHub repositories). We take violations of the honor code very seriously.

Overview

For this assignment, you will now implement a RRT-Connect motion planner to let your robot navigate from any configuration to the “zero configuration” (where every robot DOF has a zero value). This configuration space includes the state of each joint and the global orientation and position of the robot base.

  • 2D RRT-Connect in project_pathplan/rrt.js

  • Configuration space collision detection in kineval/kineval_collision.js

  • Configuration space RRT-Connect in kineval/kineval_rrt_connect.js

  • Original instructions available at https://autorob.org/#assignment6

Instructions

  1. Start with your solutions to project 4
    • Solutions to project 4 will be released on 03/03/2024 (Sun). You can also start from here.
  2. 2D RRT-Connect in project_pathplan/rrt.js

    • Change initSearch() in your project_pathplan/infrastructure.js to set search_alg = "RRT-connect";.

    • Complete the iterateRRTConnect() function. Its expected behavior is provided in the code stencil.

      • You do not need to implement iterateRRT() or iterateRRTStar().

      • The relevant global variables, such as eps (Max step length for generating new nodes), T_a (RRT tree starting form init), and T_b (RRT tree starting from goal), are defined and initialized in initSearch() at project_pathplan/infrastructure.js

      • You can use provided support functions from project_pathplan/infrastructure.js, including insertTreeVertex() and insertTreeEdge()

      • You may also create additional helper functions in project_pathplan/rrt.js to handle different steps of the RRT-Connect algorithm; some suggestions are provided in the code stencil

      • iterateRRTConnect() is called for you from the animation code, and it should perform just one iteration of the RRT-Connect algorithm each time it is called

      • When your search succeeds, you should use set search_iterate = false to stop searching and call drawHighlightedPath() from project_plan/draw.js to visualize the final path found.

      • Make sure that your path is from q_init to q_goal as defined in project_pathplan/infrastructure.js.

    • You can check your implementation by opening http://localhost:8000/project_pathplan/search_canvas.html in your browser. It will look like the video below.

  3. Configuration space collision detection in kineval/kineval_collision.js

    • Complete kineval/kineval_collision.js

      • Uncomment return robot_collision_forward_kinematics(q);

      • Implement robot_collision_forward_kinematics(), traverse_collision_forward_kinematics_joint() and any helper functions you need.

      • When finished, kineval.poseIsCollision() should return the name of the link in collision.

    • You can check your implementation by opening http://localhost:8000/home.html in your browser. The kineval code will automatically display the colliding link in red wireframes like the video below.

  4. Configuration space RRT-Connect in kineval/kineval_rrt_connect.js

    • Modify kineval.robotRRTPlannerInit() to initialize RRT trees.

    • Complete robot_rrt_planner_iterate() and any helper functions in kineval/kineval_rrt_connect.js.

      • This function must execute a single RRT-Connect iteration.

      • Return "reached" if the search succeeds and "searching" otherwise.

      • When the search succeeds, set the path kineval.motion_plan to a list of vertices (which store the configuration in the .vertex property) from q_start_config to q_goal_config. This will be used in lines 64-91 of kineval/kineval_rrt_connect.js to traverse the plan.

      • Your configuration space is constrained to robot base positions inside robot_boundary in each world file at worlds/world_*.js.

      • The robot cannot take steps longer than 1 (the 2-norm of the delta should be leq 1, analogous to eps=1 in 2D RRT).

    • When finished, open http://localhost:8000/home.html?world=worlds/world_s.js, move the robot to the opposite corner, press x to zoom out a bit, and press m to initiate the search. After the path is found, press b and n to move the robot through the found plan. It should look like the video below (Download and play this video if it freezes).

  5. Submit your project_pathplan/rrt.js, kineval/kineval_collision.js, and kineval/kineval_rrt_connect.js

Deadline

This project is due on Wednesday, March 20th at 11:59pm CT.

Grading

The project is worth a total of 10 points.