Gazebo | Ignition | Community
Ask Your Question

JasonMel's profile - activity

2016-11-02 00:06:17 -0600 received badge  Famous Question (source)
2016-10-31 04:52:39 -0600 received badge  Autobiographer
2016-10-31 04:47:35 -0600 received badge  Famous Question (source)
2016-10-11 14:37:53 -0600 commented question Does anyone get output with the ContactSensor tutorial?

Tried it again this week and it worked. I have no idea what I did differently.

2016-10-11 12:12:59 -0600 answered a question How do i install gazebo in ubuntu 16.04

The Installation Tutorial for Ubuntu worked for me. Just use the "Default installation: one-liner" script. The front page doesn't mention it as of right now, but there is a Gazebo 7 package for xenial.

2016-10-02 08:02:57 -0600 received badge  Famous Question (source)
2016-09-26 11:28:50 -0600 received badge  Notable Question (source)
2016-09-26 11:28:50 -0600 received badge  Popular Question (source)
2016-09-25 10:55:35 -0600 commented question Error compiling contact sensor tutorial on Mac OS

On Ubuntu Linux I can compile this tutorial but it produces no output. I asked a question about it at http://answers.gazebosim.org/question/14479/does-anyone-get-output-with-the-contactsensor-tutorial/

2016-09-25 10:54:38 -0600 answered a question Error compiling contact sensor tutorial on Mac OS

On Ubuntu Linux I can compile this tutorial but it produces no output. I asked a question about it here.

2016-09-23 20:14:30 -0600 asked a question Does anyone get output with the ContactSensor tutorial?

I'm doing the contact sensor tutorial here word for word. It compiles fine, but when I run the final command gzserver ../contact.world, I see no output, even if I modify the world file with the full path of the .so file. The portion before the plugin material works fine, however. Gazebo is working well when used with other plugins.

Gazebo 7.3.1
Ubuntu

2016-09-20 12:24:46 -0600 answered a question Modifying GAZEBO_RESOURCE_PATH causes null pointer crash

As I indicated in my edit, this problem has nothing to do with any plugins. It was caused by attempting, in .bashrc, to modify environment variables, GAZEBO_MODEL_PATH and GAZEBO_RESOURCE_PATH, that had never been set. As Steven Peters pointed out in the bug tracker issue, this entire problem can be fixed by putting the line

source /usr/share/gazebo/setup.sh

above any lines that customize the Gazebo paths, such as

export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:<new_path>
export GAZEBO_RESOURCE_PATH=${GAZEBO_RESOURCE_PATH}:<new_path>

in .bashrc. The Getting Started tutorial mentions the need to do this.

2016-09-19 16:50:09 -0600 edited question Modifying GAZEBO_RESOURCE_PATH causes null pointer crash

Last week, my plugins were working. Without having changed anything, this week the visual plugin crashes. Does anyone have any insights into what's going on or how to fix this? Does anyone else get the same error on compiling the plugin and using it with the world file below?


