Skip to content

Latest commit

 

History

History
165 lines (113 loc) · 7.97 KB

README.md

File metadata and controls

165 lines (113 loc) · 7.97 KB

Onshape to robot examples

Here you will find several examples of robots that were design to be exported properly using the onshape-to-robot tool.

Have a look at the design-time considerations to understand better the constraints to export your robots to URDF/SDF.

Before testing, in a nutshell, you need onshape-to-robot:

pip install onshape-to-robot

This repository contains both config.json file and resulting URDF, SDF and STL files. Thus, they can seen in a physics environment easily using:

onshape-to-robot-bullet [directory]

This will open a windows like the following one, including sliders to change the degree of freedom positions:

bullet window

Robots

2 wheels

Description: Very simple design and minimalistic configuration

  • Give it a try: onshape-to-robot-bullet 2wheels
  • Onshape design
  • config.json
  • Note: joints names ends with _speed, which makes onshape-to-robot use speed control by default
  • Note2: here, wheel2 has the _inv suffix, which changes its direction making both wheels spin in same direction when same sign of order is given

Adjustable height arm

Description: Robot with 4 degrees of freedom, one prismatic (linear) joint and 3 rotations

  • Give it a try: onshape-to-robot-bullet -f adjustable_height_arm (note that -f is passed to fix the base to the ground)
  • Onshape design
  • config.json
  • There is one frame (frame_tip) attached to the tip of the arm

Omnidirectional

Description: Example of (not implemented) omnidirectional robot using omni wheels (holonomic)

  • Give it a try: onshape-to-robot-bullet omnidirectional
  • Onshape design
  • config.json
  • Each small wheel is a degree of freedom. This is not very hard to do, even though a little tedious.
  • There is a frame (frame_body) in the very center of the robot. A visual arrow is part of the plate to indicate the front (axis X) of the robot.

Quadruped

Description: 12 DOF quadruped robot, design similar to the Metabot open-source project using XL-320 servos.

  • Give it a try: onshape-to-robot-bullet quadruped
  • Onshape design
  • config.json
  • Full pure shape approximation (OpenSCAD) for collisions
  • Frames in the trunk (trunk_frame) and in the tip of one leg (tip_frame)

Dog

Description: 12 DOF dog robot, made for fun with MX-64 servos (was actually built)

  • Give it a try: onshape-to-robot-bullet dog
  • Onshape design
  • config.json
  • No pure shape approximation (pure STLs)
  • Dynamics is overridden for MX-64 and MX-106, since it is provided by constructor

Sigmaban2019

Description: 20 DOF humanoid robot, snapshot of 2019 Sigmaban model from team [Rhoban][https://www.youtube.com/watch?v=tF0cr0PYjsk), used at RoboCup kid size

  • Give it a try: onshape-to-robot-bullet sigmaban2019
  • Onshape design
  • config.json
  • Full pure shape approximation (OpenSCAD) for collisions
  • Dynamics is overridden for [MX-64][http://emanual.robotis.com/docs/en/dxl/mx/mx-64-2/) and MX-106, since it is provided by constructor
  • Pure shapes are rendered for speed, you can set drawCollisions do false and re-run import to have real meshes visual
    • (To lighten the repository, meshes were not committed)
  • Frames in the trunk (trunk_frame), in feet (right_foot_frame, left_foot_frame), the camera (camera_frame), the head base (head_base_frame) and some location to use Vive tracker for ground-truth (vive_frame`).

Field

Description: This is not actually a robot, but an environment that is designed in Onshape and can be converted into an URDF file

  • Give it a try: onshape-to-robot-bullet field
  • Onshape design
  • config.json
  • Note that the noDynamics is set to true in the configuration, making it a static environment
  • This is a model of RoboCup humanoid soccer kid-size (2019) 6 x 9 m field
  • The useFixedLinks option is set to true so that the colors of different sub-part are kept

Re-running the imports yourself

Instructions

Read the instructions from the onshape-to-robot repository, especially be sure to have the API key registered and set as environment variable before running onshape-to-robot.

To get the same results, you might need openscad and meshlab installed.

sudo apt-get install openscad meshlab

Else, pure shape approximation and meshes simplification might be disabled.

Why do I get ERROR (403) while using OnShape API ?

If you want to export the robots yourself, you need to have the rights to access to the assembly. Thus, if you want to re-run the import for the examples in this repository, you will have to make your own copy of the document. Fortunately, this is quite simple because it is just about clicking on that button on top left:

make a copy

Then, change the documentId in config.json of the robot to match the new document created where you own the robot design.

Why the colors are looking weird in pyBullet ?

Actually, pyBullet does only keep one color per link currently in the viewer. This is a known limitation that does not affect your physical simulations. (bulletphysics/bullet3#2650)

For instance, the quadruped robot above will look like this:

Quadruped