Skip to content Skip to navigation

OOPSMP: SketchUp Plugin

SketchUp Plugin for OOPSMP

Introduction

During the Summer of 2008 Nick Bridle, Nicolas Feltman, and Mark Moll have developed a plugin for Google SketchUp that allows you to run OOPSMP from SketchUp. SketchUp is an easy-to-use 3D modeling program. With the plugin you can define environments, robots, motion planning queries, solve them with OOPSMP, and "play" the solutions without ever having to leave SketchUp. You can also export motion planning problems from SketchUp to an OOPSMP input XML file.

CMake tries to detect whether you have SketchUp installed. Specifically, it checks for the existence of the SketchUp plugin directory. On MS Windows, this can be found in C:\Program Files\Google\Google Sketchup 6\Plugins. On Mac, the plugins folder is in /Library/Application Support/Google Sketchup 6/SketchUp/plugins. Typing "make install" or making the "INSTALL" target in Visual Studio will install the OOPSMP binary, libraries, and the plugin. After you have installed OOPSMP, open Sketchup and watch the tutorial videos to help you get started. Below is a FAQ of SketchUp plugin questions. For any unanswered questions send email to oopsmp/AT/rice.edu.

Video tutorial

If you have never used SketchUp before, it is recommended that you watch some of the Google SketchUp tutorial videos first. Below are tutorials on how to use the plugin.

  1. Defining your motion planning problem
  2. Solving your motion planning problem
  3. Animating your solution

SketchUp plugin FAQ

  1. Why would I want to run OOPSMP with a simple, blocky robot and later replace it with a more intricate one?
  2. How do I tell which solution corresponds to each query?
  3. OOPSMP seems to be locking up my computer when it runs from within Sketchup. Why is this?
  4. OOPSMP never seems to find a solution to my queries, and runs indefinitely. Why?
  5. I am unable to run OOPSMP in Sketchup. What am I doing wrong?
  6. Do I have to set the variables of each planner when solving queries?
  7. How do I access my OWN planners through the plugin?
  8. My robot seems to "jump" or go through walls that should be solid surfaces. Why is this?
  9. I ran OOPSMP and was animating from the solution file. I tried running OOPSMP again and now the file I was reading from was overwritten! What happened?
  10. Why do you suggest avoiding the circle tool?
  11. What other things should I avoid?
  12. The animation window reads "Invalid save file." What's going on?
  13. I'm having trouble registering part of my motion planning problem.
  14. Why does the OOPSMP output hang for a long time on "Part 3D..... [ok]"?
  15. How does this plugin work, exactly?

  1. Why would I want to run OOPSMP with a simple, blocky robot and later replace it with a more intricate one?
    A major part of the OOPSMP path-planning process is checking whether the robot collides with its environment. The more complex the robot (and therefore the more faces present), the more time- and resource-consuming the planning will be. For best results, you should keep your robot relatively simple for the planning stage and then replace it later with a complex shape or figure. For instance, if you wanted to animate a space shuttle, you could register a cylindrical robot of approximate size and later replace it with the shuttle.
  2. How do I tell which solution corresponds to each query?
    By looking at the OOPSMP output, you can see which queries were solved. The solutions are listed in the animation window in the order that you defined the queries. For instance, if you ran 7 queries and queries number 2, 4, and 5 were solved, then that would be the order that the solutions would appear in the animation window.
  3. OOPSMP seems to be locking up my computer when it runs from within Sketchup. Why is this?
    This should only occur on MS Windows machines. It is not harmful in any way and it is best to wait until OOPSMP completes execution before attempting to do other things.
  4. OOPSMP never seems to find a solution to my queries, and runs indefinitely. Why?
    Some planning problems are simply impossible to solve, or you are restricting the planner too much for it to find a solution. One thing to note in the "Export to OOPSMP" window: when the Run Graphically checkbox is unchecked, two text fields appear allowing you to set the preprocess and solve times. These are set by default at infinity, but you can easily specify how many seconds you would like the planner to run. If you have accidentally run a solution on infinite time that appears unsolvable, open your process manager and kill the OOPSMP process.
  5. I am unable to run OOPSMP in Sketchup. What am I doing wrong?
    Most likely, you did not install OOPSMP (which automatically also installs the plugin) or the oopsmpprefix.txt file in the plugin directory, oopsmpext, contains the wrong paths. For each path in oopsmpprefix.txt, the plugin tries to find the executable in the subdirectories bin, bin/Debug, and bin/Release. It tries to find the libraries in the subdirectories lib/OOPSMP, lib/OOPSMP/Debug, and lib/OOPSMP/Release. If your build process puts the binary and libraries elsewhere, either change the function get_valid_path in the plugin file oopsmp_rub.rb or move your binary and libraries to the right place.
  6. Do I have to set the variables of each planner when solving queries?
    No. You only use one global and one local planner for each time OOPSMP executes. The parameters of the planners you are not using are irrelevant.
  7. How do I access my OWN planners through the plugin?
    One of the exciting features of the SketchUp plugin is that you can easily include in Sketchup any motion planners you have written. Assuming you've written the C++ code defining the planner and linked it into OOPSMP, look in the /plugins/oopsmpext/planners folder to find a Ruby file defining each of the global and local planners that are included in Sketchup. Even if you don't know Ruby, just follow the syntax of the planner files to create your own specifying the names and number of parameters that your planner takes. Finally, fill in the method declaring how these parameters should be written to XML. Direct any questions to the contact information at the bottom of this FAQ.
  8. My robot seems to "jump" or go through walls that should be solid surfaces. Why is this?
    The most likely reason is that you have set the value of your local planner check resolution too high. The check resolution determines the regular distances that the planner checks for collisions, so if this resolution is too high, the robot will be able to travel through walls without knowing it has collided with anything. Try using a finer resolution (found in the "Export to OOPSMP" window under local planner) by lowering the value by factors of ten until you notice correct results. The way OOPSMP handles check resolution is a bit unintuitive so experimentation is probably the best course of action. With default setting the plugin picks a value based on the length of the smallest edge in the environment and robot.
  9. I ran OOPSMP and was animating from the solution file. I tried running OOPSMP again and now the file I was reading from was overwritten! What happened?
    Each time OOPSMP executes, it generates a solution file by the same name in the same directory (MotionPlanningSolutionsFile.txt), overwriting the previously written file. To preserve these files (for later animation), simply move the file to another location so it will not be overwritten. It is good to note that these files can be used on any machine, not just the one they were generated on. One caveat: remember not to run solution files from a different set of queries than the one it was generated from! Solutions are dependent on queries. Doing this will not hurt anything, but your robot will most likely just move in an unintelligible pattern corresponding with another motion planning problem.
  10. Why do you suggest avoiding the circle tool?
    Sketchup defines circles as a 24-sided polygon, and we have noticed that this concentration of tiny faces in the workspace can sometimes confuse the planner. Symptoms such as robots traveling through walls may occur. Usually, hexagons are just as well suited for the job, and if you are very concerned with having round objects, replace the hexagons with circles after the queries have been solved.
  11. What other things should I avoid?
    Don't rescale the entire robot or workspace component using the scale tool. If you want to rescale either of these, double-click into the component, hit Ctrl-A (or Command-A) to select all entities, and then resize using the rescale tool. Rescaling the entire component by itself leads to unpredictable results.
  12. The animation window reads "Invalid save file." What's going on?
    In this case the file that the animation window is running is probably not a well-formed solutions file. Open the file you are trying to run and look at the text. A valid solutions file will look something like:
    6
    1.2 3.2 4.0 .002 .0023 .1232 .234
    1.2 34.2 99.5 342.344 1 123 584.234
    ...
    
    In other words, a single number followed by a series of 7-number lines. XML is used as input for OOPSMP, not as output.
  13. I'm having trouble registering part of my motion planning problem.
    The key thing to remember is to designate your robot and environment as Sketchup Components. Highlight the whole body, press the G key or go to "Edit/Make Component" to create a component. It really doesn't matter what you name the component, or even if you name it at all.
  14. Why does the OOPSMP output hang for a long time on "Part 3D..... [ok]"?
    This is not OOPSMP freezing; it is an issue with the Ruby output buffer. Upon completing execution, the rest of the OOPSMP output will be displayed to the screen.
  15. How does this plugin work, exactly?
    The plugins are written entirely in Ruby, and use the standard Sketchup Ruby API. The dialog windows use html and javascript as well as the Mootools framework for cosmetic effects. To interface with OOPSMP we used "popen" commands from Ruby.