[Edit Sept. 19 '16: I did change something, which I had forgotten about. As alluded to in the edited title of the question, I attempted to add a directory to the GAZEBO_RESOURCE_PATH in .bashrc -- see the issue URL in the comment below. This problem had nothing whatsoever to do with my visual plugin.]


Here's the error:

gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Camera*]: Assertion `px != 0' failed.
Aborted (core dumped)

Here are the only files necessary to reproduce the crash:

Visual plugin:

#include <gazebo/gazebo.hh>
#include <gazebo/common/common.hh>
#include <gazebo/rendering/rendering.hh>
#include <stdio.h>

namespace gazebo
{ class SpacenavVisualPlugin : public VisualPlugin
  { public: 

      // Constructor
      SpacenavVisualPlugin() : VisualPlugin()
      { printf( "SpacenavVisualPlugin started\n" ); // DEBUG
      }

      // Destructor
      ~SpacenavVisualPlugin() // : ~VisualPlugin()
      { printf( "SpacenavVisualPlugin stopped\n" ); // DEBUG
      }

      void Load( rendering::VisualPtr _visual, sdf::ElementPtr /*_sdf*/)
      { // === Turn off the SpaceNavigator's default camera control
        rendering::ScenePtr scene = _visual->GetScene();
        rendering::UserCameraPtr cam = scene->GetUserCamera( 0 );
        cam->SetJoyPoseControl( false );
        cam->SetJoyTwistControl( false );
      }
  };

  // Register this plugin with the simulator
  GZ_REGISTER_VISUAL_PLUGIN( SpacenavVisualPlugin )
};

World file:

<?xml version="1.0" ?>
<sdf version="1.5">
  <world name="default">

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

    <include>
      <uri>model://sun</uri>
    </include>

    <!-- model just to hold plugin that turns off spacenav camera control  -->
    <model name="dummy_model">
      <link name="dummy">
        <collision name="collision">
          <geometry>
            <box>
              <size>1 1 1</size>
            </box>
          </geometry>
        </collision>
        <visual name="visual">
          <geometry>
            <box>
              <size>1 1 1</size>
            </box>
          </geometry>
          <plugin name="spacenavVisualPlugin" filename="/home/jason/libspacenavVisualPlugin.so"/>
        </visual>
      </link>
    </model>

  </world>
</sdf>

The commands I run are gzserver test.world and, in a separate terminal window, gzclient. The abort back to the prompt happens almost immediately after the second command, just a split second after the gazebo splash screen and the main window are drawn. Then I can quit the first command in its terminal window with CTRL-c.

Here is the question where I describe the need for the visual plugin. The problem seems to be related to this question; i.e., the plugin is somehow running before the rendering engine is initialized, but I don't know of any other way to turn off the Space Navigator other than the visual plugin.

2016-09-19 16:41:57 -0600 marked best answer How can I turn off the Space Navigator's control of the camera?

I'm using a plugin to control models with the Space Navigator (spacenav 6 DOF) 3D mouse. It works, but the controller is controlling both the object (through the spnav external library) and the camera at the same time. I'm looking for a way to turn off the camera control and just use the regular mouse for that. If necessary, it looks like i could recompile Gazebo from source after commenting out the relevant lines in gazebo/gui/CMakeLists.txt, but it would be easier to use ~/.gazebo/gui.ini, or an API call, or something.

2016-09-19 16:38:41 -0600 commented answer What is the best way to share links between models?

This definitely works. Thanks!

2016-09-19 16:37:08 -0600 marked best answer What is the best way to share links between models?

I need to make a bunch of models each having an identical copy of a particular link. What's the best way of doing that without copying and pasting the entire XML for the link every time? Can I use an <include> element for this somehow?

2016-09-19 16:37:08 -0600 received badge  Scholar (source)
2016-09-12 11:57:19 -0600 commented question Modifying GAZEBO_RESOURCE_PATH causes null pointer crash

@Omer Yeah, there's a fix at https://bitbucket.org/osrf/gazebo/issues/2044/gazebo-731-gzserver-gzclient-results-in that worked for me. I haven't typed up an answer here because I'd like to see how the issue discussion plays out.

2016-09-12 11:22:40 -0600 received badge  Notable Question (source)
2016-09-10 07:31:52 -0600 received badge  Famous Question (source)
2016-09-07 22:36:07 -0600 received badge  Enthusiast
2016-09-06 09:26:54 -0600 commented question Modifying GAZEBO_RESOURCE_PATH causes null pointer crash

@chapulina Actually, I've realized that Gazebo doesn't even work when running `gzserver empty.world` with the presupplied empty.world and running `gzclient` in another terminal. The gzserver seems to work, but the gzclient loads the spash screen and the main window border, outputs the error I quoted in the question, and quits. Then I CTRL-c out of the gzserver. Gazebo works fine if launched via the launcher, however. The major version is 7, but I'm not sure what the minor and patch versions are.