Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
urdfgenpy
urdfgenpy

User Guide

  • Getting Started
  • Examples
    • Simple Arm - 4-DOF serial manipulator
    • Hobu - Differential-drive mobile robot
    • PTU - 2-DOF pan-tilt unit
  • Development Guide
  • Building the Documentation

Reference

  • API Reference
    • Robot
    • Link
    • Joint
    • Elements
    • Geometry
    • Inertia
    • Exporters
  • Roadmap
Back to top
View this page
Edit this page

Link¶

class urdfgenpy.Link(name, visuals=<factory>, collisions=<factory>, inertial=None)[source]¶

Bases: object

A rigid body in the robot kinematic tree.

Parameters:
  • name (str) – Unique link name.

  • visuals (list[Visual]) – List of :class:’Visual’ elements (rendered appearance).

  • collisions (list[Collision]) – List of :class:’Collision’ elements (physics shape).

  • inertial (Optional[Inertial]) – Optional :class:’Inertial’ element (mass/inertia).

name: str¶
visuals: list[Visual]¶
collisions: list[Collision]¶
inertial: Inertial | None = None¶
add_visual(visual)[source]¶

Append a :class:’Visual’ element and return ‘self’ for chaining.

Parameters:

visual (Visual) – The visual element to add.

Return type:

Link

Returns:

This – class:’Link’ instance.

add_collision(collision)[source]¶

Append a :class:’Collision’ element and return ‘self’ for chaining.

Parameters:

collision (Collision) – The collision element to add.

Return type:

Link

Returns:

This – class:’Link’ instance.

set_inertial(inertial)[source]¶

Set the :class:’Inertial’ element and return ‘self’ for chaining.

Parameters:

inertial (Inertial) – The inertial element to assign.

Return type:

Link

Returns:

This – class:’Link’ instance.

to_xml(indent='')[source]¶

Return the ‘<link>’ XML block string.

Parameters:

indent (str) – Leading whitespace prepended to each line.

Return type:

str

Returns:

A multi-line ‘<link>…</link>’ XML string.

Next
Joint
Previous
Robot
Copyright © 2024, Vaibhav Shende
Made with Sphinx and @pradyunsg's Furo
On this page
  • Link
    • Link
      • Link.name
      • Link.visuals
      • Link.collisions
      • Link.inertial
      • Link.add_visual()
      • Link.add_collision()
      • Link.set_inertial()
      • Link.to_xml()