Ask Your Question
1

Partial conversion from .urdf.xacro to urdf

asked 2014-06-17 13:20:44 -0600

djano_p gravatar image

I have a .urdf.xacro files to be converted to urdf files. The problem is it is partially converted. I have used the following command:

rosrun xacro xacro.py <name_of_the_file>.urdf.xacro > <name_of_the_new_files>.urdf

The file, <name_of_the_new_file>.urdf only has following in it:

<robot xmlns:controller="htp://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="htp://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:sensor="htp://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:xacro="htp://ros.org/wiki/xacro"> </robot>

There are other parameters including xacro:include, xacro:property and xacro:macro following the the <robot xmlns=""> in the urdf.xacro file.

There is no error while parsing. I tried on various laptops too. I have fuerte and groovy installed and I have directed bashrc to fuerte.

What could be the problem ?

edit retag flag offensive close merge delete

Comments

please ignore the http, i have put only htp to post the question.

djano_p gravatar imagedjano_p ( 2014-06-17 13:21:17 -0600 )edit

Can you post the files?

David Lu gravatar imageDavid Lu ( 2014-06-17 14:21:22 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-06-17 18:20:32 -0600

David Lu gravatar image

In your xacro files, you have defined your macros, but not actually used them. Check out http://wiki.ros.org/urdf/Tutorials/Us... for more help.

edit flag offensive delete link more
0

answered 2014-06-17 14:51:09 -0600

djano_p gravatar image

(ignore htp, it is http in actual file)

base.urdf.xacro is as follows:

<robot xmlns:sensor="htp://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:controller="htp://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="htp://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:xacro="htp://ros.org/wiki/xacro"> <xacro:include filename="$(find rob_description_rave)/urdf/base/base_rev.transmission.xacro"/> <xacro:property name="M_PI" value="3.1415926535897931"/> <xacro:macro name="rob_base_v0" &gt;="" <joint="" name="base_rev_joint" type="continuous"> <origin xyz="0 0 0" rpy="0 0 0"/> <axis xyz="0 0 1"/> <dynamics damping="1" friction="1"/> <parent link="base_transy_link"/> <child link="base_link"/> </joint> <link name="base_link"> <inertial> <mass value="200"/> <origin xyz="0 0 0"/> <inertia ixx="10." ixy="-0." ixz="0." iyy="10." iyz="-0." izz="10."/> </inertial> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://rob_description_rave/meshes/base.stl" scale="0.001 0.001 0.001"/> </geometry> <material name="LightGrey"> <color rgba="0. 1.0 0. 0.6"/> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <mesh filename="package://rob_description_rave/meshes/base.stl" scale="0.001 0.001 0.001"/> </geometry> <surface> <friction> <ode mu="0" mu2="0" fdir1="0 0 0" slip1="1" slip2="1"/> </friction> </surface> </collision> </link> <gazebo reference="base_link"> <material>Gazebo/Grey</material> <turngravityoff>true</turngravityoff> </gazebo> <xacro:base_rev_transmission_v0/> </xacro:macro> </robot>

//-----------------------------------------------//

base_rev.transmission.xacro

<robot xmlns:sensor="htp://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:controller="htp://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="htp://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:xacro="htp://ros.org/wiki/xacro"> <xacro:macro name="base_rev_transmission_v0"> <transmission type="pr2_mechanism_model/SimpleTransmission" name="base_rev_trans"> <actuator name="base_rev_motor"/> <joint name="base_rev_joint"/> <mechanicalreduction>1.0</mechanicalreduction> <motortorqueconstant>1.0</motortorqueconstant> </transmission> </xacro:macro> </robot>

/-----------------------------------/

I am trying to convert base.urdf.xacro to base.urdf.

base.urdf is as follows:

<robot xmlns:controller="htp://playerstage.sourceforge.net/gazebo/xmlschema/#controller" xmlns:interface="htp://playerstage.sourceforge.net/gazebo/xmlschema/#interface" xmlns:sensor="htp://playerstage.sourceforge.net/gazebo/xmlschema/#sensor" xmlns:xacro="htp://ros.org/wiki/xacro"> </robot>

edit flag offensive delete link more

Comments

Please edit your original question instead of answering your question.

David Lu gravatar imageDavid Lu ( 2014-06-17 15:17:56 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-06-17 13:20:44 -0600

Seen: 807 times

Last updated: Jun 17 '14