Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complied success in ros noetic gazebo 11 #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/

1 change: 0 additions & 1 deletion .hgignore

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ endif (NOT CMAKE_BUILD_TYPE)

find_package (Qt5Widgets REQUIRED)
find_package (Qt5Core REQUIRED)
find_package(gazebo 9 REQUIRED)
find_package(gazebo 11 REQUIRED)

include(GNUInstallDirs)

Expand Down
11 changes: 6 additions & 5 deletions plugins/TrafficLightsGUIPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <gazebo/msgs/msgs.hh>
#include <gazebo/rendering/UserCamera.hh>
#include <gazebo/gui/KeyEventHandler.hh>

#include <ignition/math/Vector3.hh>
#include "TrafficLightsGUIPlugin.hh"

using namespace gazebo;
Expand Down Expand Up @@ -77,10 +77,10 @@ void TrafficLightsGUIPlugin::Load(sdf::ElementPtr _sdf)
void TrafficLightsGUIPlugin::OnKeyPress(ConstAnyPtr &_msg)
{
// Colors
auto red = std::make_pair(gazebo::common::Color::Red, "red");
auto yellow = std::make_pair(gazebo::common::Color::Yellow, "yellow");
auto green = std::make_pair(gazebo::common::Color::Green, "green");
auto black = gazebo::common::Color::Black;
auto red = std::make_pair(ignition::math::Color(1, 0, 0), "red");
auto yellow = std::make_pair(ignition::math::Color(1, 1, 0), "yellow");
auto green = std::make_pair(ignition::math::Color(0, 1, 0), "green");
auto black = ignition::math::Color(0, 0, 0);

for (auto key : this->keys)
{
Expand All @@ -100,6 +100,7 @@ void TrafficLightsGUIPlugin::OnKeyPress(ConstAnyPtr &_msg)
msg.set_name(model + "::" + l + "::link::" + c.second);

auto matMsg = msg.mutable_material();

if (c.second == color)
{
gazebo::msgs::Set(matMsg->mutable_emissive(), c.first);
Expand Down