Skip to content

Commit

Permalink
Fixed collision bug
Browse files Browse the repository at this point in the history
Signed-off-by: ahcorde <[email protected]>
  • Loading branch information
ahcorde committed Aug 25, 2021
1 parent 2faef96 commit 72cba8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,11 @@ void VisualizationCapabilitiesPrivate::OnRender()
this->entityCollisions[colEntity],
parentCollisionVisual);

if (vis == nullptr)
{
continue;
}

this->viewingCollisions[colEntity] = true;

// add geometry material to originalEmissive map
Expand Down Expand Up @@ -1002,8 +1007,6 @@ rendering::VisualPtr VisualizationCapabilitiesPrivate::CreateVisual(

if (this->visuals.find(_id) != this->visuals.end())
{
ignerr << "Entity with Id: [" << _id << "] already exists in the scene"
<< std::endl;
return rendering::VisualPtr();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Open Source Robotics Foundation
* Copyright (C) 2021 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,8 +28,8 @@ namespace gazebo
{
class VisualizationCapabilitiesPrivate;

/// \brief Provides buttons for adding a box, sphere, or cylinder
/// to the scene
/// \brief Allows to visualize transparent, collisions, inertial,
/// CoM and more.
class VisualizationCapabilities : public ignition::gazebo::GuiSystem
{
Q_OBJECT
Expand Down

0 comments on commit 72cba8f

Please sign in to comment.