Skip to content

Commit

Permalink
Fix for multiple video plugins (#898) (#937)
Browse files Browse the repository at this point in the history
* Fix for multiple video plugins (#898)

* Fix crash on shutdown

* Fix gazebo node destructor
  • Loading branch information
shiveshkhaitan authored and chapulina committed Jul 11, 2019
1 parent 1200972 commit 8d3f2ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gazebo_plugins/src/gazebo_ros_video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ void GazeboRosVideo::Load(

int width = _sdf->Get<int>("width", 320).first;

impl_->video_visual_ = std::make_shared<VideoVisual>(_parent->Name() + "::video_visual",
_parent, height, width);
impl_->video_visual_ = std::make_shared<VideoVisual>(_parent->Name() + "::video_visual::" +
_sdf->Get<std::string>("name"), _parent, height, width);
_parent->GetScene()->AddVisual(impl_->video_visual_);

// Subscribe to the image topic
Expand Down
1 change: 1 addition & 0 deletions gazebo_ros/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ std::mutex Node::lock_;

Node::~Node()
{
executor_->remove_node(get_node_base_interface());
}

Node::SharedPtr Node::Get(sdf::ElementPtr sdf)
Expand Down

0 comments on commit 8d3f2ff

Please sign in to comment.