Robot models and visualization for the COMPAS framework.
- 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
pip install compas_robotsimport 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()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)Full documentation, tutorials, and examples at compas.dev/compas_robots.
git clone https://github.com/compas-dev/compas_robots
cd compas_robots
pip install -e ".[dev]"invoke lint # check style
invoke format # auto-formatinvoke testinvoke docsReleases follow semver:
invoke release minorMIT. See LICENSE.