Simulation Construction Set

Simulation Construction Set

  • IHMC Home
  • All IHMC Docs
  • About IHMC

›Getting Started

Getting Started

  • Quick Start
  • Requirements
  • Using IHMC Open Robotics Software .jar releases with Maven/Gradle
  • Building .jars
  • Depending Directly on the Source

Using the SCS GUI

  • Running a simulation
  • Changing the Camera Settings
  • SCS Variables
  • Graphing Variables
  • Simulation Replay
  • Data Buffer
  • Exporting Data
  • Export Snapshots and Video of the 3D View

Creating a New Simulation

  • Summary
  • Create a New Project
  • SimplePendulumSimulation.java
  • SimplePendulumRobot.java
  • Run the simulation

Adding Control to a Simulation

  • Summary
  • Adding control to a simulation
  • Run the simulation

Creating Links

  • Summary
  • Creating Links
  • Run the Simulation

Creating Robot with Multiple Joints

  • Summary
  • Create a New Package
  • Mobile Simulation
  • Initial Variables in MobileRobot Class
  • MobileRobot Class Description

Ground Contact Modeling

  • Summary
  • Create a New Package
  • Create a New Class FallingBrickSimulation
  • Create a New Class FallingBrickRobot
  • Create a New Class WavyGroundProfile
  • Description and Analysis

Implementing Closed-Chain Mechanisms Using External Force Points

  • Summary
  • Implementing Closed-Chain Mechanisms
  • FlyballGovernorSimulation Class
  • FlyballGovernorRobot Class
  • FlyballGovernorSimpleClosedLoopConstraintController Class
  • FlyballGovernorCommonControlParameters Class
  • Description and Analysis

Depending Directly on the Source

For the IHMCOpenRoboticsSoftware and ihmc-build to work correctly when depending directly on the source, the Gradle project hierarchy needs to take a particular form. Let's assume you have a directory structure such as:

.<your Gradle root project>
├── build.gradle
├── settings.gradle
├── ProjectA
├── ProjectB
├── IHMCOpenRoboticsSoftware
│   └── Acsell
│   └── Atlas
│   └── CommonWalkingControlModules
├── ProjectC
└── ...

You will need to modify the root project settings.gradle to set up your project hierarchy correctly. The important thing is that you will need both :IHMCOpenRoboticsSoftware as well as the various :IHMCOpenRoboticsSoftware:<Sub Project> items in the Gradle hierarchy, even though IHMCOpenRoboticsSoftware doesn't contain any of its own Java source. This can be tedious to set up by hand, so we usually write our settings.gradle to do some naive dynamic generation of dependencies.

An example settings.gradle similar to what our developers use could look like the following:

rootProject.name = '_Foo' // Your root project name goes here

def codeDir = rootProject.projectDir

def isGradleProjectFilter = new FilenameFilter() {
    @Override
    boolean accept(File dir, String name) {
        File f = new File(dir, name).getCanonicalFile();
        return f.isDirectory() && new File(f, "build.gradle").exists();
    }
}

codeDir.list(isGradleProjectFilter).each { mainProject ->
    include "${mainProject}"

    project(":${mainProject}").projectDir.list(isGradleProjectFilter).each { subProject ->
        include "${mainProject}:${subProject}"
    }
}

If this is set up correctly, you can either apply the ihmc-build plugin from the Plugin portal and use the dependency resolver methods exposed by the build extensions, or you can manually identify dependencies on projects using the normal Gradle syntax for project dependencies. A sample build.gradle dependency block:

dependencies {
  compile project(':IHMCOpenRoboticsSoftware:IHMCJavaToolkit') // normal Gradle way of doing things
}

/* OR */

dependencies {
  compile ihmc.getProjectDependency(':IHMCJavaToolkit') // ihmc-build way of doing things
}
← Building .jarsRunning a simulation →
Simulation Construction Set
Docs
Quick StartSoftware Documentation
Community
GitHubFacebookTwitterYouTube
Copyright © 2018 IHMC Robotics