Skip to content

compas-dev/compas_robots

COMPAS Robots

Made with COMPAS PyPI License: MIT

Robot models and visualization for the COMPAS framework.

Features

  • Load and build robot models from URDF files or programmatically
  • Visualize robots in Rhino, Grasshopper, Blender, and the COMPAS Viewer
  • Forward kinematics and configuration management
  • Load geometry from local files or directly from GitHub repositories
  • Attach tools and meshes to robot links

Installation

pip install compas_robots

Quick start

import math
from compas_robots import RobotModel
from compas_viewer import Viewer

model = RobotModel.ur5e(load_geometry=True)

config = model.zero_configuration()
config["shoulder_lift_joint"] = -math.pi / 2
config["elbow_joint"]         =  math.pi / 2
config["wrist_1_joint"]       = -math.pi / 2
config["wrist_2_joint"]       = -math.pi / 2

viewer = Viewer()
scene_object = viewer.scene.add(model)
scene_object.update(config)
viewer.show()

Loading robot models

From a URDF file:

from compas_robots import RobotModel

model = RobotModel.from_urdf_file("ur5e.urdf")

From a GitHub repository:

from compas_robots import RobotModel
from compas_robots.resources import GithubPackageMeshLoader

github = GithubPackageMeshLoader("ros-industrial/abb", "abb_irb6600_support", "kinetic-devel")
model = RobotModel.from_urdf_file(github.load_urdf("irb6640.urdf"))
model.load_geometry(github)

Documentation

Full documentation, tutorials, and examples at compas.dev/compas_robots.

Contributing

Setup

git clone https://github.com/compas-dev/compas_robots
cd compas_robots
pip install -e ".[dev]"

Code style

invoke lint      # check style
invoke format    # auto-format

Tests

invoke test

Docs

invoke docs

Releases

Releases follow semver:

invoke release minor

License

MIT. See LICENSE.

About

Basic infrastructure for working with robots in COMPAS.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages