Merge pull request #42 from k-okada/noetic

support GAZEBO_MAJOUR_VERSION >= 10 (noetic)
This commit is contained in:
TrivasZhang 2022-08-30 20:00:22 +08:00 committed by GitHub
commit 92a36c7cf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -44,8 +44,16 @@ namespace gazebo
}
this->line = this->visual->CreateDynamicLine(rendering::RENDERING_LINE_STRIP);
#if GAZEBO_MAJOR_VERSION >= 10
// https://github.com/osrf/gazebo/blob/gazebo11/Migration.md#gazebo-8x-to-9x
// gazebo 9 deprecations removed on gazebo 10
// https://github.com/osrf/gazebo/commit/0bd72b9500e7377c873e32d25b8db772e782bd6f
this->line->AddPoint(ignition::math::Vector3d(0, 0, 0), ignition::math::Color(0, 1, 0, 1.0));
this->line->AddPoint(ignition::math::Vector3d(1, 1, 1), ignition::math::Color(0, 1, 0, 1.0));
#else
this->line->AddPoint(ignition::math::Vector3d(0, 0, 0), common::Color(0, 1, 0, 1.0));
this->line->AddPoint(ignition::math::Vector3d(1, 1, 1), common::Color(0, 1, 0, 1.0));
#endif
this->line->setMaterial("Gazebo/Purple");
this->line->setVisibilityFlags(GZ_VISIBILITY_GUI);
this->visual->SetVisible(true);