Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URDFSpawner does not set the robot Physics & BoundingObject when the base link does not have a collision tag #201

Open
PymZoR opened this issue Dec 13, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@PymZoR
Copy link
Member

PymZoR commented Dec 13, 2022

Describe the Bug
A common use in the ROS world of the urdf file associated with the robot_state_publisher node and the tf_system is to set up all the static_transforms known in advance directly in the urdf file. For instance, it's common to have the base_footprint -> base_link static joint, where base_footprint is a "virtual" link with no Solid attached to it. When spawining, the resulting robot does have neither Physics or BoudingObject properties set, resulting in a robot not in kinematic behavior.

In addition, the base link is converted as a Solid where a Transform would be more appropriate. More generally, an empty link should result in a Transform in webots, a link with only a <visual> tag should result in a Transform + a Shape, and only a link with a <collision> tag should result in a Solid.

Steps to Reproduce
Consider the following urdf file :

<?xml version="1.0"?>
<robot name="myrobot"
    xmlns:xacro="http://ros.org/wiki/xacro">

    <!-- BASE FOOTPRINT -->
    <link name="base_footprint"></link>

    <joint name="base_link_joint" type="fixed">
        <parent link="base_footprint" />
        <child link="base_link" />
        <origin xyz="0 0 1" />
    </joint>


    <!-- BASE LINK -->
    <link name="base_link">
        <visual>
            <origin xyz="0 0 0.075" />
            <geometry>
                <box size="0.3 0.3 0.15" />
            </geometry>
        </visual>
        <collision>
            <origin xyz="0 0 0.075" />
            <geometry>
                <box size="0.3 0.3 0.15" />
            </geometry>
        </collision>
    </link>

</robot>

Expected behavior
With the urdf provided, the robot should be in kinematic mode. In addition, the base link is converted as a Solid where a Transform would be more appropriate. More generally, an empty link should result in a Transform in webots, a link with only a <visual> tag should result in a Transform + a Shape, and only a link with a <collision> tag should result in a Solid.

Affected Packages
List of affected packages:

  • webots_ros2_driver

System

  • Webots Version: R2023a for macOS
  • ROS Version: Humble
  • Operating System: Ubuntu jammy in docker, host macOS Monterey 12.2.1, using local_simulation_server.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants