Simulation Construction Set

Simulation Construction Set

  • IHMC Home
  • All IHMC Docs
  • About IHMC

›Creating Links

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

Creating Links

In this tutorial we will create various shapes and add them to a link. The next figure shows eleven different shapes, each with a coordinate system at their origin point.

 Eleven example shapes. Coordinate systems are located at the origin of each shape.

Eleven example shapes. Coordinate systems are located at the origin of each shape.

1. Create a new package with the name linkExamples

This should have the same folder structure that you used in the Pendulum Example. Your new linkExamples package should be within your us.ihmc.exampleSimulations package.

2. Add the class LinkExamplesSimulation

Create a new class in the us.ihmc.exampleSimulations.linkExamples package called LinkExamplesSimulation

3. Fill in LinkExamplesSimulation as follows:

The following code is where you will be declaring final variables for shapes like a sphere, ellipsoid, cylinder, arc torus, and wedge.

We typically declare these variables separately than the creation of the shapes so that they can can be more easily changed and found.

The parameters that adjust placement and spacing of the shapes are the OFFSET and COORD_LENGTH.

4. Add a constructor to your LinkExamplesSimulation class

The structure of this code should now be familiar to you. Notice, however, that this is purely a static graphic we are creating. There is no robot, and thus no dynamics.
This will allow us to focus on creating the graphics of a link.

5. Next add the method exampleShapes to your LinkExampleSimulation class

This method will show you examples of how to create simple shapes, assign a color, and add them to your simulation.

In this method there are examples of a Sphere, Ellipsoid, Cylinder, ArcTorus, Extruded Polygon, Mesh Data, and a Gridded Polytope.

6. Add the main method to your class

This method should just simply create a new LinkExamplesSimulation.

Just as follows:

Full code for the class

Link Examples Simulation

← SummaryRun the Simulation →
Simulation Construction Set
Docs
Quick StartSoftware Documentation
Community
GitHubFacebookTwitterYouTube
Copyright © 2018 IHMC Robotics