Robotics StackExchange | Archived questions

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

image description

Basic launch file which is working (I don't know why I cannot paste it) niryooneworld.launch

I attached it cause I cannot paste paste it niryocubeworld.world

The problematic model is the one from line 3 to 98, especially when I define lines 30 to 35

image description

materail 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>

Asked by RemiL on 2020-04-01 11:14:35 UTC

Comments

Answers

Need to use a tree folders as in gazebo folder. working now

Asked by RemiL on 2020-04-05 14:50:01 UTC

Comments