jupyter-robotics / jupyterlab-urdf

A URDF viewer and editor extension for JupyterLab.
https://jupyterlab-urdf.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
97 stars 9 forks source link

Limit tag for joints #16

Closed vkmb closed 2 years ago

vkmb commented 2 years ago

The URDF renderer doesn't show the joint motions if the limit is not defined in the xml for joint types prismatic and revolute. But the controller ui seems to fallback to limit implementation of the continuous joint. A default limit for prismatic and revolute joints (floating, unknown, planar can be ignored as they don't seem to be supported officially) can be made available.

Jupyter Env Info:

Name Version Build Channel
jupyter 1.0.0 py39h6e9494a_7 conda-forge
jupyter-packaging 0.12.2 pyha770c72_1 conda-forge
jupyter-ros 0.5.0 pyhd8ed1ab_0 robostack
jupyter_client 7.3.4 pyhd8ed1ab_0 conda-forge
jupyter_console 6.4.4 pyhd8ed1ab_0 conda-forge
jupyter_core 4.11.1 py39h6e9494a_0 conda-forge
jupyter_server 1.18.1 pyhd8ed1ab_0 conda-forge
jupyterlab 3.4.4 pyhd8ed1ab_0 conda-forge
jupyterlab-ros 0.2.1 py_0 robostack
jupyterlab-urdf 0.1.1 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge
jupyterlab_server 2.15.0 pyhd8ed1ab_0 conda-forge
jupyterlab_widgets 1.1.1 pyhd8ed1ab_0 conda-forge

testfile.urdf

<?xml version="1.0" ?>
<robot name="robot3" version="1.0">
    <link name="base_link">
        <visual>
          <origin xyz="0 0 0.5" rpy="0 0 0"/>
          <geometry>
            <box size="15 15 1"/>
          </geometry>
          <material name="red">
            <color rgba="1 0 0 1"/>
          </material>
        </visual>
    </link>
    <link name="link1">
        <visual>
          <origin xyz="0 0 1.5" rpy="0 0 0"/>
          <geometry>
            <box size="1 1 1"/>
          </geometry>
          <material name="blue">
            <color rgba="0 0 1 1"/>
          </material>
        </visual>
    </link>
    <joint name="base_to_link1" type="revolute">
        <origin xyz="-7 7 0" rpy="0 0 0"/>
        <axis xyz="1 0 0"/>
        <parent link="base_link"/>
        <child link="link1"/>
        <limit effort="100" lower="0" upper="14" velocity="1"/>
    </joint>
</robot>

image image