StoglRobotics / ros_team_workspace

RosTeamWorkspace is a framework for boosting collaboration in teams when developing software for robots using Robot Operating System (ROS1 and ROS2).
https://rtw.stoglrobotics.de
Apache License 2.0
79 stars 17 forks source link

Optimize descritpion to be usable also remotely #202

Open destogl opened 2 months ago

destogl commented 2 months ago

For the remote access fo the robot description, e.g., when running software on the robot and showing data on a remote computer, we need to use package://-form of accessing meshes to have paths resolved properly. Therefore we need to all this snippet to our templates:

<xacro:if value="${simulation}">
      <xacro:property
        name="file_prefix"
        value="file://$(find maha_description)"
        />
    </xacro:if>
    <xacro:unless value="${simulation}">
      <xacro:property
        name="file_prefix"
        value="package://maha_description"
      />
    </xacro:unless>

and then use <mesh filename="${file_prefix}/meshes/ everywhere.

Nibanovic commented 2 months ago

I've addressed this in a commit in gazebo_template PR, as it already has gazebo set up for me to test this.

Test:

Added the flag, generated the description package and added a dummy base_link.stl into the generated package.

Expectations:

Launching both regular and gazebo bringup should spawn with base_link.stl as geometry, without any errors from Gazebo

Result:

Everything works as expected