Robotics StackExchange | Archived questions

System plugin not executing in Gazebo 8.2

Hello All,

I have implemented a system plugin to get the gui camera pointer and modify it to change the camera pose to get different views out of it. I have called .so file of my system plugin from world file but I plugin never gets called. How can I make this plugin executed ?

Update

Below is the "Update" function of my system plugin:

private: void Update()
{
  if (!this->userCam)
  {
    // Get a pointer to the active user camera
    this->userCam = gui::get_active_camera();

    std::cout << "GUI camera Pose = " << (this->userCam)->WorldPose() << std::endl;
  }

I am getting following error when I run my system plugin :-

gzserver: /usr/include/boost/smartptr/sharedptr.hpp:648: typename boost::detail::spmemberaccess::type boost::sharedptr::operator->() const [with T = gazebo::rendering::UserCamera; typename boost::detail::spmember_access::type = gazebo::rendering::UserCamera*]: Assertion `px != 0' failed.

The value of "this->userCam" is always NULL. How can I get this gui camera working.

Thanks in advance for any inputs.

Asked by abbs15 on 2018-01-17 08:33:52 UTC

Comments

Could you add more information to your question, like the command you're running and what errors you see when you run Gazebo?

Asked by chapulina on 2018-01-17 12:00:13 UTC

Answers