Gazebo | Ignition | Community
Ask Your Question

lysgaard's profile - activity

2018-01-11 16:56:01 -0600 received badge  Famous Question (source)
2017-02-19 16:25:26 -0600 received badge  Notable Question (source)
2017-02-14 10:03:00 -0600 received badge  Popular Question (source)
2017-02-14 06:56:33 -0600 received badge  Supporter (source)
2017-02-14 03:13:29 -0600 received badge  Scholar (source)
2017-02-14 03:13:27 -0600 commented answer How does getChild() and getChildCount() work?

Thanks for the good answer. Might I suggest that the `GetChild()` and `GetChildCount()` documentation is updated to include a note about it's limitations, and maybe even a link to other possibly wanted functions like `GetSensor()`?

2017-02-13 11:35:01 -0600 asked a question How does getChild() and getChildCount() work?

I am making a plugin for this model:

<?xml version="1.0"?> 
<sdf version="1.4">
  <model name="my_model">

    <link name="link">
      <gravity>true</gravity>
      <inertial>...</inertial>

      <sensor name="camera" type="camera">
        <pose>0 0 0 0 0 0</pose>
        <camera>
          <horizontal_fov>2.0</horizontal_fov>
          <image>
            <width>640</width>
            <height>480</height>
          </image>
          <clip>
            <near>1.0</near>
            <far>15000</far>
          </clip>
        </camera>
        <always_on>1</always_on>
        <update_rate>10</update_rate>
        <visualize>1</visualize>
      </sensor>

      <collision name="collision">...</collision>
      <visual name="visual">...</visual>
    </link>

    <plugin name="myplugin" filename="libmyplugin.so"/>
  </model>        
</sdf>

In the plugin I want to manipulate the pose of the camera. The code I use to do this is:

gazebo::physics::BasePtr base = _model->GetLink()->GetChild(std::string("camera"));
if(base){
    boost::dynamic_pointer_cast<gazebo::sensors::CameraSensor>(base)->SetPose(pose);
}

Interestingly base always ends up being a nullptr.

When I call

_model->GetLink()->GetChildCount()

I get the children count of 1.

If I call

_model->GetLink()->GetChild(0)->GetName()

I get "collision". So it seems like the only children to the <link> is the <collision>. This seems quite unlogical for me and I am stuck. I also tried adding another collision tag to the model SDF, GetChildCount then increases to 2, and both collisions can be listed. Is there something about the semantics of GetChild() that I do not understand? I thought I could manipulate the camera using it?

2015-10-19 00:58:20 -0600 received badge  Famous Question (source)
2015-08-20 07:01:34 -0600 received badge  Notable Question (source)
2015-08-20 07:01:34 -0600 received badge  Popular Question (source)
2015-06-24 03:04:43 -0600 commented question Running gzserver hangs on

I agree that something is busy, but I do not understand what it is busy doing. gzserver uses 0% CPU, read and writes nothing to neither disk nor network. How can I debug this?

2015-06-22 15:55:34 -0600 asked a question Running gzserver hangs on

Hi. I have Ubuntu 14.04.2 LTS, and just installed ROS jade which comes gazebo. When I run the standard gazebo command, I get the gazebo gui, with a black screen instead of a 3d rendering. I can press buttons but they don't do anything and the simulation time is not running. And gzclient uses 100% CPU.

Because this didn't work I tried running gzserver --verbose and then in a different terminal gzclient --verbose. When I do this I get the same result. I have inspected the logs, and can't find any mention of the issue there. Because of this I am now stuck. I don't know where to debug next to find the issues? Any help would be greatly appreciated.

The different log files say this:

gzclient

Gazebo multi-robot simulator, version 5.0.1
Copyright (C) 2012-2015 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org


(1435005457 956425158) [Msg] Waiting for master.
(1435005457 965050593) [Msg] Connected to gazebo master @ http://127.0.0.1:11345
(1435005457 965192387) [Msg] Publicized address: 192.168.1.5
(1435005458 966678428) [Wrn] [gazebo.cc:186] Waited 1seconds for namespaces.
(1435005459 968140729) [Wrn] [gazebo.cc:186] Waited 1seconds for namespaces.
(1435005460 969379185) [Wrn] [gazebo.cc:186] Waited 1seconds for namespaces.
(1435005461 970625836) [Wrn] [gazebo.cc:186] Waited 1seconds for namespaces.
(1435005462 971813569) [Wrn] [gazebo.cc:186] Waited 1seconds for namespaces.
(1435005463 973052910) [Wrn] [gazebo.cc:186] Waited 1seconds for namespaces.
(1435005464 974319177) [Wrn] [gazebo.cc:186] Waited 1seconds for namespaces.
(1435005465 975521944) [Wrn] [gazebo.cc:186] Waited 1seconds for namespaces.
(1435005466 976826511) [Wrn] [gazebo.cc:186] Waited 1seconds for namespaces.
(1435005467 978346401) [Wrn] [gazebo.cc:186] Waited 1seconds for namespaces.
(1435005468 979905050) [Err] [gazebo.cc:191] Waited 11 seconds for namespaces. Giving up.
(1435005468 980364818) Loaded .ini file from: "/home/lysgaard/.gazebo/gui.ini"
(1435005470 155222702) [Err] [Node.cc:98] No namespace found
(1435005471 183807127) [Err] [Node.cc:98] No namespace found
(1435005472 199489304) [Err] [Node.cc:98] No namespace found
(1435005473 387903100) [Err] [Node.cc:98] No namespace found
(1435005474 389467828) [Err] [Node.cc:98] No namespace found
(1435005475 390944483) [Err] [Node.cc:98] No namespace found
(1435005476 392562234) [Err] [Node.cc:98] No namespace found
(1435005477 393977301) [Err] [Node.cc:98] No namespace found
(1435005478 395705302) [Err] [Node.cc:98] No namespace found
(1435005479 397314823) [Err] [Node.cc:98] No namespace found
(1435005480 398751516) [Err] [Node.cc:98] No namespace found
(1435005481 402911076) [Err] [Node.cc:98] No namespace found
(1435005481 841306550) No spacenav daemon found. Spacenav functionality is disabled

gzserver

Gazebo multi-robot simulator, version 5.0.1
Copyright (C) 2012-2015 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org


(1435005457 945789775) [Msg] Waiting for master.
(1435005457 954908186) [Msg] Connected to gazebo master @ http://127.0.0.1:11345
(1435005457 955031259) [Msg] Publicized address: 192.168.1.5
(1435005458 55868827) [Wrn] [ModelDatabase.cc:334] Getting models from[http://gazebosim.org/models/]. This may take a few seconds.

ogre.log

22 ...
(more)