Gazebo 3.0 System Plugin Tutorial Crashing
Hi, I just installed Gazebo 3.0 from source and was doing all the tutorials in series. However I am stuck at the System Plugin tutorial.
After building the plugin here are the steps, 1) Launch gzserver in background using "gzserver & " 2) Launch gzclient using "gzclient -g libsystem_plugin.so", when I do this I get the following error -
gzclient: /usr/include/boost/smartptr/sharedptr.hpp:653: typename boost::detail::spmemberaccess<t>::type boost::sharedptr<t>::operator->() const [with T = gazebo::rendering::UserCamera; typename boost::detail::spmember_access<t>::type = gazebo::rendering::UserCamera*]: Assertion `px != 0' failed. Aborted (core dumped)
I searched but the only relevant discussion I could find is here. I am a beginner and too immature to understand that. Is there any way to solve this problem?
System Details: Gazebo 3.0 on Ubuntu 13.10, Latest ATI Catalyst Drivers
Code --
#include "gazebo/gui/GuiIface.hh" #include "gazebo/rendering/rendering.hh" #include "gazebo/gazebo.hh"
namespace gazebo { class SystemGUI : public SystemPlugin { public: virtual ~SystemGUI() { if (this->userCam) this->userCam->EnableSaveFrame(false); }
public: virtual void Load(int /*_argc*/, char ** /*_argv*/)
{
}
private: virtual void Init()
{
//this->updateConnection = event::Events::ConnectWorldUpdateBegin(boost::bind(&SystemGUI::OnUpdate, this, _1));
// Get a pointer to the active user camera
this->userCam = gui::get_active_camera();
// Enable saving frames
this->userCam->EnableSaveFrame(true);
// Specify the path to save frames into
this->userCam->SetSaveFramePathname("/home/vineet/.gazebo/gazebo_frames");
}
private: virtual void OnUpdate(const common::UpdateInfo & /*_info*/)
{
}
private: rendering::UserCameraPtr userCam;
private: std::vector<event::ConnectionPtr> connections;
private: event::ConnectionPtr updateConnection;
};
GZREGISTERSYSTEM_PLUGIN(SystemGUI) }