Adding Custom URDF Robot Models
See original GitHub issueDescribe the bug Adding new URDF models (that refer to stl files) needs a relative path to the XACRO path in rtbdata.
ValueError: file xacro/stl/braccio_base.stl not found locally or in rtbdata
Any help on how to do this properly will be highly appreciated. Here’s a snapshot of the code we have written:
class Braccio(rtb.ERobot):
def __init__(self):
links, name, urdf_string, urdf_filepath = self.URDF_read(
rtb.rtb_path_to_datafile("../urdf/braccio.urdf.xacro", local=True)
)
super().__init__(
links,
name=name,
manufacturer="Arduino",
gripper_links=links[12],
urdf_string=urdf_string,
urdf_filepath=urdf_filepath,
)
We would like to keep the URDF model information local to our project than to move it to our installation folders. The code that parses xacro files seems to look for geometry files relative to the XACRO directory.
Version information
Did you install it from PyPI or GitHub? Latest Github version (pulled) Commit hash: 51aa8bbb3663a7c815f9880d538d61e7c85bc470
Environment (please complete the following information):
- Ubuntu 18.04.
- Python 3.6.9.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Building a Visual Robot Model with URDF from Scratch
In later tutorials, you'll learn how to articulate the model, add in some physical properties, generate neater code with xacro and make it...
Read more >URDF Models and 3D Models for Your Robotics Project
URDF Models and Standard 3D Models are valuable tools for any robotics project. We provide both of these models for our line of...
Read more >3.7. Creating a URDF with an UR5 robot and a custom end ...
Creating a URDF with an UR5 robot and a custom end-effector. 3.7.1. Export your meshes. In ROS, robot link (and end-effector) geometry is...
Read more >Tutorial: Using a URDF in Gazebo
For your own custom robot, we assume its URDF lives in a ROS package named MYROBOT_description in the subfolder /urdf . The method...
Read more >It is not possible to add new URDF robots in different path of ...
you have a xacro folder with a custom urdf project in the place of the ipynb. you create a robot in a cell...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I use os.chdir(os.path.dirname(file)) to solve the problem about absolute path.
https://github.com/olmerg/rtb_serial_robot/blob/main/planar_3dof/Planar3DOF.py
The behaviour we should have is that if an abs path is given it should use that, rather than the package relative one.
@pranshumalik14 would that work for you?