Software for Intelligent Robotics Assignment #1 Out: Thursday, August 22, 2002 Due: Tuesday, September 3, 2002

The purpose of this assignment is to build familiarity with the Nomad200 robotic simulation environment we will be using this term for both your homeworks and your final project. This exercise involves downloading the simulation software and experimenting with various aspects of the system. You should learn how to run the simulator, how to run robot code, how to create your own test environments, and how to recompile robot code. This simulation system operates under Solaris Unix (any of the Sparcs in the CS lab should work) using C programs. For parts of this assignment, you will need to obtain a screen dump. Instructions are provided at the end for how to obtain and print screen dumps. Turn in the information requested below under Part I, Part II, etc. 1. Download the Nomad200 simulator. − Using your favorite web browser, go to the course handouts web page at http://www.cs.utk.edu/~parker/Courses/CS594-fall02/handouts.html and download Nomad200 simulator. Save the simulator software (which will be in a file called “Nomad200.tar”) in your home Solaris Unix directory. Unpack the simulator software: tar xvf Nomad200.tar This command creates a directory in your area called “Nomad200” with two subdirectories – “client” and “server”. − Create three xterm windows, which will be used later in exercises 2 and following: xterm & xterm & xterm & − Connect to the server directory: cd ~/Nomad200/server − Run the simulator from one of the xterm windows: ./Nserver & You should see 4 windows open. The titles of the windows are: “Map”, “Robot:Nomad(1)”, “Options”, and “Options”. The “Map” window gives the global view of the environment, the “Robot:Nomad(1)” gives information specific to robot 1, the topmost “Options” window displays values of the infrared sensors for robot 1, and the lower “Options” window displays values of the sonar, laser, and proximity sensors for robot 1.

txt” to open. Zoom out by selecting “Zoom out” from the “View” pulldown menu in both the “Map” and “Robot:Nomad(1)” windows. Print out a hardcopy of this screendump. The attachment gives a description of the function calls used in this code. open in the “Map” window and in the “Robot:Nomad(1)” window. Select the file “map1. You should see a map with walls..c. enter <cntl>-c in the window where “sobounce” is running.c program for a longer period of time. explain what capabilities would need to be added to the robot to enable it to completely explore the environment.) − Observe the robot moving through the environment and note its behavior over several minutes. 2. you should see a trace of the robot’s path in the “Robot:Nomad(1)” window.) Practice changing the view in both windows. sliding the display. In descriptive text./sobounce 1 (In the above command. ‘1’ stands for robot 1. PART III: If you ran the robot using the sobounce. zooming in and out. select “All” under the “Refresh” pulldown menu in the “Robot:Nomad(1)” window.) If you want to quit the simulator and come back later. PART I: Obtain a screen dump of the simulation showing the accumulated trace of the robot running sobounce over several minutes. (You don’t have to turn in anything in your homework for step 1. where we can run code for several robots simultaneously. connect to the client directory: cd ~/Nomad200/client − Since we want to trace the path of the robot. In one of your xterm windows. When the robot begins moving in the next steps. select one of the “Robot trace” options (Solid or outline) under the “Show” pulldown menu in the “Robot:Nomad(1)” window. select “Quit” from the “File” pulldown menu in the “Map” window.− You have now completed the simulator download and are ready to proceed to the following exercises. (After you select zoom out. explain how the “wander” function enables the robot to get out of tight corners. obstacles. Run the sample code that uses sonar to have the robot wander through the environment: . To refresh the display. we will explore having multiple robots.) PART II: Examine the source code for sobounce. do you think it would eventually reach all open space in the map? Explain your answer. Run example program − − Be sure you opened 3 xterm windows from step 1 above. you will need to click in the window to execute the zoom. − − . based upon your examination of the code and the behavior of the robot in the simulator. and so forth. and that Nserver is running. Open an example environmental map by selecting “Open Map” from the “File” pulldown menu in the “Map” window. If you don’t think the robot can eventually reach all open space. (See procedures at end for how to do this. Make sure that the complete map is visible in the “Map” and “Robot:Nomad(1)” windows. − To halt the robot. etc. In later exercises this semester.

. Turn in a screen dump of the robot running sobounce in your new environment.c Nclient. Edit the sobounce.xwd Right-click the mouse to get the xv controls. The map of walls and obstacles. Experiment with adding obstacles and polygons to create your own map. “man xwd” or “man xv”). etc. the values in the lower options window change reflecting the readings of the front 5 sonars. should disappear. This is done by entering 1’s instead of 0’s in the local_mask settings. resize. at least 8 rooms and 4 obstacles). then select “grayscale”. Turn in a screen dump of the robot running your new version of sobounce.xwd”. To obtain screen dumps. Recompile the program as follows: gcc mysobounce. As the robot runs sobounce.c code to display all sensor readings. With this change. You can crop. in your new environment.o –lm –lnsl –lsocket –o mysobounce PART V: Run your new sobounce code in your new customized map (from step 3). Experiment with changing the image size and cropping to ensure that the simulator portion of the screen is included and legible in the printout.c code (and save as a different file) in the “turn_front_sonar_on” function to activate all sensors. You can now create your own map by using the “Obstacles” pulldown menu. 4. Enter Quit to exit. enter the following command in an open xterm window: xwd –root –out screen. NOTES: Obtaining screen dumps. You can save maps by selecting “Save Map” or “Save Map As” under the “File” pulldown menu. .xwd This command creates a screen dump and puts it into the file called “screen. is the robot now using all of its sensor values to generate its behavior? Explain based upon your understanding of the code. PART IV: To become familiar with generating your own test environments.3. Create a customized map − Clear out the example map by selecting “New Map” under the “File” pulldown menu in the “Map” window. select the “print” button and (perhaps) the landscape mode. then OK. The values in the upper options window do not change because the robot’s infrared sensors are masked out by the sobounce code. and print by using the “xv” utility: xv screen.e. showing the robot trace over a period of several minutes. More information on xwd and xv can be found using the unix man pages (i. Make sure that the options windows show all sensor readings. create your own customized map of moderate complexity (completely enclosed. Alter the sobounce.. and note the new sensor displays in both option windows. To print the image.

Sign up to vote on this title
UsefulNot useful