Gazebo | Ignition | Community
Ask Your Question

zokowc's profile - activity

2020-12-02 18:26:03 -0500 received badge  Famous Question (source)
2020-08-25 17:21:10 -0500 received badge  Notable Question (source)
2020-06-15 13:05:44 -0500 commented answer Adding multiple models in gazebo using c++ api

Anytime! Please mark this answer correct if it works for you.

2020-06-08 12:00:50 -0500 commented answer Adding multiple models in gazebo using c++ api

You can add models at run time using two different methods(The ones I know off): In terminal, using(where model_0 is t

2020-06-08 11:59:58 -0500 commented answer Adding multiple models in gazebo using c++ api

You can add models at run time using two different methods(The ones I know off): In terminal, using(where model_0 is t

2020-06-08 11:55:06 -0500 received badge  Popular Question (source)
2020-06-05 17:00:22 -0500 commented answer /gazebo/delete_model ros service is unresponsive

Two issues are presented upon further testing: After deletion, the heightmap is still visually present in gazebo GUI (

2020-06-05 16:54:08 -0500 commented answer /gazebo/delete_model ros service is unresponsive

Two issues are presented upon further testing: After deletion, the heightmap is still visually present in gazebo GUI (

2020-06-05 16:53:23 -0500 edited question /gazebo/delete_model ros service is unresponsive

/gazebo/delete_model ros service is unresponsive System settings: gazebo 9 gazebo_ros Ubuntu 18.04 Amd 64 ROS Melodic

2020-06-05 16:46:12 -0500 commented answer /gazebo/delete_model ros service is unresponsive

Two issues are presented upon further testing: After deletion, the heightmap is still visually present in gazebo GUI (

2020-06-05 15:59:14 -0500 commented answer /gazebo/delete_model ros service is unresponsive

The workaround works perfectly, thank you for your swift response.

2020-06-05 15:58:30 -0500 received badge  Supporter (source)
2020-06-05 15:58:24 -0500 marked best answer /gazebo/delete_model ros service is unresponsive

System settings:

  • gazebo 9
  • gazebo_ros
  • Ubuntu 18.04
  • Amd 64
  • ROS Melodic

I created a rosservice to create/delete a maze. While creating a maze works great, deleting the maze is unresposive.

 def srvCallback(self,request):
        if request.adddelete == True:
            self.make_3d_maze()
        else:
            self.remove_all()

        resp = addDeleteResponse()
        resp.success = "Command acted"
        return resp

def remove_all(self):
        print('starting delete proccess')
        for i in range(self.elements_added+1):
            print(i)
            x = self.del_model_prox("object"+str(i))
            rospy.loginfo(x)
        y= self.del_model_prox('the_heightmap')
        self.elements_added = 0

After creating the maze, running the remove_all function outputs the following:

  • "starting delete proccess"
  • "0"

The output stops there until I manually delete the object from the GUI:

  • rospy logs a succesfull deletion
  • "1"

Am i doing something wrong here or is there a bug with deleting the model? (same response if I use the delete model service from terminal). The elements of the maze are simple shapes, the box model can be seen bellow:

<?xml version='1.0' encoding='UTF-8'?>
<sdf version="1.4">
    <model name="the_box">
        <pose> 0 0 0 0 0 0</pose>
        <static>true</static>
        <link name="link">
            <inertial>
                <mass>1.0</mass>
                <inertia>
                <ixx>0.083</ixx>
                <ixy>0.0</ixy>
                <ixz>0.0</ixz>
                <iyy>0.083</iyy>
                <iyz>0.0</iyz>
                <izz>0.083</izz>
            </inertia>
        </inertial>
        <collision name="collision">
            <geometry>
                <box>
                    <size>0.71 0.71 0.71</size>
                </box>
            </geometry>
        </collision>
        <visual name="visual">
            <geometry>
                <box>
                    <size>0.71 0.71 0.71</size>
                </box>
            </geometry>
            <material>
                <script>
                    <name>blotchy_0027</name>
                    <uri>model://scripts</uri>
                    <uri>model://textures</uri>
                </script>
            </material>
        </visual>
    </link>
</model>
</sdf>

Part of "make_3d_maze()" can be seen below:

elif shape_selection ==1:
        filename='/home/nvidiaagx/simulation_ws/src/sim/models/sphere.sdf'
        tree = ET.parse(filename)
        root = tree.getroot()
        for name in root.iter('name'):
            name.text = material_name
        for siz in root.iter('radius'):
            siz.text = size
        tree.write('/home/nvidiaagx/simulation_ws/src/sim/models/sphere.sdf',xml_declaration=True, method='xml',encoding='UTF-8')

        f = open('/home/nvidiaagx/simulation_ws/src/sim/models/sphere.sdf', 'r')
        sdff = f.read()
        nome = "object"+str(objnum)
        self.spawn_model_prox(nome, sdff, "simplemodel",pos,"world")

The heightmap can be seen below:

<?xml version='1.0'?>
<sdf version="1.4">
  <model name="the_terrain">
    <static>true</static>
    <link name="terrain_link">
      <collision name="terrain_collision">
        <geometry>
          <heightmap>
            <uri>/home/nvidiaagx/simulation_ws/src/sim/worlds/terrain2.png</uri>
            <size>100 100 0.25</size>
            <pos>0 0 0</pos>
          </heightmap>
        </geometry>
      </collision>
      <visual name="terrain_visual">
        <geometry>
           <heightmap>
              <uri>/home/nvidiaagx/simulation_ws/src/sim/worlds/terrain2.png</uri>
              <size>100 100 0.25</size>
              <pos>0 0 0</pos>
              <use_terrain_paging>false</use_terrain_paging>
              <texture>
                 <size> 1 </size>
                 <diffuse>file://media/materials/textures/dirt_diffusespecular.png</diffuse>
                 <normal>file://media/materials/textures/dirt_normal.png</normal>
              </texture>
           </heightmap>
         </geometry>
    </visual>
 </link>
</model>
</sdf>
2020-06-05 15:58:24 -0500 received badge  Scholar (source)
2020-06-05 15:51:04 -0500 answered a question Adding multiple models in gazebo using c++ api

An SDF model file may only contain one model, thus why only the first model is being loaded. You can: Put each model i

2020-06-05 15:41:55 -0500 asked a question /gazebo/delete_model ros service is unresponsive

/gazebo/delete_model ros service is unresponsive System settings: gazebo 9 gazebo_ros Ubuntu 18.04 Amd 64 ROS Melodic

2020-06-05 15:00:24 -0500 commented answer Controller manager failed to start controller in realtime loop.

I used a gazebo model plugin, and used gazebos joint controller interface instead of ROS controllers. http://gazebosim.o

2020-03-20 14:47:58 -0500 answered a question model plugin make error

While I don't have your code to see, this is most likely due to forgetting to put a semi-colon at the end of your class

2020-03-20 13:13:56 -0500 received badge  Enthusiast
2020-03-19 14:19:32 -0500 commented question Publisher example doesn't connect, and how to modify it to make a model move?

Can you post a copy of your code?

2020-03-12 14:49:12 -0500 commented answer Controller manager failed to start controller in realtime loop.

Thanks for your answer, I've tried this format and it produces the same error.

2020-03-11 08:20:42 -0500 received badge  Famous Question (source)
2020-03-11 08:20:42 -0500 received badge  Notable Question (source)
2020-03-11 08:20:42 -0500 received badge  Popular Question (source)
2020-02-29 03:44:36 -0500 received badge  Teacher (source)
2020-02-28 16:13:35 -0500 received badge  Editor (source)
2020-02-28 16:13:35 -0500 edited answer Import *.dae from gazebo_models in Blender

Please look into Phobos, a blender plugin that allows you to import/export URDF/SDF files into blender, this should work

2020-02-28 16:11:22 -0500 answered a question Import *.dae from gazebo_models in Blender

Please look into Phobos, a blender plugin that allows you to import/export URDF/SDF files into blender(world files are S

2020-02-28 16:05:59 -0500 answered a question How to simulate and command a steerable wheel?

You cannot have two joints with the same parents and child. To solve this problem, you will need to create an additional

2020-02-28 15:30:27 -0500 asked a question Controller manager failed to start controller in realtime loop.

Controller manager failed to start controller in realtime loop. I'm trying to control the joints of my robot in gazebo u