Robotics StackExchange | Archived questions

how to use urdf.xacro file in Gazebo???

Hello all.

I have to load a .urdf.xacro file using the gazebo2.2. The file of my interested is https://github.com/ipa320/schunk_modular_robotics.git

I'm trying to this command on ROS-indigo rosrun xacro xacro.py lwa.urdf.xacro but,

<?xml version="1.0" ?> <!-- =================================================================================== --> <!-- | This document was autogenerated by xacro from lwa.urdf.xacro | --> <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | --> <!-- =================================================================================== -->

It just show above result, not convertion How to convert xacro -> urdf OR How to using xacro file on gazebo??

Thank you!

Asked by erchamion on 2015-06-25 03:11:27 UTC

Comments

Answers

In your launch file, add a line to convert your .xacro file to .urdf. Gazebo can handle urdf directly, and a python script exists for the same. Here it is:

<param name="robot_description" command="$(find xacro)/xacro.py $(find $DIRECTORY_WITH_ROBOT_DESCRIPTION_FILES)/urdf/$YOUR_FILE_NAME.urdf.xacro" />

Asked by karthikj219 on 2016-05-23 00:21:14 UTC

Comments