Homework 4 Due Wednesday 3/22 Part 1: Test Robot Localization with Uniform Initial Distribution The goal of this test is to see whether or not the robot can localize itself given an uniform initial distribution of particles. The test consists of the following steps: 1. Unplug the robot, flip the switch to neutral, and wheel the robot out in the hallway, so that it faces west, i.e., towards the main entrance of the AI Lab. 2. Turn on the robot and launch the main launch file. 3. Instead of providing initial localization estimate as you did during training, call the service "global_localization" from the command line. In rviz, you should see the particles uniformly distributed throughout the map. If you did not take notes about how to call a service from the command line, consider this tutorial: http://wiki.ros.org/rosservice 4. Using teleoperation with the keyboard, drive the robot forward towards the undergraduate public lab. While you're driving it, watch the rviz localization to see whether or not the robot eventually localizes in the correct position. If you see the particles forming a cluster in the correct position and you see the robot model in that position, you can end the test and take a screenshot. If you make it to the elevator and the robot still isn't localized, then take a screenshot as well, in this case, the robot failed to localize. 5. If the test failed, provide the correct initial localization using rviz. Issue a goal to the position where you first started driving the robot (i.e., right outside the lab, facing west). The robot should now autonomously drive back to where you started. Now, let's find out if increasing the number of particles improves its ability to correctly localize. Use ctrl-c to end the processes running in the terminal where you started the robot's launch file. Navigate to the package "segbot_navigation" and open the file amcl.launch contained in the launch/ folder i.e., : $ roscd segbot_navigation $ geany launch/amcl.launch Change the value for min_particles from 10000 to 20000 and the value for max_particles from 40000 to 80000. Note that if the parameters were already with those values, it means that the last person didn't set them back (in which case your first test already tried with double the number), in that case, simply changed them back to the original values. After saving the file, start the robot's main launch file again, the localization package will now use the updated values. Finally repeat the test and record the results again. In your submission's README file, state the results of the test under both conditions and include both screen shots. After everyone has performed this test, I will aggregate the results and we can find out how good the robot is at localizing given a uniform distribution of initial guesses. My hypothesis is that the robot will fail most of the time but hopefully, it should fail less when the # of particles is doubled from the default. There is also a small chance that 80000 particles is too much for the system to handle computation. Extra credit: Conduct the test for each condition twice instead of once and include both the screenshots and the results in the README file. Part 2: Construct a robot model using URDF Pre-requisites: URDF Tutorials part 1, 2 and 3: http://wiki.ros.org/urdf/Tutorials Requirements: The robot you construct must have at least 6 non-fixed joints. At least two types of non-fixed joints must be included. The three types of non-fixed joints are prismatic, revolute, and continuous. What to turn in: your URDF robot file along with 5 screenshots showing your robot in different configurations (i.e., different values for its joints). To display the model in rviz with a gui to set the joint values, run: roslaunch urdf_tutorial display.launch model:= gui:=True Place the urdf model in a folder called “urdf” in one of your ros package. From the terminal, navigate to your package folder using cd commands. Then, run: roslaunch urdf_tutorial display.launch model:=urdf/ gui:=True where is the filename of the URDF model. You should name your file “my_robot_.urdf” so that each submission is unique. In your README file, include a brief description of the robot you built Extra Credit: Include a 3D model in your URDF file similarly to how the gripper model was included for the R2D2 robot that you build in the URDF tutorial. However, use a different model other than gripper used in the tutorial (i.e., you’ll have to look at a robot description package and locate a 3D model you’d like to use). For example, to visualize the PR2 model, use the following commands roscd pr2_description roslaunch urdf_tutorial xacrodisplay.launch model:=robots/pr2.urdf.xacro gui:=true In the README file, state that you completed the extra credit, if completed.