Home | Tutorials | Wiki | Issues
Ask Your Question
0

Questions to SDF, urdf, xacro, material, textures using Gazebo

asked 2017-03-24 08:50:19 -0500

cyborg_x1 gravatar image

Hi,

My question is basically how to add material scripts with a ROS package,and to use it within xacro files like the standard Gazebo material so I also get textures.

I started this question in ros.answers.org cause I thought it has more to do with ros, catkin and xacro.

But maybe a cross link here to it, can do no harm.

I don't know if that's the correct way to do so, but it relates to both Gazebo and ROS. If the cross link to ROS answers is not wanted, you can just delete this post.

Regards,

Christian

edit retag flag offensive close merge delete

Comments

I think it's fine to cross-post in this case. And it would be great if you could port the best answer to the other site ;)

chapulina gravatar imagechapulina ( 2017-03-24 11:17:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-03-24 11:29:16 -0500

cyborg_x1 gravatar image

Found the way to do it. This works for me:

Well in the package.xml you need:

<run_depend>gazebo_ros</run_depend>

<export>    
  <gazebo_ros gazebo_media_path="${prefix}"/>                             
</export>

${prefix} == package directory

and the folder structure is like this:

  • media
    • materials
      • scripts
      • texture

in the xacro file:

<gazebo reference="link">                           
<material>YourMaterial</material>
</gazebo>

I guess in the process I changed the folder structure multiple times, maybe I first missed the media folder.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2017-03-24 08:50:19 -0500

Seen: 553 times

Last updated: Mar 24 '17