ROS cannot make Gazebo load texture
Hi, I'm answering this question because it has been 1 day since I am struggling with this issue.
I want to reproduce an A4 paper sheet with an image print on it, on Gazebo. I have created a cuboid shape to represent the paper sheet on Gazebo and I try to paste the texture image on it. My model should be in a gazebo world, which is run via a roslaunch file.
As the ROS package should be shareable, I want to have the texture image in the ROS package folder
The issue is : Gazebo does not find the texture file in my ROS package. Even if I specify/export models path, it keeps not finding my texture file if it is not place in Gazebo default models folder. I am now going to describe my environment
[Everything I'm going to say is working if my texture is placed in the Gazebo root folder /usr/share/gazebo/...]
My package organisation is
- launch file
Basic launch file which is working (I don't know why I cannot paste it) niryo_one_world.launch
- world file
I attached it cause I cannot paste paste it niryo_cube_world.world
The problematic model is the one from line 3 to 98, especially when I define <material> lines 30 to 35
- material file
- package.xml File
Basic package.xml, I just add this code at the end to be sure my models path is set:
<exec_depend>gazebo_ros_control</exec_depend>
<exec_depend>gazebo_ros</exec_depend>
<export>
<gazebo_ros gazebo_model_path="$(find niryo_one_gazebo)/models"/>
<gazebo_ros gazebo_media_path="$(find niryo_one_gazebo)/models"/>
</export>