System plugin not executing in Gazebo 8.2

asked 2018-01-17 07:33:52 -0600

abbs15 gravatar image

updated 2018-01-17 23:53:59 -0600

chapulina gravatar image

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/smart_ptr/shared_ptr.hpp:648: typename boost::detail::sp_member_access<t>::type boost::shared_ptr<t>::operator->() const [with T = gazebo::rendering::UserCamera; typename boost::detail::sp_member_access<t>::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.

edit retag flag offensive close merge delete

Comments

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

chapulina gravatar imagechapulina ( 2018-01-17 11:00:13 -0600 )edit