Why isn't xacro detecting my "turtlerobot_description" file?

Hello! I recently got into ROS and simulating robots and I started with the official Nvidia guide that talks about the turtlerobot3. I downloaded ROS and everything according to their guide, but when I git cloned the repo and tried the xacro command, I get the following error:

Why isn’t it detecting the “turtlebot_description” folder? These are the commands I run every time (I should place them in bashrc so that I don’t have to do this again and again):

source /opt/ros/humble/setup.bash
export TURTLEBOT3_MODEL=burger
cd .../urdf
xacro turtlebot3_burger.urdf.xacro > turtle1.urdf

And then it gives me this:
"package not found: "package 'turtlebot3_description' not found, searching: ['/opt/ros/humble']"

And I even tried placing the file in $ROS_PACKAGE_PATH with:
export ROS_PACKAGE_PATH=/user1/codes/turtlebot3/turtlebot3/:/opt/ros/humble/share

And if I do
I get:
Which is correct! It should detect the turtlebot_description within the turtlebot3 folder. But it doesn’t. So what am I doing wrong?

1 Like

Hi @nto if the xacro indeed exists in the turtlebot_description folder I am not sure why you are getting this error.

Apart from that the ROBOTIS team in charge of developing and maintaining the turtlebot, they also have branches with just urdf files, I suggest you download the urdf directly and use it for example from the ros2 branch: https://github.com/ROBOTIS-GIT/turtlebot3/tree/ros2/turtlebot3_description/urdf . You should be able to skip the xacro > urdf conversion step and use the urdf directly. It is not the most updated turtlebot, but it will help you move forward with the tutorials.

Let me know if this is not what you are looking for and I can try to help.

It looks like you are using ROS2, ROS2 does not use the environment variable ROS_PACKAGE_PATH. and it looks like it’s searching for “turtlebot3_description” only in the original folder where ros is installed, so I’m guessing you didn’t build and install your new turtlebot3_description package. Try colcon build inside the workspace that contains the turtlebot3_descrption package, that should give you an install folder in the workspace, and then create an overlay by source install/local_setup.bash.

This page in the ROS2 tutorial should have more detailed info.