Robotics II Homework 1 HW1 is designed to introduce you to the dvc simulator. You will learn how to use position and force controllers. Instructions for compiling HW1 are in BUILD.txt. There are six parts. Parts 1-3 are required, parts 4-6 are extra challenges: 1) Program the bat position controller so it knocks the ball into the goal. You may reposition the ball anywhere as long as its X coordinate is greater than 0 and less than 1. You may reposition the goal as long as its X coordinate is greater than 2. The initial position of the ball and goal are defined in hw1_prefs.xml. You will find hw1_prefs.xml in the data folder inside the dvc source folder (CMake places it here automatically). 2) Implement the SetSurfaceAngle method. Change SetSurfaceAngle(90) to SetSurfaceAngle(45) and repeat part 1. See diagram: forces.jpg. 3) Implement the goalPositionController class so that the goal moves as a function of time. Make the goal move in a circle. 4) Set the surface angle back to 90 degrees. Modify the goalPositionController so it takes a variable X as input and sets the goal's X coordinate to the input (the Y coordinate should be 0). Modify the batPositionController so that it also takes the variable X as input and can knock the ball into the goal for any X within a reasonable range (you can choose the range). 5) Extend part 4 so that the goal's X coordinate changes as a function of time and knock the ball into the goal. 6) Modify the batPositionController so it can hit the ball straight up and down at least 5 times in a row. In addition to the code: Make one or two graphs of the data collected from the simulation. If you set the boolean variable useLogging to true, the application will write a data file. The format of the data file is described in the code. Plotdata.m is provided to you and shows how to graph this data in Matlab, but you may use any graphing software. Write a few sentences explaining the effect of changing the simulation timestep size. How to hand in the hw: When you complete part 1, copy App.cpp, App.h, and hw1_prefs.xml into a folder named part1. Do this for all parts you complete. When you're done, put all the folders into a folder labled with your RCS ID. Add your graphs and short answer, zip the folder, and email it to marioj@rpi.edu. TIPS: Feel free to modify the code however you'd like. You might want to give pointers to the ball and goal to the batPositionController so it can access their position or velocity vectors. You can use the mouse to grab and move the ball in the scene. Look at the KeyDown method, you may find this helpful for implementing your own custom functionality. If you need to rerun CMake, any changes you have made to hw1_prefs.xml will be lost! Make sure you back up this file. Keyboard controls for the HW1 application: 'L' - reload the scene 'P' - pause the scene 'spacebar' - step forward one timestep 'mousewheel' - zoom in/out right-click+drag - translate viewport 'D' - render in 3D shift+right-click+drag - change viewing angle