There's much more ` ign sdf -p ` messes with materials when generating files
for Ignition Gazebo. I'm really curious if someone will do something about it,
because this way, materials are just unusable. They can't even be passed as
blobs to the final SDF because ` <material> ` is one of the unfortunate tags
which get touched by ` ign sdf ` which mangle them like you posted. This is a
real blocker for keeping your robot description written in Xacro while using
it in Ignition Gazebo - yet this approach has so many benefits that I still
choose it over all the other approaches. It seems that so far you have to make
friends with ` sed ` to polish the result of ` ign sdf -p ` .

---

All reactions


edit


##  Question Tools


First time here? Check out the FAQ!


Merged


You seem to be using the Electric version of Gazebo. Please try with Fuerte's
Gazebo, which contains a fix for rendering Collada assets with quads.
Alternatively, to stick with Electric, re-export the file to Collada using
triangle meshes instead of quads (eg. using Meshlab).


No branches or pull requests


3 participants


[ ![Ben B gravatar
image](//www.gravatar.com/avatar/e8232b91ef7a1bc30f2b5f865d8d5ab8?s=16&d=identicon&r=PG)
](/users/136/ben-b/) [ Ben B ](/users/136/ben-b/) (  2013-01-07 19:18:01 -0500
)  edit


Edit 1 [ @Adolfo Rodriguez T ](/users/410/adolfo-rodriguez-t/) :-
I am not able to launch the .dae file :-(, (it seems it need further
processing, as .dae files in gazebo_world are getting launched). What am I
doing wrong? If I am able to spawn and use these models it will save a lot of
time for me.
I downloaded chair from link provided by you (.zip version). It contained :-


2 followers


Follow


Seen: **1,740 times**


_Attention:_ answers.gazebosim.org is deprecated as of August the 11th, 2023.
Please visit [ robotics.stackexchange.com ](http://robotics.stackexchange.com)
to ask a new question. This site will remain online in read-only mode during
the transition and into the foreseeable future. Selected questions and answers
have been migrated, and redirects have been put in place to direct users to
the corresponding questions on Robotics Stack Exchange. Additional details are
[ available here ](https://community.gazebosim.org/t/important-final-ros-
gazebo-answers-migration-schedule/2185) .


* [ gazebo-1.2.5 ](/questions/scope:all/sort:activity-desc/tags:gazebo-1.2.5/page:1/)


* [ tool ](/questions/scope:all/sort:activity-desc/tags:tool/page:1/)


[ ![josephcoombe gravatar
image](/upfiles/avatars/josephcoombe/resized/32/joseph_cropped.png)
](/users/3879/josephcoombe/)


[ **answered 2012-09-03 01:37:18 -0500  ** ](/answers/42874/revisions/)


[
![@peci1](https://avatars.githubusercontent.com/u/182533?s=80&u=58e1314cf6319239ab14eb9e1afaa2cd789fd0b1&v=4)
](/peci1)


[ ![aknirala gravatar
image](//www.gravatar.com/avatar/1384aeb564ffe3c5f91f2a935704967d?s=32&d=identicon&r=PG)
](/users/1931/aknirala/)


Rviz is getting its ` /joint_states ` from a fake ` joint_states_publisher `
node (the window with the slider bars).
###  Examine the RRBot URDF
The rest of this tutorial will refer to various aspects of the RRBot URDF. Go
ahead and view the [ rrbot.xacro file ](https://github.com/ros-
simulation/gazebo_ros_demos/blob/kinetic-
devel/rrbot_description/urdf/rrbot.xacro) now:

    rosed rrbot_description rrbot.xacro

Note that we are using [ Xacro ](http://ros.org/wiki/xacro) to make some of
the link and joint calculations easier. We are also including two additional
files:
  * [ rrbot.gazebo ](https://github.com/ros-simulation/gazebo_ros_demos/blob/kinetic-devel/rrbot_description/urdf/rrbot.gazebo) a Gazebo specific file that includes most of our Gazebo-specific XML elements including the  tags
  * [ materials.xacro ](https://github.com/ros-simulation/gazebo_ros_demos/blob/kinetic-devel/rrbot_description/urdf/materials.xacro) a simple Rviz colors file for storing rgba values, not really necessary but a nice convention
###  View in Gazebo
You should also be able to launch RRBot into Gazebo:

    roslaunch rrbot_gazebo rrbot_world.launch

In the launched Gazebo window you should see the robot standing straight up.
Despite there being no intentional disturbances in the physics simulator by
default, numerical errors should start to build up and cause the double
inverted pendulum to fall after a few seconds. The following is a mid-swing
screenshot of the RRBot:
![](https://github.com/osrf/gazebo_tutorials/raw/master/ros_urdf/figs/Swinging_Arm.png)
Eventually the arm should come to a complete stop. We encourage you to tweak
and test various aspects of the URDF during the following tutorials to help
you learn more about simulating URDF robots.
##  Header of a URDF File
There have been many API changes in Gazebo and the required URDF format, one
of which that Gazebo xml-schema namespaces are no longer needed. If your URDF
has something like:

    <robot xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
           xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
           xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"


I currently did it like this:


I created a chair in urdf. The chair looks like:-


Asked: ** 2017-11-14 01:41:52 -0500  **


[ ![josephcoombe gravatar
image](/upfiles/avatars/josephcoombe/resized/16/joseph_cropped.png)
](/users/3879/josephcoombe/) [ josephcoombe ](/users/3879/josephcoombe/) (
2017-11-16 10:07:18 -0500  )  edit


[ Powered by Askbot version 0.7.58 ](http://askbot.com)


[ How to set a right revolute joint coordinate? ](/question/23560/how-to-set-
a-right-revolute-joint-coordinate/)


##  Question Tools


Milestone


Assignees


[ ![cc-by-sa](/m/default/media/images/cc-by-sa.png?v=28)
](http://creativecommons.org/licenses/by-sa/3.0/legalcode) ROS Answers is
licensed under Creative Commons Attribution 3.0 Content on this site is
licensed under a [ Creative Commons Attribution Share Alike 3.0
](http://creativecommons.org/licenses/by-sa/3.0/legalcode) license.


How to check if this works:


My result test.sdf file:


[ edit ](/s/answers/17826/edit/) flag offensive  delete  [ link
](/question/17810/how-to-support-additional-sdf-elements-ode-bullet-bounce-
etc-in-urdf-file-using-the-gazebo-tag/?answer=17826#post-id-17826 "permanent
link") more


add a comment


[ Ackermann robot URDF or SDF ](/question/24439/ackermann-robot-urdf-or-sdf/)


* [ color ](/questions/scope:all/sort:activity-desc/tags:color/page:1/)


[ Is it possible to define the joint frame? ](/question/24427/is-it-possible-
to-define-the-joint-frame/)


A quick test for a URDF display is: roslaunch urdf_tutorial display.launch
model:=myurdf.urdf For modelling, you can use anything that outputs STL or
collada, like blender.


To see all available qualifiers, see our [ documentation
](https://docs.github.com/search-github/github-code-search/understanding-
github-code-search-syntax) .


[ Sign in
](/login?return_to=https%3A%2F%2Fgithub.com%2Fgazebosim%2Fsdformat%2Fissues%2F513)


[ Joint Trajectory Controller: Joints on incoming trajectory don't match the
controller joints [closed] ](/question/417609/joint-trajectory-controller-
joints-on-incoming-trajectory-dont-match-the-controller-joints/)


Labels


[ bug  ](/gazebosim/sdformat/labels/bug) Something isn't working  [ URDF
](/gazebosim/sdformat/labels/URDF) URDF parsing


Already on GitHub? [ Sign in
](/login?return_to=%2Fgazebosim%2Fsdformat%2Fissues%2Fnew%2Fchoose) to your
account


Include my email address so I can be contacted


    roslaunch gazebo_worlds empty_world.launch
    roslaunch gazebo_worlds table.launch


     <collision name='body_collision'>
        <laser_retro>0</laser_retro>
        <max_contacts>10</max_contacts>
        <pose frame=''>0 0 0 0 -0 0</pose>
        <geometry>
          <mesh>
            <uri>model://ballbot/meshs/body.stl</uri>
            <scale>0.001 0.001 0.001</scale>
          </mesh>
        </geometry>
        <surface>
          <friction>
            <ode>
              <mu>0</mu>
              <mu2>0</mu2>
              <fdir1>0 0 0</fdir1>
              <slip1>0</slip1>
              <slip2>0</slip2>
            </ode>
            <torsional>
              <coefficient>1</coefficient>
              <patch_radius>0</patch_radius>
              <surface_radius>0</surface_radius>
              <use_patch_radius>1</use_patch_radius>
              <ode>
                <slip>0</slip>
              </ode>
            </torsional>
          </friction>
          <bounce>
            <restitution_coefficient>0</restitution_coefficient>
            <threshold>1e+06</threshold>
          </bounce>
          <contact>
            <collide_without_contact>0</collide_without_contact>
            <collide_without_contact_bitmask>1</collide_without_contact_bitmask>
            <collide_bitmask>1</collide_bitmask>
            <ode>


  2. Convert the URDF file to SDF

        ign sdf -p example.urdf


Open


](http://www.ros.org/wiki/urdf/Tutorials) . Test your URDF by viewing it in [
Rviz ](http://www.ros.org/wiki/rviz) before proceeding to configure your robot
with Gazebo. In this tutorial, we'll use a simple demo robot named RRBot. Feel
free to follow along with this robot or your own bot.
###  Getting RRBot
RRBot, or ''Revolute-Revolute Manipulator Robot'', is a simple 3-linkage,
2-joint arm that we will use to demonstrate various features of Gazebo and
URDFs. It essentially a [ double inverted pendulum
](http://en.wikipedia.org/wiki/Double_inverted_pendulum) and demonstrates some
fun control concepts within a simulator.
To get RRBot, clone the [ gazebo_ros_demos Github repo
](https://github.com/ros-simulation/gazebo_ros_demos.git) into the ` /src `
folder of your catkin workspace and rebuild your workspace:

    cd ~/catkin_ws/src/
    git clone https://github.com/ros-simulation/gazebo_ros_demos.git
    cd ..
    catkin_make

If any of this is unfamiliar, be sure you have read the previous [ ROS
Overview Tutorials ](/tutorials?tut=ros_overview) .
###  View in Rviz
To check if everything is working, launch RRBot in Rviz:

    roslaunch rrbot_description rrbot_rviz.launch

And you should see our little bot like so:
![](https://github.com/osrf/gazebo_tutorials/raw/master/ros_urdf/figs/Rrbot_rviz.png)
If you do not get this, try killing all old roscore processes with ` killall
roscore ` and relaunching RViz.
You should also be able to play with the slider bars in the Joint State
Publisher window to move the two joints.
It is important that while converting your robot to work in Gazebo, you don't
break Rviz or other ROS-application functionality, so its nice to occasionally
test your robot in Rviz to make sure everything still works.
The [ gazebo_ros_control ](/tutorials?tut=ros_control) tutorial will explain
how to use Rviz to monitor the state of your simulated robot by publishing `
/joint_states ` directly from Gazebo. In the previous example, the RRBot in


[
![@barulicm](https://avatars.githubusercontent.com/u/1761749?s=80&u=9e6912ad4d07402b72c2a3221dc34f9d3f98096b&v=4)
](/barulicm)


  *[
              2012-09-03 00:25:18 -0500
             ]: 2012-09-03 00:25:18 -0500
  *[
              2012-09-03 23:28:38 -0500
             ]: 2012-09-03 23:28:38 -0500
  *[
              2012-09-03 06:05:38 -0500
             ]: 2012-09-03 06:05:38 -0500
  *[
             2012-09-03 22:55:42 -0500
            ]: 2012-09-03 22:55:42 -0500
  *[
             2012-09-03 22:58:11 -0500
            ]: 2012-09-03 22:58:11 -0500
  *[
             2012-09-04 01:41:10 -0500
            ]: 2012-09-04 01:41:10 -0500
  *[
             2012-09-04 02:26:18 -0500
            ]: 2012-09-04 02:26:18 -0500
  *[
             2012-09-04 02:47:38 -0500
            ]: 2012-09-04 02:47:38 -0500
  *[
             2012-09-04 03:33:10 -0500
            ]: 2012-09-04 03:33:10 -0500
  *[
             2012-09-04 03:34:43 -0500
            ]: 2012-09-04 03:34:43 -0500
  *[
             2012-09-04 03:41:38 -0500
            ]: 2012-09-04 03:41:38 -0500
  *[
              2012-09-03 01:37:18 -0500
             ]: 2012-09-03 01:37:18 -0500
  *[
             2012-09-03 02:24:24 -0500
            ]: 2012-09-03 02:24:24 -0500
  *[


[ Empty cylinder geometry for gazebo ](/question/26098/empty-cylinder-
geometry-for-gazebo/)


Try just opening the asset and save as Collada. Meshlab will regenerate the
dae file from its internal geometric representation. I have v1.2.2, which is
rather old, but does the trick.


Copy link


    * [ CI/CD & Automation ](/solutions/ci-cd/)
    * [ DevOps ](/solutions/devops/)
    * [ DevSecOps  ](https://resources.github.com/devops/fundamentals/devsecops/)


#  Saved searches


Additional navigation options


##  Comments


              <soft_cfm>0</soft_cfm>
              <soft_erp>0.2</soft_erp>
              <kp>1e+13</kp>
              <kd>1</kd>
              <max_vel>0.01</max_vel>
              <min_depth>0</min_depth>
            </ode>
            <bullet>
              <split_impulse>1</split_impulse>
              <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
              <soft_cfm>0</soft_cfm>
              <soft_erp>0.2</soft_erp>
              <kp>1e+13</kp>
              <kd>1</kd>
            </bullet>
          </contact>
        </surface>
      </collision>


Look for the SDF documentation for information: [ ](http://gazebosim.org/sdf)
[ http://gazebosim.org/sdf ](http://gazebosim.org/sdf)


[ Problem adding gazebo_ros_control plugin in sdf model and running in gazebo
](/question/5599/problem-adding-gazebo_ros_control-plugin-in-sdf-model-and-
running-in-gazebo/)


Projects


First time here? Check out the FAQ!


add a comment


[ edit ](/questions/582/edit/) [ retag ](/s/questions/582/retag/) flag
offensive  [ close ](/questions/582/close/) merge  delete


You can’t perform that action at this time.


[ ![davetcoleman gravatar
image](//www.gravatar.com/avatar/9ca6e6fe619a51425fcb84fbde6ace8a?s=16&d=identicon&r=PG)
](/users/134/davetcoleman/) [ davetcoleman ](/users/134/davetcoleman/) (
2013-01-02 14:48:38 -0500  )  edit


  * OS Version: Ubuntu 20.04
  * Source or binary build? Binary, apt, 9.4.0-1


  1. Make a *.urdf using this strategy.
  2. Use ` gz sdf -p my_urdf.urdf > my_sdf.sdf ` to convert your *.urdf into *.sdf.
  3. Check that the generated *.sdf matches your original *.sdf.


[ Powered by Askbot version 0.10.2 ](http://askbot.com)


_Attention:_ answers.gazebosim.org is deprecated as of August the 11th, 2023.
Please visit [ robotics.stackexchange.com ](http://robotics.stackexchange.com)
to ask a new question. This site will remain online in read-only mode during
the transition and into the foreseeable future. Selected questions and answers
have been migrated, and redirects have been put in place to direct users to
the corresponding questions on Robotics Stack Exchange. Additional details are
[ available here ](https://community.gazebosim.org/t/important-final-ros-
gazebo-answers-migration-schedule/2185) .


           xmlns:xacro="http://playerstage.sourceforge.net/gazebo/xmlschema/#xacro"
           name="pr2" >

You can remove them. All you need in your root element tag is the name of the
robot and optionally the xml namespace for xacro if you are using that:

    <robot name="rrbot" xmlns:xacro="http://www.ros.org/wiki/xacro">

###  ` <gazebo> ` element for the  tag
If a ` <gazebo> ` element is used without a ` reference="" ` property, it is
assumed the ` <gazebo> ` element is for the whole robot model. The elements
for a ` <robot> ` inside the ` <gazebo> ` tag are listed in the following
table:
Name  |  Type  |  Description
---|---|---
static  |  bool  |  If set to true, the model is immovable. Otherwise the
model is simulated in the dynamics engine.

Elements within a ` <gazebo> ` tag that are not in the above table are
directly inserted into the SDF ` <model> ` tag for the generated SDF. This is
particularly useful for plugins, as discussed in the [ ROS Motor and Sensor
Plugins ](/tutorials?tut=ros_gzplugins) tutorial.
##  Rigidly Fixing A Model to the World
If you would like your URDF model to be permanently attached to the world
frame (the ground plane), you must create a "world" link and a joint that
fixes it to the base of your model. RRBot accomplishes this with the
following:

      <!-- Used for fixing robot to Gazebo 'base_link' -->
      <link name="world"/>

      <joint name="fixed" type="fixed">
        <parent link="world"/>
        <child link="link1"/>
      </joint>

If however you have a mobile base or some other moving robot, you do not need
this link or joint.


[ Color of a link is not taken into account ](/question/23766/color-of-a-link-
is-not-taken-into-account/)


  1. Create a URDF including a gazebo material tag. Example:

        <?xml version="1.0"?>
    <robot name="example">
    <link name="link1">
        <collision>
            <geometry>
                <box size="1 1 1"/>
            </geometry>
        </collision>
        <visual>
            <geometry>
                <box size="1 1 1"/>
            </geometry>
        </visual>
        <inertial>
            <mass value="1"/>
            <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
        </inertial>
    </link>
    <gazebo reference="link1">
        <material>
            <ambient>0 0 1 1</ambient>
            <diffuse>0 0 1 1</diffuse>
            <specular>0 0 1 1</specular>
        </material>
    </gazebo>
    </robot>


i'm having this same issue and would like to have the material color from the
URDF to be used


[ ![dornhege gravatar image](/m/default/media/images/nophoto.png?v=27)
](/users/122/dornhege/)


Format ](http://sdformat.org) (SDF) was created for use in Gazebo to solve the
shortcomings of URDF. SDF is a complete description for everything from the
world level down to the robot level. It is scalable, and makes it easy to add
and modify elements. The SDF format is itself described using XML, which
facilitates a simple upgrade tool to migrate old versions to new versions. It
is also self-descriptive.
It is the intention of this author to make URDFs as fully documented and
supported in Gazebo as possible, but it is relevant to the reader to
understand why the two formats exist and the shortcomings of both. It would be
nice if more work was put into URDFs to update them to the current needs of
robotics.
##  Overview of Converting to Gazebo
There are several steps to get a URDF robot properly working in Gazebo. The
following is an overview of steps, which are then elaborated on in the rest of
this tutorial:
###  Required
  * An ` <inertia> ` element within each ` <link> ` element must be properly specified and configured.
###  Optional
  * Add a ` <gazebo> ` element for every ` <link> `
    * Convert visual colors to Gazebo format
    * Convert stl files to dae files for better textures
    * Add sensor plugins
  * Add a ` <gazebo> ` element for every ` <joint> `
    * Set proper damping dynamics
    * Add actuator control plugins
  * Add a ` <gazebo> ` element for the ` <robot> ` element
  * Add a ` <link name="world"/> ` link if the robot should be rigidly attached to the world/base_link
##  The ` <gazebo> ` Element
The ` <gazebo> ` element is an extension to the URDF used for specifying
additional properties needed for simulation purposes in Gazebo. It allows you
to specify the properties found in the SDF format that are not included in the
URDF format. None of the elements within a ` <gazebo> ` element are required
because default values will be automatically included. There are three
different types of ` <gazebo> ` elements - one for the ` <robot> ` tag, one
for ` <link> ` tags, and one for ` <joint> ` tags. We will discuss the
attributes and elements within each type of ` <gazebo> ` element throughout
this tutorial.
##  Prerequisites
The first step to getting your robot working in Gazebo is to have a working
URDF file from the corresponding [ ROS URDF Tutorials


[ hsu ](/users/6/hsu/)
1873  ●  14  ●  19


[ ![piyushk gravatar
image](//www.gravatar.com/avatar/4c0a1652789850a7953553e6d883eb06?s=16&d=identicon&r=PG)
](/users/131/piyushk/) [ piyushk ](/users/131/piyushk/) (  2013-01-10 00:59:44
-0500  )  edit


[ Hi there! Please sign in ](/account/signin/?next=/question/42868/urdf-tags-
for-creating-objects-involving-curved-surfaces-and-body-parts/) [ help
](/help/ "help")


  * Expected behavior:
Gazebo material tags in the URDF that are already valid SDF material tags
should be translated unchanged.


Seen: **3,875 times**


Query


[ URDF velocity limit, how it works? ](/question/215681/urdf-velocity-limit-
how-it-works/)


[ ![josephcoombe gravatar
image](/upfiles/avatars/josephcoombe/resized/16/joseph_cropped.png)
](/users/3879/josephcoombe/) [ josephcoombe ](/users/3879/josephcoombe/) (
2017-11-16 11:03:04 -0500  )  edit


[ subscribe to rss feed ](/feeds/question/17810/ "subscribe to the rss feed")


The back-support of the chair has three cylinders and all are straight.
However I need them to be a bit circular. How to achieve that?


#  URDF gazebo material tags incorrectly translated  #513


[ URDF model frames not published properly by robot_state_publisher
](/question/285145/urdf-model-frames-not-published-properly-by-
robot_state_publisher/)


A screenshot can be seen [ here ](http://cs.utexas.edu/~piyushk/share/no-urdf-
color.png) . I am facing the same problem in my robot models.


7 tasks


edit


I am new to MeshLab, how exactly could I re-export? After importing mesh in
Filters, in Remeshing...there is option of Tri to Qu.. and not otherwise (even
for pr2_description/meshes which I can spawn). And if I try Tri to Qua... it
crashes.. It seems I need to switch to Furete. R thr other tools?


Thanks!!


[ **answered 2013-01-10 02:56:46 -0500  ** ](/answers/655/revisions/)


Asked: ** 2013-01-01 04:19:54 -0500  **


* [ urdf.xacro ](/questions/scope:all/sort:activity-desc/tags:urdf.xacro/page:1/)


I also saw the urdf of door from [
http://ros.org/wiki/pr2_simulator/Tutorials/PR2OpenDoor,
](http://ros.org/wiki/pr2_simulator/Tutorials/PR2OpenDoor,)


* [ Bullet ](/questions/scope:all/sort:activity-desc/tags:Bullet/page:1/)


[ How to change color of my sdf/urdf models from script ?
](/question/25405/how-to-change-color-of-my-sdfurdf-models-from-script/)


                  <min_depth>0</min_depth>
                </ode>
                <bullet>
                  <split_impulse>1</split_impulse>
                  <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
                  <soft_cfm>0</soft_cfm>
                  <soft_erp>0.2</soft_erp>
                  <kp>1e+13</kp>
                  <kd>1</kd>
                </bullet>
              </contact>
              <friction>
                <ode/>
              </friction>
            </surface>
          </collision>
          <visual name='base_link_visual'>
            <pose frame=''>0 0 0 0 -0 0</pose>
            <geometry>
              <box>
                <size>0.3048 0.3048 0.1524</size>
              </box>
            </geometry>
            <material>
              <script>
                <uri>__default__</uri>
                <name>__default__</name>
              </script>
            </material>
          </visual>
          <gravity>1</gravity>
          <velocity_decay/>
          <self_collide>0</self_collide>
        </link>
      </model>
    </sdf>


Then I tried to make an urdf file as:-


[ ![aknirala gravatar
image](//www.gravatar.com/avatar/1384aeb564ffe3c5f91f2a935704967d?s=16&d=identicon&r=PG)
](/users/1931/aknirala/) [ aknirala ](/users/1931/aknirala/) (  2012-09-03
02:24:24 -0500  )  edit


(I have replaced spaces with _ in file and folder names, hope thats not an
issue).


[ bug  ](/gazebosim/sdformat/labels/bug) Something isn't working  [ URDF
](/gazebosim/sdformat/labels/URDF) URDF parsing


[ **answered 2013-01-09 15:53:28 -0500  ** ](/answers/634/revisions/)


[ Gazebo ](http://gazebosim.org) | [ Ignition ](https://ignitionrobotics.org)
| [ Community ](https://community.gazebosim.org/)


No milestone


[
![@chapulina](https://avatars.githubusercontent.com/u/5751272?s=40&u=e13d162c5da8d2c2cca2062d0603af6ba3fb3b8f&v=4)
](/chapulina) [ chapulina ](/chapulina) added the [ URDF
](/gazebosim/sdformat/labels/URDF) URDF parsing  label  May 2, 2022


|  [ Ask Your Question ](/questions/ask/)
---|---|---|---

2


add a comment


On a similar note, I have seen weird behavior in Gazebo from my COLLADA mesh
models (this behavior was also similarly weird in Gazebo 1.0 + ROS Fuerte). I
would like to use the colors as specified in the mesh file (rviz + RobotModel
handle this correctly).


add a comment  see more comments


##  Comments


I guess the tags in the [ http://gazebosim.org/tutorials/?tut=ros_urdf
](http://gazebosim.org/tutorials/?tut=ros_urdf) table are commonly used, so
the urdf to sdf parser lets you use them without an explicit hierarchy as a
"shortcut."


[ edit ](/s/answers/654/edit/) flag offensive  delete  [ link
](/question/582/surface-material-colors-from-urdf-and-
collada/?answer=654#post-id-654 "permanent link") more


    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)


Pick a username


[ hsu ](/users/6/hsu/)
1873  ●  14  ●  19


gz sdf -p test.urdf > test.sdf


* [ gazeebo ](/questions/scope:all/sort:activity-desc/tags:gazeebo/page:1/)


[ piyushk ](/users/131/piyushk/)
138  ●  8  ●  9  ●  16


[ ![hsu gravatar
image](//www.gravatar.com/avatar/b097f55d6872f4a2cb040e90bdd92872?s=32&d=identicon&r=PG)
](/users/6/hsu/)


Repositories


center of mass to half the height of the RRBot's rectangular link, we center
the mass in the middle. You can visually check if your center of mass is
correct in your URDF within Gazebo by clicking on the ''View'' menu of Gazebo
and selecting both ''Wireframe'' and ''Center of Mass''.
In this example robot, both the mass and inertia matrix are made up values
since this robot has no real-world counterpart.
###  ` <gazebo> ` Elements For Links
List of elements that are individually parsed:
Name  |  Type  |  Description
---|---|---
material  |  value  |  Material of visual element
gravity  |  bool  |  Use gravity
dampingFactor  |  double  |  Exponential velocity decay of the link velocity -
takes the value and multiplies the previous link velocity by
(1-dampingFactor).
maxVel  |  double  |  maximum contact correction velocity truncation term.
minDepth  |  double  |  minimum allowable depth before contact correction
impulse is applied
mu1  |  double  |  Friction coefficients μ for the principal contact
directions along the contact surface as defined by the [ Open Dynamics Engine
(ODE) ](http://www.ode.org) (see parameter descriptions in [ ODE's user guide
](http://www.ode.org/ode-latest-userguide.html#sec_7_3_7) )
mu2
fdir1  |  string  |  3-tuple specifying direction of mu1 in the collision
local reference frame.
kp  |  double  |  Contact stiffness k_p and damping k_d for rigid body
contacts as defined by ODE ( [ ODE uses erp and cfm ](http://www.ode.org/ode-
latest-userguide.html#sec_7_3_7) but there is a [ mapping between erp/cfm and
stiffness/damping
](https://github.com/osrf/gazebo/blob/gazebo9/gazebo/physics/ode/ODEJoint.cc)
)
kd
selfCollide  |  bool  |  If true, the link can collide with other links in the
model.
maxContacts  |  int  |  Maximum number of contacts allowed between two
entities. This value overrides the max_contacts element defined in physics.
laserRetro  |  double  |  intensity value returned by laser sensor.

Similar to ` <gazebo> ` elements for ` <robot> ` , any arbitrary blobs that
are not parsed according to the table above are inserted into the the


All right :) Thanks a lot! Thats great I just use all the values from the
table as a shortcut and the rest I just implement in a gazebo reference as
full sdf.


##  Question Tools


[ ![ROS Answers logo](/m/ros/media/images/logoros.png?v=28) ](/questions/)


[ Using ikfast with 4DOF fails ](/question/221972/using-ikfast-with-4dof-
fails/)


  * [ Notifications ](/login?return_to=%2Fgazebosim%2Fsdformat)
  * [ Fork  88  ](/login?return_to=%2Fgazebosim%2Fsdformat)
  * [ Star  144  ](/login?return_to=%2Fgazebosim%2Fsdformat)


[ ![Adolfo Rodriguez T gravatar
image](//www.gravatar.com/avatar/cf2bd2e3ecedc8ecd9de202ec26a1bb8?s=16&d=identicon&r=PG)
](/users/410/adolfo-rodriguez-t/) [ Adolfo Rodriguez T ](/users/410/adolfo-
rodriguez-t/) (  2012-09-04 03:41:38 -0500  )  edit


[ **answered 2017-11-15 10:03:17 -0500  ** ](/answers/17826/revisions/)


#  URDF gazebo material tags incorrectly translated  #513


add a comment


[ ALL ](/questions/scope:all/sort:activity-desc/page:1/) [ UNANSWERED
](/questions/scope:unanswered/sort:answers-asc/page:1/)


* [ URDF ](/questions/scope:all/sort:activity-desc/tags:URDF/page:1/)


[ nkoenig ](/users/5/nkoenig/)
7676  ●  8  ●  44  ●  71  [ http://gazebosim.org/ ](http://gazebosim.org/
"nkoenig's website is http://gazebosim.org/")


**Edit #1:**


[ ![@peci1](https://avatars.githubusercontent.com/u/182533?s=52&v=4) ](/peci1)
[ ![@barulicm](https://avatars.githubusercontent.com/u/1761749?s=52&v=4)
](/barulicm) [
![@chapulina](https://avatars.githubusercontent.com/u/5751272?s=52&v=4)
](/chapulina)


New issue


[ ![aknirala gravatar
image](//www.gravatar.com/avatar/1384aeb564ffe3c5f91f2a935704967d?s=16&d=identicon&r=PG)
](/users/1931/aknirala/) [ aknirala ](/users/1931/aknirala/) (  2012-09-03
22:55:42 -0500  )  edit


[ gazebosim ](/gazebosim) /  **[ sdformat ](/gazebosim/sdformat) ** Public


##  Related questions


My .model file (which does not work at all):-


and launch file as:-


    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)


    <?xml version="1.0"?>
    <robot name="testrobot">
      <link name="base_link">
        <visual>
          <geometry>
            <box size="0.3048 0.3048 0.1524"/>
          </geometry>
          <material name="silver">
            <color rgba="0.75 0.75 0.75 1"/>
          </material>
          <origin rpy="0 0 0" xyz="0 0 0"/>
        </visual>
        <collision>
          <geometry>
            <box size="0.3048 0.3048 0.1524"/>
          </geometry>
          <origin rpy="0 0 0" xyz="0 0 0"/>
        </collision>
        <inertial>
          <mass value="1.0"/>
          <inertia ixx="0.009677" iyy="0.01548" izz="0.009677"
                   ixy="0.0" ixz="0.0" iyz="0.0"/>
          <origin rpy="0 0 0" xyz="0 0 0"/>
        </inertial>
      </link>

      <gazebo reference="base_link">
        <collision>
          <surface>
            <bounce>
              <restitution_coefficient>0</restitution_coefficient>
              <threshold>1e+06</threshold>
            </bounce>
            <contact>
              <collide_without_contact>0</collide_without_contact>
              <collide_without_contact_bitmask>1</collide_without_contact_bitmask>
              <collide_bitmask>1</collide_bitmask>
              <ode>


Please note: Gazebo requires javascript to work properly, please enable
javascript in your browser, [ here is how
](https://www.google.com/support/bin/answer.py?answer=23852)


This is a snippet of my sdf file I would like to convert to urdf:


                <soft_cfm>0</soft_cfm>
                <soft_erp>0.2</soft_erp>
                <kp>1e+13</kp>
                <kd>1</kd>
                <max_vel>0.01</max_vel>
                <min_depth>0</min_depth>
              </ode>
              <bullet>
                <split_impulse>1</split_impulse>
                <split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
                <soft_cfm>0</soft_cfm>
                <soft_erp>0.2</soft_erp>
                <kp>1e+13</kp>
                <kd>1</kd>
              </bullet>
            </contact>
          </surface>
        </collision>
      </gazebo>
    </robot>


You can add additional SDF-specific tags under your ` <gazebo
reference="name_link"> ` tag.


[ __ ](/questions/) |


You can find the ` <link> ` and ` <material> ` elements there.
The default available materials in Gazebo can be found in the Gazebo source
code at [ gazebo/media/materials/scripts/gazebo.material
](https://github.com/osrf/gazebo/blob/master/media/materials/scripts/gazebo.material)
.
For more advanced or custom materials, you can create your own OGRE colors or
textures. See:
  * [ The ` <material> ` SDF documentation ](http://sdformat.org/spec?ver=1.5&elem=material)
  * [ OGRE materials documentation ](http://www.ogre3d.org/tikiwiki/Materials)
####  STL and Collada files
Like in Rviz, Gazebo can use both [ STL
](http://en.wikipedia.org/wiki/STL_\(file_format\)) and [ Collada
](http://en.wikipedia.org/wiki/Collada) files. It is generally recommended you
use Collada (.dae) files because they support colors and textures, whereas
with STL files you can only have a solidly colored link.
###  ` <inertial> ` Element
For the Gazebo physics engine to work properly, the ` <inertial> ` element
must be provided as documented on the [ URDF link element
](http://www.ros.org/wiki/urdf/XML/link) page. For links to not be ignored in
Gazebo, their mass must be greater than zero. Additionally, links with zero
principal moment of inertia (ixx, iyy, izz) could lead to infinite
acceleration under any finite torque application.
Determining the correct values for each link is required to get accurate
physics approximations in Gazebo. This can be performed by conducting various
measurements of the robots parts, or by using CAD software like Solidworks
that includes features for approximating these values. For beginners, you can
also just make the values up.
An example inertia element from the RRBot first link:

        <inertial>
          <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
          <mass value="1"/>
          <inertia
            ixx="1.0" ixy="0.0" ixz="0.0"
            iyy="1.0" iyz="0.0"
            izz="1.0"/>
        </inertial>

The origin tag represents the center of mass of this link. By setting the


[ Floating joint in URDF? ](/question/350946/floating-joint-in-urdf/)


[ Xacro model spawn issues ](/question/13323/xacro-model-spawn-issues/)


##  Stats


(more)


add a comment


[ **updated 2013-01-10 00:57:52 -0500  ** ](/questions/582/revisions/)


Seen: **4,460 times**


[ ![josephcoombe gravatar
image](/upfiles/avatars/josephcoombe/resized/16/joseph_cropped.png)
](/users/3879/josephcoombe/) [ josephcoombe ](/users/3879/josephcoombe/) (
2017-11-16 10:04:58 -0500  )  edit


[ Sign up
](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-
name%3E%2F%3Crepo-
name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-
repo&source_repo=gazebosim%2Fsdformat)


Explore


[ **updated 2013-01-22 10:30:37 -0500  ** ](/answers/654/revisions/)


Where can I find all the tags interpreted by urdf.


[ How to add a tool from a STL file ](/question/382925/how-to-add-a-tool-from-
a-stl-file/)


"[ERROR] [1346743638.585663220, 2892.569000000]: GazeboROSNode SpawnModel
Failure: input model_xml not Gazebo XML, or cannot be converted to Gazebo
XML", when I use an URDF and spawn as rosrun gazebo spawn_model -file
Nelson_Swag_Leg_Chair.urdf -urdf -model my_model I see sth else. Editing Q 4
dtls


[ barulicm ](/barulicm) opened this issue  Mar 15, 2021  · 1 comment


[ tags ](/tags/) [ users ](/users/) [ badges ](/badges/)


Hey there,


[
![@barulicm](https://avatars.githubusercontent.com/u/1761749?s=40&u=9e6912ad4d07402b72c2a3221dc34f9d3f98096b&v=4)
](/barulicm) [ barulicm ](/barulicm) added the [ bug
](/gazebosim/sdformat/labels/bug) Something isn't working  label  Mar 15, 2021


**Update 2012-01-22** [ simulator_gazebo 1.7.8
](http://ros.org/wiki/simulator_gazebo/ChangeList/1.7#A1.7.8_.282013-01-17.29)
with a fix for the materials issue in [ tutorial
](http://www.ros.org/wiki/simulator_gazebo/Tutorials/SpawningObjectInSimulation)
is in [ shadow fixed ](http://packages.ros.org/ros-shadow-
fixed/ubuntu/pool/main/r/ros-groovy-simulator-gazebo/) , should make it out to
the [ public repo ](http://packages.ros.org/ros/ubuntu/pool/main/r/ros-groovy-
simulator-gazebo/) soon.


Open


[ ![piyushk gravatar
image](//www.gravatar.com/avatar/4c0a1652789850a7953553e6d883eb06?s=32&d=identicon&r=PG)
](/users/131/piyushk/)


add a comment


Please note: ROS Answers requires javascript to work properly, please enable
javascript in your browser, [ here is how
](https://www.google.com/support/bin/answer.py?answer=23852)


[ edit ](/questions/17810/edit/) [ retag ](/s/questions/17810/retag/) flag
offensive  [ close ](/questions/17810/close/) merge  delete


    <launch>
      <param name="Nelson_Swag_Leg_Chair_p" textfile="$(find myWorld)/world/object/Nelson_Swag_Leg_Chair/Nelson_Swag_Leg_Chair.model" />
      <node name="Nelson_Swag_Leg_Chair" pkg="gazebo" type="spawn_model" args="-gazebo -param Nelson_Swag_Leg_Chair_p -z 0.1 -y 2 x -x 2 -model Nelson_Swag_Leg_Chair" respawn="false" output="screen"/>
    </launch>


the simulated environment can be controlled. See [ ROS Motor and Sensor
Plugins ](/tutorials?tut=ros_gzplugins) .
©2014 Open Source Robotics Foundation
Gazebo is open-source licensed under [ Apache 2.0
](http://www.apache.org/licenses/LICENSE-2.0.html)
[ ![Google+](/assets/google_gray-
cc34826f560f99c7a9b7db88cd5f2db4d28fd4b3afcfa4b897435c51e3b25518.png)
](//plus.google.com/u/0/115981436296571800301?prsrc=3) [
![YouTube](/assets/youtube_gray-978838444154eb6aa5e4aa38489f66d10e40361dd06a3814411c211cba013752.png)
](https://www.youtube.com/channel/UCJyqf9XJpDoM9XnpAwW6WxA) [
![YouTube](/assets/twitter_gray-8e9dfe74c6cab12171992a40add9a65e5bba92ac93063a4ac0eeba58c77e774a.png)
](https://twitter.com/GazeboSim)


It worked, but two things 1) Its still giving error if I use .model file and
2) from .urdf file the chair appears but keeps on swinging. Do I need to add
another tag etc to stop it? Other spawned objects remain stationary. I request
you to share your urdf/model file if there is such a case. Thanks.


[ none ](/questions/scope:all/sort:activity-desc/tags:none/page:1/) ×


    <sdf version='1.6'>
      <model name='testrobot'>
        <link name='base_link'>
          <pose frame=''>0 0 0 0 -0 0</pose>
          <inertial>
            <pose frame=''>0 0 0 0 -0 0</pose>
            <mass>1</mass>
            <inertia>
              <ixx>0.009677</ixx>
              <ixy>0</ixy>
              <ixz>0</ixz>
              <iyy>0.01548</iyy>
              <iyz>0</iyz>
              <izz>0.009677</izz>
            </inertia>
          </inertial>
          <collision name='base_link_collision'>
            <pose frame=''>0 0 0 0 -0 0</pose>
            <geometry>
              <box>
                <size>0.3048 0.3048 0.1524</size>
              </box>
            </geometry>
            <surface>
              <bounce>
                <restitution_coefficient>0</restitution_coefficient>
                <threshold>1e+06</threshold>
              </bounce>
              <contact>
                <collide_without_contact>0</collide_without_contact>
                <collide_without_contact_bitmask>1</collide_without_contact_bitmask>
                <collide_bitmask>1</collide_bitmask>
                <ode>
                  <soft_cfm>0</soft_cfm>
                  <soft_erp>0.2</soft_erp>
                  <kp>1e+13</kp>
                  <kd>1</kd>
                  <max_vel>0.01</max_vel>


Clear


[ ](https://github.com/)


Sort by »  [ oldest  ](/question/17810/how-to-support-additional-sdf-elements-
ode-bullet-bounce-etc-in-urdf-file-using-the-gazebo-tag/?sort=oldest#sort-top)
[ newest  ](/question/17810/how-to-support-additional-sdf-elements-ode-bullet-
bounce-etc-in-urdf-file-using-the-gazebo-tag/?sort=latest#sort-top) [ most
voted  ](/question/17810/how-to-support-additional-sdf-elements-ode-bullet-
bounce-etc-in-urdf-file-using-the-gazebo-tag/?sort=votes#sort-top)


[ **answered 2012-09-03 06:05:38 -0500  ** ](/answers/42902/revisions/)


**[ peci1 ](/peci1) ** commented  Mar 29, 2021


Asked: ** 2012-09-03 00:25:18 -0500  **


Gazebo seems to start with all the meshes painted grey. If any of the joints
move, then the corresponding links seem to alternate between grey and the
color as specified by the mesh. A video of this can be seen [ here
](http://cs.utexas.edu/~piyushk/share/weird-mesh-color.ogv) .


      <gazebo reference="door_link">
        <latchJoint>handle_joint</latchJoint>
        <latchAngle>-1.57</latchAngle>
        <doorClosedAngle>0.0</doorClosedAngle>
        <latchKp>200.0</latchKp>
        <latchKd>0.0</latchKd>
        <latchFMax>1000.0</latchFMax>
      </gazebo>


[ Unable to validate URDF file ](/question/249698/unable-to-validate-urdf-
file/)


    * [ Actions  Automate any workflow  ](/features/actions)
    * [ Packages  Host and manage packages  ](/features/packages)
    * [ Security  Find and fix vulnerabilities  ](/features/security)
    * [ Codespaces  Instant dev environments  ](/features/codespaces)
    * [ Copilot  Write better code with AI  ](/features/copilot)
    * [ Code review  Manage code changes  ](/features/code-review)
    * [ Issues  Plan and track work  ](/features/issues)
    * [ Discussions  Collaborate outside of code  ](/features/discussions)


The site is read-only. Please transition to use Robotics Stack Exchange


Skip to content


[ Vacuum/Magnetic Feet for a Walking Robot ](/question/14462/vacuummagnetic-
feet-for-a-walking-robot/)


Labels


##  Stats


[ about ](/about/) |  [ faq ](/faq/) |  [ help ](/help/ "help") |  [ privacy
policy ](/privacy/) |  [ terms of service ](/terms/)


First time here? Check out the FAQ!


**[ barulicm ](/barulicm) ** commented  Mar 15, 2021


[ subscribe to rss feed ](/feeds/question/42868/ "subscribe to the rss feed")


[ ALL ](/questions/scope:all/sort:activity-desc/page:1/) [ UNANSWERED
](/questions/scope:unanswered/sort:answers-asc/page:1/)


[ ![ gravatar image]() ]() [ ]() (  2024-04-16 18:08:46 -0500  )  edit


None yet


##  Related questions


Hi,


##  Output


[ Powered by Askbot version 0.7.58 ](http://askbot.com)


For


[ Friction Not Working Between URDF and Database Model
](/question/16928/friction-not-working-between-urdf-and-database-model/)


[ Colors not shown in Gazebo 5 ](/question/12418/colors-not-shown-in-
gazebo-5/)


    * [ All features ](/features)
    * [ Documentation  ](https://docs.github.com)
    * [ GitHub Skills  ](https://skills.github.com/)
    * [ Blog  ](https://github.blog)


I am trying to create objects for indoor environment. (Though I am hoping that
these objects must be already created by someone, I asked that at: [
http://answers.ros.org/question/42435/pointers-to-office-and-home-environment-
in-gazebo ](http://answers.ros.org/question/42435/pointers-to-office-and-home-
environment-in-gazebo) /)


    <material>
      <script>
        <uri>URI of the .material file</uri>
        <name>Name of the material</name>
      </script>
    </material>


Thanks a lot for this link, this is what I need but I am unable to spawn the
model. I have tried top make .model file as shown at : [
](http://answers.ros.org/question/42529/how-to-import-collada-dae-files-into-
gazebo-rosfuerte/) [ http://answers.ros.org/question/42529/how-to-import-
collada-dae-files-into-gazebo-rosfuerte
](http://answers.ros.org/question/42529/how-to-import-collada-dae-files-into-
gazebo-rosfuerte) / but this gives : [ERROR] [1346743638.585663220,
2892.569000000]: GazeboR...


    <?xml version="1.0"?>
    <robot name ="myrobot" xmlns:xacro="http://ros.org/wiki/xacro">

          <link name="wheel2_link">
             <visual>
                <origin xyz="0 0 0" rpy="0 0 0" />
                <geometry>
                   <mesh filename="package://....stl" scale="0.001 0.001 0.001" />
                </geometry>
                <cast_shadows>1</cast_shadows>
                <transparency>0</transparency>
                <material name="light_black" />
             </visual>
             <inertial>
                <origin xyz="0.0 0.0 0.0" />
                <mass value="0.275" />
                <inertia ixx="0.00026602" ixy="0" ixz="0" iyy="0.00019582" iyz="0" izz="0.00029553" />
             </inertial>
             <collision>
                <origin xyz="0 0 0" rpy="0 0 0" />
                <geometry>
                   <mesh filename="package://....stl" scale="0.001 0.001 0.001" />
                </geometry>
             </collision>
          </link>

     <gazebo reference="wheel2_link">
        <maxVel>0.01</maxVel>
        <minDepth>0</minDepth>
        <mu1>0.2</mu1>
        <mu2>0.0</mu2>
        <fdir1>0 0 0</fdir1>
        <kp>1e+13</kp>
        <kd>1.0</kd>
        <selfCollide>0</selfCollide>
        <maxContacts>10</maxContacts>
        <laserRetro>0</laserRetro>


![this post is marked as community wiki](/m/default/media/images/wiki.png?v=2)


    <material>
      <script>
        <uri>file://media/materials/scripts/gazebo.material</uri>
        <name>Gazebo/Green</name>
      </script>
    </material>


Last updated: **Jan 22 '13**


Jump to bottom


[ josephcoombe ](/users/3879/josephcoombe/) ![flag of United States of
America](/m/default/media/images/flags/us.gif?v=2)
609  ●  4  ●  11  ●  20  [ https://www.metamorphs...
](https://www.metamorphsoftware.com/ "josephcoombe's website is
https://www.metamorphsoftware.com/")


[ __ ](/questions/) |


[ Hi there! Please sign in ](/account/signin/?next=/question/17810/how-to-
support-additional-sdf-elements-ode-bullet-bounce-etc-in-urdf-file-using-the-
gazebo-tag/) [ help ](/help/ "help")


[ ![nkoenig gravatar
image](//www.gravatar.com/avatar/7d7b669912eaa47178b36acdee3c72ad?s=32&d=identicon&r=PG)
](/users/5/nkoenig/)


[ **asked 2012-09-03 00:25:18 -0500  ** ](/questions/42868/revisions/)


##  Related questions


1 follower


Please note: Gazebo requires javascript to work properly, please enable
javascript in your browser, [ here is how
](https://www.google.com/support/bin/answer.py?answer=23852)


[ ![dornhege gravatar image](/m/default/media/images/nophoto.png?v=27)
](/users/122/dornhege/) [ dornhege ](/users/122/dornhege/) (  2012-09-03
02:27:24 -0500  )  edit


[ ![ gravatar image]() ]() [ ]() (  2024-04-16 18:09:09 -0500  )  edit


* Product


Sort by »  [ oldest  ](/question/582/surface-material-colors-from-urdf-and-
collada/?sort=oldest#sort-top) [ newest  ](/question/582/surface-material-
colors-from-urdf-and-collada/?sort=latest#sort-top) [ most voted
](/question/582/surface-material-colors-from-urdf-and-
collada/?sort=votes#sort-top)


also I'll get to know some handy tags from ur file. :-)


##  3  Answers


Replacing the material tag as suggested by the SDF documentation and Nate's
answer does not work. I've replace the material tag of all my urdf links with
this line from my world file which I know works:


[ **updated 2017-11-16 10:10:10 -0500  ** ](/answers/17826/revisions/)


* [ URDF ](/questions/scope:all/sort:activity-desc/tags:URDF/page:1/)


[ ![aknirala gravatar
image](//www.gravatar.com/avatar/1384aeb564ffe3c5f91f2a935704967d?s=16&d=identicon&r=PG)
](/users/1931/aknirala/) [ aknirala ](/users/1931/aknirala/) (  2012-09-04
02:26:18 -0500  )  edit


**asked 2017-11-14 01:41:52 -0500  **


[ Failed to find mesh file, File or path does not exist
](/question/29265/failed-to-find-mesh-file-file-or-path-does-not-exist/)


If you're interested in populating a scene with indoor objects, and not
modelling specific (eg. chair) instances, you can check out [ Trimble's 3D
warehouse ](http://sketchup.google.com/3dwarehouse/) . Some models are
available directly in Collada format, which both Gazebo and Rviz support.
Example [ chair
](http://sketchup.google.com/3dwarehouse/details?mid=5bb8457da2bbc722d810b14a81e12eca&prevstart=0)
.


Example:


##  1  Answer


The site is read-only. Please transition to use Robotics Stack Exchange


      <gazebo reference="base_link">
    <material>Gazebo/DarkGrey</material>
    <gravity>1</gravity>
    <maxVel>0.01</maxVel>
    <minDepth>0</minDepth>
    <mu1>0.0</mu1>
    <mu2>0.0</mu2>
    <fdir1>0 0 0</fdir1>
    <kp>1e+13</kp>
    <kd>1.0</kd>
    <selfCollide>0</selfCollide>
    <maxContacts>10</maxContacts>
    <laserRetro>0</laserRetro>
    </gazebo>


fixed in trunk per [ commit
](https://bitbucket.org/osrf/gazebo/commits/d9edb000a87db61d30b85c7f14885be451dda876)
, will make a groovy release soon.


[ ![Adolfo Rodriguez T gravatar
image](//www.gravatar.com/avatar/145750732793ad8d557110e4c81367ef?s=32&d=identicon&r=PG)
](/users/410/adolfo-rodriguez-t/)


[ ![@ahcorde](https://avatars.githubusercontent.com/u/1933907?s=40&v=4)
](/ahcorde) [ ahcorde ](/ahcorde) mentioned this issue  Mar 30, 2021


#  Search code, repositories, users, issues, pull requests...


[ ![cc-by-sa](/m/default/media/images/cc-by-sa.png?v=2)
](http://creativecommons.org/licenses/by-sa/3.0/legalcode) Copyright Askbot,
2010-2011. Content on this site is licensed under a [ Creative Commons
Attribution Share Alike 3.0 ](http://creativecommons.org/licenses/by-
sa/3.0/legalcode) license.


[ Hi there! Please sign in ](/account/signin/?next=/question/582/surface-
material-colors-from-urdf-and-collada/) [ help ](/help/ "help")


(more)


[ ALL ](/questions/scope:all/sort:activity-desc/page:1/) [ UNANSWERED
](/questions/scope:unanswered/sort:answers-asc/page:1/)


[ Sign up for free ](/join?source=comment-repo) **to join this conversation on
GitHub** . Already have an account? [ Sign in to comment
](/login?return_to=https%3A%2F%2Fgithub.com%2Fgazebosim%2Fsdformat%2Fissues%2F513)


[ ![aknirala gravatar
image](//www.gravatar.com/avatar/1384aeb564ffe3c5f91f2a935704967d?s=16&d=identicon&r=PG)
](/users/1931/aknirala/) [ aknirala ](/users/1931/aknirala/) (  2012-09-03
22:58:11 -0500  )  edit


I would like to use ROS and urdf to simulate my robot. (I do not want to use
any sdf files). However I have a given sdf file and now try to convert it to
urdf. Now my problem is that in the sdf file there are multiple physics
engines used ( ode and bullet). Does anyone know how to convert that to urdf?
Cause according to this [ http://gazebosim.org/tutorials/?tut=r...
](http://gazebosim.org/tutorials/?tut=ros_urdf) Tutorial (under <gazebo>
Elements For Links) There is only a very limited table of what is possible to
add in gazebo references.</gazebo>


Last updated: **Sep 03 '12**


corresponding ` <link> ` element in the SDF. This is particularly useful for
plugins, as discussed in the [ ROS Motor and Sensor Plugins
](/tutorials?tut=ros_gzplugins) tutorial.
###  RRBot Example of  element
In the RRBot, the friction coefficients of the two non-fixed linked were
specified so that if a collision occurred more accurate contact interactions
were simulated. The following is an example link's ` <gazebo> ` tag:

      <gazebo reference="link2">
        <mu1>0.2</mu1>
        <mu2>0.2</mu2>
        <material>Gazebo/Black</material>
      </gazebo>

##  Joints
Make sure you are familiar with the [ URDF joint documentation
](http://www.ros.org/wiki/urdf/XML/joint) . However, not all of the elements
documented for URDF joints are applicable to Gazebo:
  * The ` <origin> ` , ` <parent> ` and ` <child> ` are required
  * ` <calibration> ` and ` <safety_controller> ` are ignored
  * In the ` <dynamics> ` tag, only the ` damping ` property is used for gazebo4 and earlier. Gazebo5 and up also uses the ` friction ` property.
  * All of properties in the ` <limit> ` tag are optional
###  RRBot Example
The following is a joint used in the RRBot:

      <joint name="joint2" type="continuous">
        <parent link="link2"/>
        <child link="link3"/>
        <origin xyz="0 ${width} ${height2 - axel_offset*2}" rpy="0 0 0"/>
        <axis xyz="0 1 0"/>
        <dynamics damping="0.7"/>
      </joint>

Notice the dynamics element with a viscous damping coefficient of 0.7
N*m*s/rad, damping is simply the amount of opposing force to any joint
velocity (in this case torque per angular velocity) that is used to "slow" a
moving joint towards rest.
The value of 0.7 N*m*s/rad was decided on by testing different amounts of


[ __ tags ](/tags/) [ __ users ](/users/) [ __ badges ](/badges/)


  1. Nelson_Swag_Leg_Chair/models/Nelson_Swag_Leg_Chair.dae
  2. Nelson_Swag_Leg_Chair/doc.kml
  3. Nelson_Swag_Leg_Chair/textures.txt (its 0 bytes)


##  Footer


Thats a nice check thanks! I tried it as you can see above ... However I do
not know how to convert tags like <collide_bitmask>1</collide_bitmask> or
bounce tags so that they are correctly parsed from urdf to sdf.....


[ERROR] [1346749562.693001448, 982.362000000]: GazeboROSNode SpawnModel Failure: input model_xml not Gazebo XML, or cannot be converted to Gazebo XML


[ none ](/questions/scope:all/sort:activity-desc/tags:none/page:1/) ×


Sign up for GitHub


Name


  *[
             2017-11-14 01:41:52 -0500
            ]: 2017-11-14 01:41:52 -0500
  *[
             2017-11-16 11:03:04 -0500
            ]: 2017-11-16 11:03:04 -0500
  *[
              2017-11-15 10:03:17 -0500
             ]: 2017-11-15 10:03:17 -0500
  *[
              2017-11-16 10:10:10 -0500
             ]: 2017-11-16 10:10:10 -0500
  *[
             2017-11-16 03:59:40 -0500
            ]: 2017-11-16 03:59:40 -0500
  *[
             2017-11-16 10:04:58 -0500
            ]: 2017-11-16 10:04:58 -0500
  *[
             2017-11-16 10:07:18 -0500
            ]: 2017-11-16 10:07:18 -0500
  *[
             2017-11-16 13:57:04 -0500
            ]: 2017-11-16 13:57:04 -0500
  *[
        2017-11-14 01:41:52 -0500
       ]: 2017-11-14 01:41:52 -0500
  *[
        2024-04-16 18:09:09 -0500
       ]: 2024-04-16 18:09:09 -0500


By clicking “Sign up for GitHub”, you agree to our [ terms of service
](https://docs.github.com/terms) and [ privacy statement
](https://docs.github.com/privacy) . We’ll occasionally send you account
related emails.


I guess these tags (latchAngle, doorClosedAngle) are defining the two states
of the door (open/close). Are these tags custom made (I didn't went through
the entire code as door opening is not supported after diamondback) or are
standard?


Cancel  Create saved search


  * [ Code  ](/gazebosim/sdformat)
  * [ Issues  ](/gazebosim/sdformat/issues)
  * [ Pull requests  ](/gazebosim/sdformat/pulls)
  * [ Actions  ](/gazebosim/sdformat/actions)
  * [ Projects  ](/gazebosim/sdformat/projects)
  * [ Security  ](/gazebosim/sdformat/security)
  * [ Insights  ](/gazebosim/sdformat/pulse)


Edited question title to better reflect content


[ How to set a right revolute joint coordinate? ](/question/23560/how-to-set-
a-right-revolute-joint-coordinate/)


[ ![hsu gravatar
image](//www.gravatar.com/avatar/b097f55d6872f4a2cb040e90bdd92872?s=32&d=identicon&r=PG)
](/users/6/hsu/)


[ Friction Not Working Between URDF and Database Model
](/question/16928/friction-not-working-between-urdf-and-database-model/)


    <sdf version='1.7'>
      <model name='example'>
        <link name='link1'>
          <inertial>
            <pose>0 0 0 0 -0 0</pose>
            <mass>1</mass>
            <inertia>
              <ixx>1</ixx>
              <ixy>0</ixy>
              <ixz>0</ixz>
              <iyy>1</iyy>
              <iyz>0</iyz>
              <izz>1</izz>
            </inertia>
          </inertial>
          <collision name='link1_collision'>
            <pose>0 0 0 0 -0 0</pose>
            <geometry>
              <box>
                <size>1 1 1</size>
              </box>
            </geometry>
            <surface>
              <contact>
                <ode/>
              </contact>
              <friction>
                <ode/>
              </friction>
            </surface>
          </collision>
          <visual name='link1_visual'>
            <pose>0 0 0 0 -0 0</pose>
            <geometry>
              <box>
                <size>1 1 1</size>
              </box>
            </geometry>


Toggle navigation


[ ](https://github.com "GitHub") © 2024 GitHub, Inc.


You'll need to use a custom mesh and the mesh tag. I think those specific tags
like cylinder, box are only there to get something simple running quick, but
not for actually building complex geometry.


We read every piece of feedback, and take your input very seriously.


Gazebo 1.2.5 no longer seems to be picking up the ` material ` tag from the
URDF file. This can be seen through the following commands (from [ this
tutorial
](http://www.ros.org/wiki/simulator_gazebo/Tutorials/SpawningObjectInSimulation)
on the ROS wiki).


  * Here is the generated urdf after running through xacro: [ test.urdf ](http://cs.utexas.edu/~piyushk/share/test.urdf)
  * Here is the world file I get from gazebo gui (after using save world as): [ test.world ](http://cs.utexas.edu/~piyushk/share/test.world) .
    * Notice all the material tags from URDF are empty (Search for "material/")
    * All the tags from my world SDF file are fine and rendered correctly.


[ __ tags ](/tags/) [ __ users ](/users/) [ __ badges ](/badges/)


* Open Source


The chair is swinging most probably because the origin of your inertial frame
is unspecified (hence at 0, 0, 0). Try giving it more realistic values. Of
lesser importance, you can then tune the mass and inertia tensor to also have
more realistic values. Otherwise your URDF seems OK.


Development


##  Comments


[ Empty cylinder geometry for gazebo ](/question/26098/empty-cylinder-
geometry-for-gazebo/)


These tags work essentially the same in Gazebo as in Rviz. It is important
that you specify both though, because unlike some ROS applications, Gazebo
will not use your ` <visual> ` elements as ` <collision> ` elements if you do
not explicitly specify a ` <collision> ` element. Instead, Gazebo will treat
your link as "invisible" to laser scanners and collision checking.
####  Simplify collision model
You can use the same geometry or meshes for both your collision and visual
elements, though for performance improvements we strongly suggest you have a
simplified model/meshes for your collision geometry. A good open-source tool
for simplifying meshes is Blender. There are many closed-source tools, such as
Maya and 3DS Max, which can also simplify meshes.
####  Materials: Using proper colors and textures
A standard URDF can specify colors using a tag such as in the RRBot:

    <material name="orange"/>

With the color orange defined separately such as in the file [ materials.xacro
](https://github.com/ros-
simulation/gazebo_ros_demos/blob/master/rrbot_description/urdf/materials.xacro#L20-L22)
:

      <material name="orange">
        <color rgba="${255/255} ${108/255} ${10/255} 1.0"/>
      </material>

Unfortunately, this method of specifying link colors does not work in Gazebo
as it adopts OGRE's material scripts for coloring and texturing links.
Instead, a Gazebo material tag must be specified for each link, such as:

      <gazebo reference="link1">
        <material>Gazebo/Orange</material>
      </gazebo>

As mentioned earlier, in the RRBot example we have chosen to include all
Gazebo-specific tag in a secondary file called [ rrbot.gazebo
](https://github.com/ros-
simulation/gazebo_ros_demos/blob/master/rrbot_description/urdf/rrbot.gazebo) .


    <?xml version="1.0"?>
    <robot name="Nelson_Swag_Leg_Chair_U">
      <link name="Nelson_Swag_Leg_Chair_n">
        <visual>
          <origin rpy="0 0 0" xyz="0.09137 0.00495 1"/>
          <geometry>
            <mesh filename="package://myWorld/world/object/Nelson_Swag_Leg_Chair/models/Nelson_Swag_Leg_Chair.dae" scale = ".1 .1 .1"/>
          </geometry>
        </visual>
        <collision>
          <geometry>
            <mesh filename="package://myWorld/world/object/Nelson_Swag_Leg_Chair/models/Nelson_Swag_Leg_Chair.dae" scale = ".1 .1 .1"/>
          </geometry>
          <origin rpy="0 ...


* Solutions


URDF tags for creating objects involving curved surfaces and body parts


Sort by »  [ oldest  ](/question/42868/urdf-tags-for-creating-objects-
involving-curved-surfaces-and-body-parts/?sort=oldest#sort-top) [ newest
](/question/42868/urdf-tags-for-creating-objects-involving-curved-surfaces-
and-body-parts/?sort=latest#sort-top) [ most voted  ](/question/42868/urdf-
tags-for-creating-objects-involving-curved-surfaces-and-body-
parts/?sort=votes#sort-top)


* [ Pricing ](/pricing)


[ **answered 2013-01-10 02:56:25 -0500  ** ](/answers/654/revisions/)


      cat ~/.gazebo/gzsdf.log

##  Viewing the URDF In Gazebo
Viewing the RRBot in Gazebo was already covered at the beginning of this
tutorial. For your own custom robot, we assume its URDF lives in a ROS package
named ` MYROBOT_description ` in the subfolder ` /urdf ` . The method to open
a URDF from that location into Gazebo using ROS was covered in the previous
tutorial, [ Using roslaunch Files to Spawn Models
](/tutorials?tut=ros_roslaunch) . If you have not completed that tutorial, do
so now.
From that tutorial you should have two ROS packages for your custom robot: `
MYROBOT_description ` and ` MYROBOT_gazebo ` . To view your robot and test it
in Gazebo, you should be able to now run something like:

    roslaunch MYROBOT_gazebo MYROBOT.launch

This should launch both the Gazebo server and GUI client with your robot
automatically launched spawned inside.
##  Tweaking your model
If your robot model behaves unexpectedly within Gazebo, it is likely because
your URDF needs further tuning to accurately represent its physics in Gazebo.
See the [ SDF user guide ](http://gazebosim.org/sdf.html) for more info on
various properties available in Gazebo, which are also available in the URDF
via the ` <gazebo> ` tag.
##  Sharing your robot with the world
If you have a common robot that other's might want to use in Gazebo, you are
encouraged to add your URDF to the [ Gazebo Model Database
](/tutorials?tut=model_structure&cat=build_robot) . It is an online server
that Gazebo connects to to pull down models from the internet. Its Mercurial
repository is located on [ GitHub ](https://github.com/osrf/gazebo_models) .
See [ Gazebo Model Database ](/tutorials?tut=model_contrib&cat=build_robot)
documentation for how to submit a pull request to have your robot added to the
database.
##  Next steps
You have now learned how to use ROS packages containing URDFs with Gazebo, and
how to convert your custom URDF to work in Gazebo. You are now ready to learn
about adding plugins to your URDF so that different aspects of your robot and


##  Links
Be sure you are familiar with the URDF [ link
](http://www.ros.org/wiki/urdf/XML/link) element.
The following is an example link from RRBot:

      <!-- Base Link -->
      <link name="link1">
        <collision>
          <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
          <geometry>
            <box size="${width} ${width} ${height1}"/>
          </geometry>
        </collision>

        <visual>
          <origin xyz="0 0 ${height1/2}" rpy="0 0 0"/>
          <geometry>
            <box size="${width} ${width} ${height1}"/>
          </geometry>
          <material name="orange"/>
        </visual>

        <inertial>
          <origin xyz="0 0 1" rpy="0 0 0"/>
          <mass value="1"/>
          <inertia
            ixx="1.0" ixy="0.0" ixz="0.0"
            iyy="1.0" iyz="0.0"
            izz="1.0"/>
        </inertial>
      </link>

###  Note On Units
As per ROS [ REP 103: Standard Units of measure and Coordinate Conventions
](http://www.ros.org/reps/rep-0103.html) , units in Gazebo should be specified
in meters and kilograms. Gazebo could possibly be used with imperial units if
the constants such as gravity were changed manually, but by default gravity is
9.81 m/s^2. When specifying mass, use units of kilograms.
###  ` <collision> ` and ` <visual> ` elements


[ Parameters for a skid steering/simulated tracked robot (use of the fdir1
tag) ](/question/5476/parameters-for-a-skid-steeringsimulated-tracked-robot-
use-of-the-fdir1-tag/)


##  Use saved searches to filter your results more quickly


[ ![Adolfo Rodriguez T gravatar
image](//www.gravatar.com/avatar/cf2bd2e3ecedc8ecd9de202ec26a1bb8?s=16&d=identicon&r=PG)
](/users/410/adolfo-rodriguez-t/) [ Adolfo Rodriguez T ](/users/410/adolfo-
rodriguez-t/) (  2012-09-04 02:47:38 -0500  )  edit


fixed in trunk per [ commit
](https://bitbucket.org/osrf/gazebo/commits/d9edb000a87db61d30b85c7f14885be451dda876)
, will make a groovy release soon.


add a comment


Toggle navigation  [
![gazebo](/assets/masthead-0bd44817978df8069f427d8ca1657998789065a2b242edfd1a3d8ab4a329dd4c.png)
](/)
  * [ Tutorials ](/tutorials)
  * [ Download ](/download)
  * [ Blog ](/blog.html)
  * [ Media ](/media)
  * [ Projects ](/projects)
__
** WARNING ** : This documentation is for Gazebo-classic, which has been
superseded by Gazebo. [ Click here to see the documentation for the latest
Gazebo release ](https://gazebosim.org/docs)
[ Back ](/tutorials?cat=connect_ros)
#  URDF in Gazebo
[ Edit
](https://github.com/osrf/gazebo_tutorials/blob/master/ros_urdf/tutorial.md)
Version: 1.9+
* * *
####  Table of Contents
#  Tutorial: Using a URDF in Gazebo
The [ Unified Robotic Description Format ](http://www.ros.org/wiki/urdf)
(URDF) is an XML file format used in ROS to describe all elements of a robot.
To use a URDF file in Gazebo, some additional simulation-specific tags must be
added to work properly with Gazebo. This tutorial explains the necessary steps
to successfully use your URDF-based robot in Gazebo, saving you from having to
create a separate SDF file from scratch and duplicating description formats.
Under the hood, Gazebo will then convert the URDF to SDF automatically.
##  Background
While URDFs are a useful and standardized format in ROS, they are lacking many
features and have not been updated to deal with the evolving needs of
robotics. URDF can only specify the kinematic and dynamic properties of a
single robot in isolation. URDF can not specify the pose of the robot itself
within a world. It is also not a universal description format since it cannot
specify joint loops (parallel linkages), and it lacks friction and other
properties. Additionally, it cannot specify things that are not robots, such
as lights, heightmaps, etc.
On the implementation side, the URDF syntax breaks proper formatting with
heavy use of XML attributes, which in turn makes URDF more inflexible. There
is also no mechanism for backward compatibility.
To deal with this issue, a new format called the [ Simulation Description


|  [ Ask Your Question ](/questions/ask/)
---|---|---|---

1


|  [ Ask Your Question ](/questions/ask/)
---|---|---|---

0


[ **asked 2013-01-01 04:19:54 -0500  ** ](/questions/582/revisions/)


[ edit ](/s/answers/42874/edit/) flag offensive  delete  [ link
](/question/42868/urdf-tags-for-creating-objects-involving-curved-surfaces-
and-body-parts/?answer=42874#post-id-42874 "permanent link") more


Copy link


[ ![markus gravatar
image](//www.gravatar.com/avatar/f4f5b43768f672dcfee400173fd80437?s=16&d=identicon&r=PG)
](/users/4121/markus/) [ markus ](/users/4121/markus/) (  2017-11-16 13:57:04
-0500  )  edit


[ Search syntax tips ](https://docs.github.com/search-github/github-code-
search/understanding-github-code-search-syntax)


But this gave me error as:-


The site is read-only. Please transition to use Robotics Stack Exchange


  * [ Code  ](/gazebosim/sdformat)
  * [ Issues  239  ](/gazebosim/sdformat/issues)
  * [ Pull requests  14  ](/gazebosim/sdformat/pulls)
  * [ Actions  ](/gazebosim/sdformat/actions)
  * [ Projects  0  ](/gazebosim/sdformat/projects)
  * [ Security  ](/gazebosim/sdformat/security)
  * [ Insights  ](/gazebosim/sdformat/pulse)


ROS Resources: [ Documentation ](http://wiki.ros.org/) | [ Support
](http://wiki.ros.org/Support) | [ Discussion Forum
](http://discourse.ros.org/) | [ Index ](http://index.ros.org/) | [ Service
Status ](http://status.ros.org/) | [ ros @ Robotics Stack Exchange
](https://robotics.stackexchange.com/questions/tagged/ros)
---

_Attention:_ Answers.ros.org is deprecated as of August the 11th, 2023. Please
visit [ robotics.stackexchange.com ](http://robotics.stackexchange.com) to ask
a new question. This site will remain online in read-only mode during the
transition and into the foreseeable future. Selected questions and answers
have been migrated, and redirects have been put in place to direct users to
the corresponding questions on Robotics Stack Exchange. Additional details are
[ available here ](https://discourse.ros.org/t/ros-and-gazebo-answers-
migration-to-robotics-stack-exchange-process/31494) .


  * [ Terms ](https://docs.github.com/site-policy/github-terms/github-terms-of-service)
  * [ Privacy ](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)
  * [ Security ](/security)
  * [ Status ](https://www.githubstatus.com/)
  * [ Docs ](https://docs.github.com/)
  * [ Contact ](https://support.github.com?tags=dotcom-footer)
  * Manage cookies
  * Do not share my personal information


* [ urdf ](/questions/scope:all/sort:activity-desc/tags:urdf/page:1/)


All reactions


[ Adolfo Rodriguez T ](/users/410/adolfo-rodriguez-t/) ![flag of
Spain](/m/default/media/images/flags/es.gif?v=28)
3907  ●  28  ●  45  ●  71


            <material>
              <script>
                <name>ambient</name>
                <uri>file://media/materials/scripts/gazebo.material</uri>
              </script>
            </material>
          </visual>
          <gravity>1</gravity>
          <velocity_decay/>
        </link>
      </model>
    </sdf>

---

The text was updated successfully, but these errors were encountered:


* [ GitHub Sponsors  Fund open source developers  ](/sponsors)


[ none ](/questions/scope:all/sort:activity-desc/tags:none/page:1/) ×


[ aknirala ](/users/1931/aknirala/) ![flag of
India](/m/default/media/images/flags/in.gif?v=28)
339  ●  22  ●  25  ●  35  [ http://everythingislog...
](http://everythingislogic.blogspot.in/2014/06/after-planning-for-so-many-
eons-i-am.html "aknirala's website is
http://everythingislogic.blogspot.in/2014/06/after-planning-for-so-many-eons-
i-am.html")


##  Comments


edit


[ Is it possible to define the joint frame? ](/question/24427/is-it-possible-
to-define-the-joint-frame/)


    * [ Topics ](/topics)
    * [ Trending ](/trending)
    * [ Collections ](/collections)


**Have a question about this project?** Sign up for a free GitHub account to
open an issue and contact its maintainers and the community.


With josephcoombe hint I now did the following:test.urdf:


##  Description


[ ![markus gravatar
image](//www.gravatar.com/avatar/f4f5b43768f672dcfee400173fd80437?s=16&d=identicon&r=PG)
](/users/4121/markus/) [ markus ](/users/4121/markus/) (  2017-11-16 03:59:40
-0500  )  edit


[ Problem adding gazebo_ros_control plugin in sdf model and running in gazebo
](/question/5599/problem-adding-gazebo_ros_control-plugin-in-sdf-model-and-
running-in-gazebo/)


      </gazebo>
    </robot>


[ edit ](/s/answers/42902/edit/) flag offensive  delete  [ link
](/question/42868/urdf-tags-for-creating-objects-involving-curved-surfaces-
and-body-parts/?answer=42902#post-id-42902 "permanent link") more


[ subscribe to rss feed ](/feeds/question/582/ "subscribe to the rss feed")


{{ message }}


How to support additional sdf elements (<ode>, <bullet>, <bounce>, etc) in
urdf file using the <gazebo> tag


  * Actual behavior:
The translation process breaks the material tag by attempting to convert it to
a reference to a Gazebo material script.


[ Mobile robot slides and joints continuously moving when spawn
](/question/355888/mobile-robot-slides-and-joints-continuously-moving-when-
spawn/)


[ dornhege ](/users/122/dornhege/) ![flag of
Germany](/m/default/media/images/flags/de.gif?v=28)
31395  ●  134  ●  284  ●  498


##  Steps to reproduce


    <model name="Nelson_Swag_Leg_Chair" static="true">
        <link name="Nelson_Swag_Leg_Chair">
            <origin pose="0 0 0 0 0 0"/>
            <collision>
                <geometry>
                    <mesh filename="/home/nirala/ros_workspace/myWorld/world/object/Nelson_Swag_Leg_Chair/models/Nelson_Swag_Leg_Chair.dae" scale="1 1 1"/>
                </geometry>
            </collision>
            <visual>
                <geometry>
                    <mesh filename="package://myWorld/world/object/Nelson_Swag_Leg_Chair/models/Nelson_Swag_Leg_Chair.dae" scale="1 1 1"/>
                </geometry>
            </visual>
        </link>
    </model>


damping and watching how "realistic" the swinging pendulum appeared. We
encourage you to play with this value now (increase/decrease it) to get a feel
for how it affects the physics engine.
###  ` <gazebo> ` Elements For Joints
Name  |  Type  |  Description
---|---|---
stopCfm  |  double  |  Joint stop constraint force mixing (cfm) and error
reduction parameter (erp) used by ODE
stopErp
provideFeedback  |  bool  |  Allows joints to publish their wrench data
(force-torque) via a Gazebo plugin
implicitSpringDamper  |  bool  |  If this flag is set to true, ODE will use
ERP and CFM to simulate damping. This is a more stable numerical method for
damping than the default damping tag. The cfmDamping element is deprecated and
should be changed to implicitSpringDamper.
springStiffness  |  double  |  Spring stiffness in N/m.
springReference  |  double  |  Equilibrium position for the spring.
cfmDamping
fudgeFactor  |  double  |  Scale the excess for in a joint motor at joint
limits. Should be between zero and one.

Again, similar to ` <gazebo> ` elements for ` <robot> ` and ` <link> ` , any
arbitrary blobs that are not parsed according to the table above are inserted
into the the corresponding ` <joint> ` element in the SDF. This is
particularly useful for plugins, as discussed in the [ ROS Motor and Sensor
Plugins ](/tutorials?tut=ros_gzplugins) tutorial.
##  Verifying the Gazebo Model Works
With Gazebo installed, an easy tool exists to check if your URDF can be
properly converted into a SDF. Simply run the following command:

      # gazebo2 and below
      gzsdf print MODEL.urdf
      # gazebo3 and above
      gz sdf -p MODEL.urdf

This will show you the SDF that has been generated from your input URDF as
well as any warnings about missing information required to generate the SDF.
Note: in Gazebo version 1.9 and greater, some of the debug info has been moved
to a log file you can view with:


[ **updated 2012-09-03 23:28:38 -0500  ** ](/questions/42868/revisions/)


Search


I am not sure what information will be required to debug this, but I can place
it online.


[ edit ](/s/answers/634/edit/) flag offensive  delete  [ link
](/question/582/surface-material-colors-from-urdf-and-
collada/?answer=634#post-id-634 "permanent link") more


[ Robot position not updating in RVIZ ](/question/382067/robot-position-not-
updating-in-rviz/)


[ barulicm ](/barulicm) opened this issue  Mar 15, 2021  · 1 comment


##  Environment


             2012-09-03 02:27:24 -0500
            ]: 2012-09-03 02:27:24 -0500
  *[
        2012-09-03 00:25:18 -0500
       ]: 2012-09-03 00:25:18 -0500
  *[
        2024-04-16 18:03:36 -0500
       ]: 2024-04-16 18:03:36 -0500


Resources


[ rosrun gazebo spawn_model -file 'pwd'/object.urdf -urdf -z 1 -model
my_object ](/question/290259/rosrun-gazebo-spawn_model-file-pwdobjecturdf-
urdf-z-1-model-my_object/)


add a comment


###  Footer navigation


Email Address


The generated SDF with the now broken material tag.


[ Allow to convert URDF color to SDF material tag  #526
](/gazebosim/sdformat/pull/526)


[ about ](/about/) |  [ faq ](/faq/) |  [ help ](/help/ "help") |  [ privacy
policy ](/privacy/) |  [ terms of service ](/terms/)


##  Stats


Thanks, Is there a tool etc to visualize and create desired mesh. Can you
point me to some links to do the same..


* [ The ReadME Project  GitHub community articles  ](/readme)


You signed in with another tab or window. [ Reload ]() to refresh your
session.  You signed out in another tab or window. [ Reload ]() to refresh
your session.  You switched accounts on another tab or window. [ Reload ]() to
refresh your session.  Dismiss alert


Contributor


[ edit ](/questions/42868/edit/) [ retag ](/s/questions/42868/retag/) flag
offensive  [ close ](/questions/42868/close/) merge  delete


The URDF in that tutorial is incorrect. It should be:


It contains a door.urdf, which has tags like:-


Password


This post is a wiki. Anyone with karma >75 is welcome to improve it.


[ @nkoenig ](/users/5/nkoenig/) : I just tried this and it does not work. See
updated question. I can't see why it should not work if I take a look at
urdf_parser.cc, but I am having trouble compiling the simulator_gazebo stack
from source to figure it out.


Cancel  Submit feedback


##  Comments


I couldn't find any useful tags at : [ http://www.ros.org/wiki/urdf/XML
](http://www.ros.org/wiki/urdf/XML)


[ ![Gazebo logo](/upfiles/gazebo_logo_1.png) ](/questions/)


Ditto! I had to go back from ROS Groovy to ROS fuerte for this reason.


[ ![@MikeHallettUK](https://avatars.githubusercontent.com/u/57232441?s=80&v=4)
](/MikeHallettUK)


[ Sign in
](/login?return_to=https%3A%2F%2Fgithub.com%2FIntelRealSense%2Flibrealsense%2Fissues%2F10223)


327  int  dst_depth = enc::bitDepth(dst_encoding);


351  }


February 18, 2016, 12:26 pm


389  }


382  for  (  int  i = 0; i < [ image
](classcv__bridge_1_1CvImage.html#a8b0cc1c26637754fbccb91b4fc086526) .rows;
++i)


Copy link


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fquestion2135.rssing.com%2Fchan-36145539%2Farticle64-live.html
"Article Support")


493  {


    * [ Topics ](/topics)
    * [ Trending ](/trending)
    * [ Collections ](/collections)


[ ![@MartyG-
RealSense](https://avatars.githubusercontent.com/u/41145062?s=80&v=4)
](/MartyG-RealSense)


Sharing:


215  if  (!is_num_channels_the_same)


88  if  (encoding == enc::BAYER_BGGR8)  return  CV_8UC1;


365  ros_image.height = [ image
](classcv__bridge_1_1CvImage.html#a8b0cc1c26637754fbccb91b4fc086526) .rows;


563  }


271  // If the endianness is the same as locally, share the data


279  mat = cv::Mat(source.height, source.width, CV_MAKETYPE(CV_8U,
num_channels*byte_depth),


[ Poor performances on embedded devices with align_depth and pointcloud
IntelRealSense/realsense-ros#2334  ](/IntelRealSense/realsense-
ros/issues/2334)


     13/02 08:04:04,710 WARNING [140518176167808] (types.cpp:57) get_xu(id=11) failed! Last Error: Input/output error
    [ WARN] [1518537844.712649470]: Reconfigure callback failed with exception get_xu(id=11) failed! Last Error: Input/output error:

When I ` rosbag record ` for these 30 seconds, I find that there is regular
data being published to ` /camera/color/image_raw ` , but only once (at second
11) was there data published to ` /camera/depth_registered/points ` .
Does anyone have any thoughts as to why these issues could be happening?

---

The text was updated successfully, but these errors were encountered:

❤  1  monajalal reacted with heart emoji
All reactions
  * ❤  1 reaction
[
![@icarpis](https://avatars.githubusercontent.com/u/17433152?s=40&u=be511f385c8e74386389b4a1bc0941bcf574b1d2&v=4)
](/icarpis) [ icarpis ](/icarpis) added the [ ROS Wrapper 2
](/IntelRealSense/realsense-ros/labels/ROS%20Wrapper%202) label  Feb 15, 2018
[
![@icarpis](https://avatars.githubusercontent.com/u/17433152?s=80&u=be511f385c8e74386389b4a1bc0941bcf574b1d2&v=4)
](/icarpis)
Copy link
Contributor
###
**[ icarpis ](/icarpis) ** commented  Feb 22, 2018
Hello [ @moorage ](https://github.com/moorage) , please consider to go over [
this ](https://github.com/ros-drivers/usb_cam/issues/55) issue. it looks that
there is a problem to record compressed depth image using ` rosbag ` .
Regarding the ` Frames didn't arrived within 5 seconds ` and ` get_xu(id=11)
failed! Last Error: Input/output error ` warnings, please provide RealSense
log in debug level by the following:
  1. Type ` export LRS_LOG_LEVEL=Debug ` .
  2. Reproduce the issue.
  3. Post the output of ` realsense_ros_camera ` node.

---

All reactions


223  if  (!is_num_channels_the_same)


163  res[std::make_pair(RGBA, [ GRAY
](namespacecv__bridge_1_1rgb__colors.html#aa6343a2cb9080c11afefb714570c63cca04e661921a463f3df840acbb03527c98)
)].push_back(cv::COLOR_RGBA2GRAY);


240  if  ((enc::bitDepth(src_encoding) != enc::bitDepth(dst_encoding)) &&
(getEncoding(src_encoding) != getEncoding(dst_encoding)))


Search


I created ` bag_converter ` package and I am using this script inside it:


###  [ Consuelo Ortiga y Rey: The "Crush ng Bayan" in Rizal's Time
](////ourhappyschool15.rssing.com/chan-59119707/article22.html#c59119707a22i1030558410)


495  }


455  case  [ JPE
](namespacecv__bridge.html#a166887feb09ea6ce14e8742384e574bfa686f9486d4e5fe72f6abf4002c276934)
:


[ ↂ
](////electro404.rssing.com/chan-13553321/article882.html#c13553321a882i1547750503
"MICOM & POWER AMP SCHEMATIC - LG RAT376B - Mini Hi-Fi System")


    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/camera_info
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/realsense2_camera_manager/bond
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/camera_info
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    /diagnostics
    /diagnostics
    /diagnostics
    /diagnostics
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/camera_info
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/realsense2_camera_manager/bond
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /camera/depth/camera_info
    /rosout
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/realsense2_camera_manager/bond
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /camera/depth/camera_info
    /rosout
    /camera/depth/metadata
    /camera/depth/image_rect_raw


All reactions


274  (boost::endian::order::native == boost::endian::order::little &&
!source.is_bigendian) ||


    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/camera_info
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/metadata
    /camera/depth/camera_info
    /camera/depth/image_rect_raw
    /rosout_agg
    /diagnostics
    /diagnostics
    /diagnostics
    /diagnostics
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/camera_info
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/realsense2_camera_manager/bond
    /camera/realsense2_camera_manager/bond
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/camera_info
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    root@8603c293ad2b:/workspace/catkin_ws#

    root@8603c293ad2b:/workspace/catkin_ws# rostopic info /workspace/mona_2023-11-10-22-05-02.bag
    ERROR: Unable to communicate with master!


657  }


why this works ? but not the bottom one? #include  #include  #include
#include  #include  #include  #include  #include  #include  #include  #include
#include  #include  #include  #include  #include  #include  #include  #include
#include  #include  #include  //names that will appear at the top of each
window static const std::string windowName = "Original Image"; using namespace
std; using namespace sensor_msgs; using namespace message_filters; void
callback(const ImageConstPtr& image_rgb, const CameraInfoConstPtr& cam_info) {
// Solve all of perception here... cv::Mat image_color =
cv_bridge::toCvCopy(image_rgb)->image; cv::imshow(windowName,image_color);
cv::waitKey(3); } int main(int argc, char** argv) { ros::init(argc, argv,
"vision_node"); ros::NodeHandle nh; message_filters::Subscriber
rgb_sub(nh,"/camera/rgb/image_color", 1); message_filters::Subscriber
info_color_sub(nh,"/camera/rgb/camera_info", 1); TimeSynchronizer
sync(rgb_sub, info_color_sub, 10);
sync.registerCallback(boost::bind(&callback, _1, _2)); ros::spin(); return 0;
} In the upper code I'm able to see the RGB image . BUT This is not giving any
result. I'm trying to synchronize both the images and then separate then
inside callback . then process the RGB image to find the object. I want ti
find depth of particular pixel u,v . but this is not working when I'm trying
to send both RGB and depth image. void callback(const ImageConstPtr&
image_rgb, const ImageConstPtr& image_depth_source) { // Solve all of
perception here... cv::Mat image_color =
cv_bridge::toCvCopy(image_rgb)->image; cv::Mat image_depth =
cv_bridge::toCvCopy(image_depth_source)->image;
cv::imshow(windowName1,image_color); cv::imshow(windowName2,image_depth);
cv::waitKey(3); } int main(int argc, char** argv) { ros::init(argc, argv,
"vision_node"); ros::NodeHandle nh; message_filters::Subscriber
rgb_sub(nh,"/camera/rgb/image_color", 1); message_filters::Subscriber
depth_sub(nh,"/camera/depth_registered/image_raw", 1); TimeSynchronizer
sync(rgb_sub, depth_sub, 10); sync.registerCallback(boost::bind(&callback, _1,
_2)); ros::spin(); return 0; }


426  return  ptr;


I run the script this way:


[ ![People's Blog • First Pictures of the Eclipse ! !
!](//thepeoplescube.com/red/download/file.php?id=57243&sid=3721c68912ad1a7b63f4cf1eafba9b41)
](////satire3490.rssing.com/chan-77006292/article253.html#c77006292a253i838655542)


104  return  CV_MAKETYPE( [ depthStrToInt
](namespacecv__bridge.html#a76369e4bbe0a2fda233cf5d4640ba2aa) (m[1].str()),
atoi(m[2].str().c_str()));


564  else


**Definition:** [ cv_bridge.h:63 ](cv__bridge_8h_source.html#l00063)


77  if  (encoding == enc::RGB8)  return  CV_8UC3;


500  image = temp->image;


    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /camera/depth/camera_info
    /camera/depth/metadata
    /rosout
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/realsense2_camera_manager/bond
    /camera/realsense2_camera_manager/bond
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/metadata
    /camera/depth/camera_info
    /camera/depth/image_rect_raw
    /rosout_agg
    /diagnostics
    /diagnostics
    /diagnostics
    /diagnostics
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/camera_info
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /camera/depth/camera_info
    /rosout
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/realsense2_camera_manager/bond
    /camera/realsense2_camera_manager/bond
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/metadata


**[ CWAndersn ](/CWAndersn) ** commented  Feb 7, 2022


621  result->encoding = [ encoding
](classcv__bridge_1_1CvImage.html#ac3e39d95b3691df0b08496267517f2db) ;


326  int  src_depth = enc::bitDepth(src_encoding);


331  // Do scaling between CV_8U [0,255] and CV_16U [0,65535] images.


    /camera/aligned_depth_to_color/image_raw
    /rosout_agg
    /rosout
    /rosout_agg
    /camera/depth/camera_info
    /camera/color/metadata
    /camera/color/image_raw/compressed
    /camera/depth/image_rect_raw/theora
    /camera/depth/image_rect_raw/theora
    /camera/depth/image_rect_raw/theora
    /camera/depth/image_rect_raw
    /rosout
    /camera/depth/metadata
    /rosout_agg
    /camera/aligned_depth_to_color/camera_info
    /camera/aligned_depth_to_color/image_raw/compressedDepth
    /camera/color/camera_info
    /camera/aligned_depth_to_color/image_raw/compressed
    /rosout
    /rosout_agg
    /rosout
    /camera/aligned_depth_to_color/image_raw
    /rosout_agg
    /camera/color/image_raw/compressed
    /camera/color/image_raw/theora
    /camera/color/image_raw/theora
    /camera/color/image_raw/theora
    /camera/color/image_raw
    /camera/depth/camera_info
    /camera/color/metadata
    /camera/color/image_raw/theora
    /rosout
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/aligned_depth_to_color/camera_info
    /camera/realsense2_camera_manager/bond
    /camera/color/image_raw/theora/parameter_descriptions
    /camera/aligned_depth_to_color/image_raw/compressedDepth
    /camera/aligned_depth_to_color/image_raw/compressed


486  image = this-> [ image
](classcv__bridge_1_1CvImage.html#a8b0cc1c26637754fbccb91b4fc086526) ;


#  [ How to interpret data matrix in sensor_msgs/Image?
](//question2135.rssing.com/chan-36145539/article75-live.html)


511  {


Search or jump to...


543  double  max_image_value = options. [ max_image_value
](structcv__bridge_1_1CvtColorForDisplayOptions.html#a6d3363623e552011f79007ade2e1e0b4)
;


[ _≫_ Next: Kinect accuracy in depth
](//question2135.rssing.com/chan-36145539/all_p4.html#c36145539a65 "Next
Article")


[ ](javascript:; "Ouch") 0


[ _≫_ Next: Kinect invalid flag less than 0.4 m
](//question2135.rssing.com/chan-36145539/all_p4.html#c36145539a79 "Next
Article")


[ cv_bridge::PBM
](namespacecv__bridge.html#a166887feb09ea6ce14e8742384e574bfa2da0f7870b7ac7950c08ff8243c28757)


220  // If we are converting from a color type to a non color type, we can
only do so if we stick


* [ Pricing ](/pricing)


497  {


394  {


261  }


:)

---

All reactions


562  throw  std::runtime_error(  "Unsupported depth of the source encoding "
\+ encoding);


**[ MartyG-RealSense ](/MartyG-RealSense) ** commented  Nov 16, 2023


194  res[std::make_pair(BAYER_GRBG, BGR)].push_back(cv::COLOR_BayerGB2BGR);


[ _≫_ Next: Depth map from bumblebee2 camera?
](//question2135.rssing.com/chan-36145539/all_p4.html#c36145539a72 "Next
Article")


[ ](//www.rssing.com/index.php?zw=2123 "Home") [ $ ](javascript:; "MoMoney")


Cancel  Create saved search


339  else


[ What may cause different number of depth and RGB frames when we do depth
aligned capture?  #2928  ](/IntelRealSense/realsense-ros/issues/2928)


[ monajalal ](/monajalal) opened this issue  Nov 10, 2023  · 4 comments


108  boost::regex(  "(8U|8S|16U|16S|32S|32F|64F)"  ))) {


![Calgary Hells Angels implicated in another
fraud](//2.bp.blogspot.com/-qpKtSMmZQDE/VDeynZXmedI/AAAAAAAAV04/yx0T_VyHhsc/s320/IMG_60691061533681.jpeg)


[ Sign up
](/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-
name%3E%2F%3Crepo-
name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-
repo&source_repo=IntelRealSense%2Frealsense-ros)


[ _≪_ Previous: Kinect invalid flag less than 0.4 m
](//question2135.rssing.com/chan-36145539/all_p4.html#c36145539a79 "Previous
Article")


[ cv_bridge::Exception ](classcv__bridge_1_1Exception.html)


[ ](javascript:; "Share Article") [
](//www.rssing.com/contact.php?r=o6&u=%2F%2Fquestion2135.rssing.com%2Fchan-36145539%2Farticle74-live.html
"Article Support")


450  return  "bmp"  ;


Hi [ @CWAndersn ](https://github.com/CWAndersn) A pointcloud topic associated
with the **rs_rgbd.launch** RGBD launch mode is
**/camera/depth_registered/points** , as described at [ #10222 (comment)
](https://github.com/IntelRealSense/librealsense/issues/10222#issuecomment-1030874056)


##  Footer


**Definition:** [ cv_bridge.h:50 ](cv__bridge_8h_source.html#l00050)


485  {


[ ](javascript:; "Ouch") 0


###  [ Have you seen Michael Wines? Burien man has been missing since
Saturday,...
](////normandy480.rssing.com/chan-74604448/article56.html#c74604448a56i1857302427)


[ ![@MikeHallettUK](https://avatars.githubusercontent.com/u/57232441?s=80&v=4)
](/MikeHallettUK)


[ Sign up for free ](/join?source=comment-repo) **to join this conversation on
GitHub** . Already have an account? [ Sign in to comment
](/login?return_to=https%3A%2F%2Fgithub.com%2FIntelRealSense%2Flibrealsense%2Fissues%2F10223)


    /diagnostics
    /diagnostics
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/camera_info
    /camera/depth/metadata
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/realsense2_camera_manager/bond
    /camera/realsense2_camera_manager/bond
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/camera_info
    /camera/depth/metadata
    /rosout_agg
    /camera/depth/image_rect_raw
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/camera_info
    /camera/depth/image_rect_raw
    /camera/depth/metadata
    /rosout_agg
    /diagnostics
    /diagnostics
    /diagnostics
    /diagnostics
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed
    /rosout
    /camera/depth/metadata
    /camera/depth/camera_info
    /camera/depth/image_rect_raw
    /rosout_agg
    /camera/realsense2_camera_manager/bond
    /camera/realsense2_camera_manager/bond
    /camera/depth/image_rect_raw/compressedDepth
    /camera/depth/image_rect_raw/compressed


#  Saved searches


#  Search code, repositories, users, issues, pull requests...


[ ![Highlights - Bringing young people to the forefront of EU policy making
-...](//www.europarl.europa.eu/resources/library/images/20200115PHT70307/20200115PHT70307-ms.jpg)
](////europees185.rssing.com/chan-78228109/article559.html#c78228109a559i1335926349)


No one assigned


[ cv_bridge::getCvType
](namespacecv__bridge.html#a60b43d74db6ef87fd6cd35d9305b1ef1)


[ boost::shared_ptr
](../../../../api/roscpp_traits/html/classboost_1_1shared__ptr.html)


622  if  (enc::bitDepth(encoding) == 1)


[ 412 ](namespacecv__bridge.html#a57ce555fdef0034a7aa60b1b58be615c) [
CvImageConstPtr
](../../../../api/roscpp_traits/html/classboost_1_1shared__ptr.html) [
toCvShare ](namespacecv__bridge.html#aafa38a1d9be98d9efaefe45fd873133c) (
const  sensor_msgs::Image& source,


574  // We could have cv_bridge exception or std_runtime_error from
sensor_msgs::image_codings routines


May 25, 2016, 8:26 am


626  }  else  {


**Definition:** [ cv_bridge.h:67 ](cv__bridge_8h_source.html#l00067)


154  res[std::make_pair(RGB, BGR)].push_back(cv::COLOR_RGB2BGR);


57  return  0;


547  // let's figure out what to do with the empty encoding


[ _≫_ Next: why RGB and depth Image synchronization not working?
](//question2135.rssing.com/chan-36145539/all_p4.html#c36145539a62 "Next
Article")


[ ](javascript:; "Ouch") 0


[ 515 ](namespacecv__bridge.html#afc46b776280eccf3cd0d55adf0b944de) [
CvImagePtr
](../../../../api/roscpp_traits/html/classboost_1_1shared__ptr.html) [
toCvCopy ](namespacecv__bridge.html#acbf2da402f4d3e505613e95b5a2aed35) (
const  sensor_msgs::CompressedImage& source,  const  std::string& encoding)


[ cv_bridge::CvtColorForDisplayOptions::do_dynamic_scaling
](structcv__bridge_1_1CvtColorForDisplayOptions.html#a36703aa5ab49cca1eb0adbba9cb70994)


Copy link
###
**[ NovoG93 ](/NovoG93) ** commented  Mar 28, 2019
Facing similar problems with ROS1 Kinetic Ubuntu 16.04 and D435.

---

All reactions
Sorry, something went wrong.
[
![@lucasjinreal](https://avatars.githubusercontent.com/u/21303438?s=80&u=df95206ecc0af7d3969f7dd593a3bb9cc57712a7&v=4)
](/lucasjinreal)
Copy link
###
**[ lucasjinreal ](/lucasjinreal) ** commented  Apr 11, 2019
[ @mingyokim ](https://github.com/mingyokim) That is not a good idea. -a
sometime is needed since we record points is useless.
Facing same issue on kinetic but not on melodic, it's actually a rosbag bug,
seems already fixed in melodic rosbag. But for kinetic it still have this
issue.
To fix it on kinetic, how to disable compressed image anyway? [ @basvroeg
](https://github.com/basvroeg)
From link you provide can not really understand how to set interms of
realsense launch file

---

All reactions
Sorry, something went wrong.
[ ![@basvroeg](https://avatars.githubusercontent.com/u/35264855?s=80&v=4)
](/basvroeg)
Copy link
###
**[ basvroeg ](/basvroeg) ** commented  Apr 18, 2019
added this to the general launchfile specifying the namespace, just before the
include of the camera nodelet:
` <rosparam param="/realsense/infra1/image_rect_raw/disable_pub_plugins" > -
'image_transport/compressed' - 'image_transport/compressedDepth' -
'image_transport/theora' </rosparam> <rosparam
param="/realsense/infra2/image_rect_raw/disable_pub_plugins" > -


70  }


[ Sign in
](/login?return_to=https%3A%2F%2Fgithub.com%2FIntelRealSense%2Frealsense-
ros%2Fissues%2F2929)


558  (enc::bitDepth(source->encoding) == 16) ||


By clicking “Sign up for GitHub”, you agree to our [ terms of service
](https://docs.github.com/terms) and [ privacy statement
](https://docs.github.com/privacy) . We’ll occasionally send you account
related emails.


107  if  (boost::regex_match(encoding.c_str(), m,


427  }


August 17, 2016, 12:05 pm


14  * * Redistributions in binary form must reproduce the above


[ ![@CWAndersn](https://avatars.githubusercontent.com/u/36552123?s=80&v=4)
](/CWAndersn)


[ 362 ](classcv__bridge_1_1CvImage.html#aaa9b38becdd3be93a9547edc46096980)
void  [ CvImage::toImageMsg
](classcv__bridge_1_1CvImage.html#a48a7cc72fa96bdf0180d0306543ceb07)
(sensor_msgs::Image& ros_image)  const


For


Skip to content
Toggle navigation
[ ](https://github.com/)
[ Sign in
](/login?return_to=https%3A%2F%2Fgithub.com%2FIntelRealSense%2Frealsense-
ros%2Fissues%2F315)
  * Product
    * [ Actions  Automate any workflow  ](/features/actions)
    * [ Packages  Host and manage packages  ](/features/packages)
    * [ Security  Find and fix vulnerabilities  ](/features/security)
    * [ Codespaces  Instant dev environments  ](/features/codespaces)
    * [ Copilot  Write better code with AI  ](/features/copilot)
    * [ Code review  Manage code changes  ](/features/code-review)
    * [ Issues  Plan and track work  ](/features/issues)
    * [ Discussions  Collaborate outside of code  ](/features/discussions)
Explore
    * [ All features ](/features)
    * [ Documentation  ](https://docs.github.com)
    * [ GitHub Skills  ](https://skills.github.com/)
    * [ Blog  ](https://github.blog)
  * Solutions
For
    * [ Enterprise ](/enterprise)
    * [ Teams ](/team)
    * [ Startups ](/enterprise/startups)
    * [ Education  ](https://education.github.com)
By Solution
    * [ CI/CD & Automation ](/solutions/ci-cd/)
    * [ DevOps ](/solutions/devops/)
    * [ DevSecOps  ](https://resources.github.com/devops/fundamentals/devsecops/)
Resources
    * [ Learning Pathways  ](https://resources.github.com/learn/pathways/)
    * [ White papers, Ebooks, Webinars  ](https://resources.github.com/)
    * [ Customer Stories ](/customer-stories)
    * [ Partners  ](https://partner.github.com/)
  * Open Source
    * [ GitHub Sponsors  Fund open source developers  ](/sponsors)
    * [ The ReadME Project  GitHub community articles  ](/readme)
Repositories
    * [ Topics ](/topics)


Copy link


* [ GitHub Sponsors  Fund open source developers  ](/sponsors)


396  }


[ ![@MartyG-
RealSense](https://avatars.githubusercontent.com/u/41145062?s=80&v=4)
](/MartyG-RealSense)