Gazebo | Ignition | Community
Ask Your Question
0

How to simulate Temperature and create an office room

asked 2013-09-25 04:18:13 -0500

Luigi gravatar image

1)i want to create a room from a greyscale image, i have seen two methods using gazebo: with the tag <heightmap> but with this i can't apply a texture to the side of the wall, but only from the hight, and with the tag <image> but this doesn't work, and i don't undertand why, the sdf file is:

<?xml version="1.0" ?>

<sdf version="1.4"> <world name="default">

<!-- A global light source -->
<include>
  <uri>model://sun</uri>
  <pos>0 0 20</pos>
</include>

<include> <uri>model://ground_plane</uri> </include>

<!-- a box to undertand if the world open something-->  
<model name="box1">
  <pose>0 0 1 0 0 0</pose>
  <link name="link">
    <collision name="collision">
      <geometry> <box> <size>2 2 2</size> </box> </geometry>
    </collision>
    <visual name="visual">
      <geometry> <box> <size>2 2 2</size> </box> </geometry>
      <material>
        <ambient>1 0 0 1</ambient>
        <diffuse>1 0 0 1</diffuse>
      </material>
    </visual>
  </link>
</model>

<!-- -->
<model name="image_map">
  <static>true</static>
  <pose> 0 0 0 0 0 0</pose>
  <link name="link">
    <collision name="collision">
      <geometry>
    <image>
                <uri>file://media/materials/textures/room4.jpg</uri>
                <scale>20</scale>
        <threshold>200</threshold>                  
        <height>3</height>
        <granularity>1</granularity>
        </image>
      </geometry>
    </collision>

    <visual name="visual"> 
      <geometry>
        <image>
                <uri>file://media/materials/textures/room4.jpg</uri>
                <scale>20</scale>
        <threshold>200</threshold>                  
        <height>3</height>
        <granularity>1</granularity>
        </image> 
      </geometry>
    </visual>

  </link>
</model>

</world> </sdf>

2) i want to simulate a physics element like the temperature in environment and to relevate it with a sensor, is this thing possible to do? are there any projects available?

thank you for your answer

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-09-25 11:44:02 -0500

nkoenig gravatar image

The <image> geometry model is broken in Gazebo, see this issue.

Temperature is currently no implemented in Gazebo. The easiest solution is to write a WorldPlugin that outputs temperature data. Example world plugin. Every update cycle, your world plugin could get the position of you robot, and then output a temperature value to a topic.

edit flag offensive delete link more

Comments

How I can read the value published on topic?

GuidoG gravatar imageGuidoG ( 2013-10-30 08:28:56 -0500 )edit

You can create a subscriber to a topic. From the command line, you can use the `gztopic -h` command.

nkoenig gravatar imagenkoenig ( 2013-11-07 16:11:10 -0500 )edit
0

answered 2013-09-30 08:41:26 -0500

Luigi gravatar image

Thanks. I have another question: is there any other solution to create an office room starting from a greyscale image without the use of the tag <image> and <heightmap>?

edit flag offensive delete link more

Comments

In the future, please ask new questions in a different thread. It makes searching for answers easier. You can create a room using a 3D mesh editor like Blender, Maya, 3ds max, etc. Export your model as a collada file. See this tutorial

nkoenig gravatar imagenkoenig ( 2013-10-01 12:55:00 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-09-25 04:18:13 -0500

Seen: 718 times

Last updated: Sep 30 '13