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

Bumps in garden: use ign-common5, ign-math7 #525

Merged
merged 2 commits into from
Dec 29, 2021
Merged
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
6 changes: 3 additions & 3 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ freeglut3-dev
libfreeimage-dev
libglew-dev
libignition-cmake2-dev
libignition-common4-dev
libignition-math6-dev
libignition-math6-eigen3-dev
libignition-common5-dev
libignition-math7-dev
libignition-math7-eigen3-dev
libignition-plugin-dev
libignition-utils1-dev
libogre-1.9-dev
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ option(USE_UNOFFICIAL_OGRE_VERSIONS "Accept unsupported Ogre versions in the bui

#--------------------------------------
# Find ignition-math
ign_find_package(ignition-math6 REQUIRED COMPONENTS eigen3 VERSION 6.9)
set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR})
ign_find_package(ignition-math7 REQUIRED COMPONENTS eigen3)
set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR})

#--------------------------------------
# Find ignition-common
ign_find_package(ignition-common4 REQUIRED
ign_find_package(ignition-common5 REQUIRED
COMPONENTS graphics events)
set(IGN_COMMON_VER ${ignition-common4_VERSION_MAJOR})
set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR})

#--------------------------------------
# Find ignition-plugin
Expand Down
2 changes: 1 addition & 1 deletion examples/depth_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ignition-rendering-depth-camera)
find_package(ignition-rendering6 REQUIRED)
find_package(ignition-rendering7 REQUIRED)

include_directories(SYSTEM
${PROJECT_BINARY_DIR}
Expand Down
1 change: 0 additions & 1 deletion include/ignition/rendering/LidarVisual.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#define IGNITION_RENDERING_LIDARVISUAL_HH_

#include <vector>
#include <ignition/common/Time.hh>
#include <ignition/math/Color.hh>
#include <ignition/math/Vector3.hh>
#include "ignition/rendering/config.hh"
Expand Down
1 change: 0 additions & 1 deletion include/ignition/rendering/Marker.hh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#ifndef IGNITION_RENDERING_MARKER_HH_
#define IGNITION_RENDERING_MARKER_HH_

#include <ignition/common/Time.hh>
#include <ignition/math/Color.hh>
#include <ignition/math/Vector3.hh>
#include "ignition/rendering/config.hh"
Expand Down
10 changes: 0 additions & 10 deletions include/ignition/rendering/Scene.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#include <ignition/common/Material.hh>
#include <ignition/common/Mesh.hh>
#include <ignition/common/Time.hh>

#include <ignition/math/Color.hh>

Expand Down Expand Up @@ -76,20 +75,11 @@ namespace ignition
/// \return The creating render-engine
public: virtual RenderEngine *Engine() const = 0;

/// \brief Get the last simulation update time
/// \return The last simulation update time
public: virtual common::Time IGN_DEPRECATED(4) SimTime() const = 0;

/// \brief Get the last simulation update time
/// \return The last simulation update time
public: virtual std::chrono::steady_clock::duration
Time() const = 0;

/// \brief Set the last simulation update time
/// \param[in] _time Latest simulation update time
public: virtual void IGN_DEPRECATED(4)
SetSimTime(const common::Time &_time) = 0;

/// \brief Set the last simulation update time
/// \param[in] _time Latest simulation update time
public: virtual void SetTime(
Expand Down
2 changes: 1 addition & 1 deletion include/ignition/rendering/base/BaseCamera.hh
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ namespace ignition
void BaseCamera<T>::Reset()
{
math::Angle fov;
fov.Degree(60);
fov.SetDegree(60);
this->SetImageWidth(1);
this->SetImageHeight(1);
this->SetImageFormat(PF_R8G8B8);
Expand Down
4 changes: 2 additions & 2 deletions include/ignition/rendering/base/BaseJointVisual.hh
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,9 @@ namespace ignition
ignition::math::Quaterniond quat;
// check the parallel case
if (ignition::math::equal(angle, IGN_PI))
quat.Axis(u.Perpendicular(), angle);
quat.SetFromAxisAngle(u.Perpendicular(), angle);
else
quat.Axis((v.Cross(u)).Normalize(), angle);
quat.SetFromAxisAngle((v.Cross(u)).Normalize(), angle);
_arrowVisual->SetLocalRotation(quat);

if (_useParentFrame)
Expand Down
7 changes: 0 additions & 7 deletions include/ignition/rendering/base/BaseScene.hh
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ namespace ignition

public: virtual std::string Name() const override;

public: virtual void IGN_DEPRECATED(4)
SetSimTime(const common::Time &_time) override;

public: virtual common::Time IGN_DEPRECATED(4) SimTime() const override;

public: virtual std::chrono::steady_clock::duration Time()
const override;

Expand Down Expand Up @@ -858,8 +853,6 @@ namespace ignition
protected: std::string name;
IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING

protected: common::Time IGN_DEPRECATED(4) simTime;

protected: std::chrono::steady_clock::duration time =
std::chrono::steady_clock::duration::zero();

Expand Down
4 changes: 2 additions & 2 deletions src/OrbitViewController.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ void OrbitViewController::Orbit(const math::Vector2d &_value)

// rotate around world axis at target point
math::Quaterniond yawQuat;
yawQuat.Axis(math::Vector3d::UnitZ, -dy);
yawQuat.SetFromAxisAngle(math::Vector3d::UnitZ, -dy);
this->dataPtr->camera->SetWorldRotation(
yawQuat * this->dataPtr->camera->WorldRotation());
this->dataPtr->camera->SetWorldPosition(
yawQuat * this->dataPtr->camera->WorldPosition());

math::Quaterniond localPitchQuat;
localPitchQuat.Axis(
localPitchQuat.SetFromAxisAngle(
this->dataPtr->camera->WorldRotation()*math::Vector3d::UnitY, dp);
this->dataPtr->camera->SetWorldRotation(
localPitchQuat * this->dataPtr->camera->WorldRotation());
Expand Down
4 changes: 2 additions & 2 deletions src/OrthoViewController.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,14 @@ void OrthoViewController::Orbit(const math::Vector2d &_value)

// rotate around world axis at target point
math::Quaterniond yawQuat;
yawQuat.Axis(math::Vector3d::UnitZ, -dy);
yawQuat.SetFromAxisAngle(math::Vector3d::UnitZ, -dy);
this->dataPtr->camera->SetWorldRotation(
yawQuat * this->dataPtr->camera->WorldRotation());
this->dataPtr->camera->SetWorldPosition(
yawQuat * this->dataPtr->camera->WorldPosition());

math::Quaterniond localPitchQuat;
localPitchQuat.Axis(
localPitchQuat.SetFromAxisAngle(
this->dataPtr->camera->WorldRotation()*math::Vector3d::UnitY, dp);
this->dataPtr->camera->SetWorldRotation(
localPitchQuat * this->dataPtr->camera->WorldRotation());
Expand Down
4 changes: 2 additions & 2 deletions src/TransformController.cc
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,9 @@ void TransformController::Rotate(const math::Quaterniond &_rotation, bool _snap)
{
math::Vector3d axis;
double angle;
rotation.ToAxis(axis, angle);
rotation.AxisAngle(axis, angle);
angle = rint(angle / (IGN_PI * 0.25)) * (IGN_PI * 0.25);
rotation.Axis(axis, angle);
rotation.SetFromAxisAngle(axis, angle);
}

this->dataPtr->node->SetWorldRotation(rotation);
Expand Down
29 changes: 0 additions & 29 deletions src/base/BaseScene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include <ignition/common/Mesh.hh>
#include <ignition/common/MeshManager.hh>

#include "ignition/common/Time.hh"

#include "ignition/rendering/ArrowVisual.hh"
#include "ignition/rendering/AxisVisual.hh"
#include "ignition/rendering/BoundingBoxCamera.hh"
Expand Down Expand Up @@ -53,11 +51,6 @@
using namespace ignition;
using namespace rendering;

// Prevent deprecation warnings for simTime
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
//////////////////////////////////////////////////
BaseScene::BaseScene(unsigned int _id, const std::string &_name) :
id(_id),
Expand All @@ -73,9 +66,6 @@ BaseScene::BaseScene(unsigned int _id, const std::string &_name) :
BaseScene::~BaseScene()
{
}
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif

//////////////////////////////////////////////////
void BaseScene::Load()
Expand Down Expand Up @@ -145,25 +135,6 @@ void BaseScene::SetTime(const std::chrono::steady_clock::duration &_time)
this->time = _time;
}

//////////////////////////////////////////////////
#ifndef _WIN32
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
common::Time BaseScene::SimTime() const
{
return this->simTime;
}

////////////////////////////////////////////////////
void BaseScene::SetSimTime(const common::Time &_time)
{
this->simTime = _time;
}
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif

//////////////////////////////////////////////////
VisualPtr BaseScene::VisualAt(const CameraPtr &_camera,
const ignition::math::Vector2i &_mousePos)
Expand Down
4 changes: 2 additions & 2 deletions tutorials/02_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ sudo apt install -y \
libxmu-dev \
libxi-dev \
libignition-cmake2-dev \
libignition-math6-dev \
libignition-common4-dev \
libignition-math7-dev \
libignition-common5-dev \
libignition-plugin-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8
```
Expand Down
2 changes: 1 addition & 1 deletion tutorials/23_depth_camera_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ depth camera to a memory reserved in a globally scoped `Image`.

\snippet examples/depth_camera/GlutWindow.cc convert depth to image

The other option is the [ConnectNewRgbPointCloud](https://github.com/ignitionrobotics/ign-rendering/blob/ign-rendering6/include/ignition/rendering/DepthCamera.hh#L58) call that receives colored point cloud data on callback.
The other option is the [ConnectNewRgbPointCloud](https://github.com/ignitionrobotics/ign-rendering/blob/ign-rendering7/include/ignition/rendering/DepthCamera.hh#L58) call that receives colored point cloud data on callback.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this link does not exist yet. I forget what is the preferred approach for branch names in tutorial code links

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a mix right now. It's not too bad to have broken links on main because the tutorials aren't published anywhere yet. I don't have a strong preference, but it would be nice to be consistent across all libraries


The reason for setting the camera image format to `PixelFormat::PF_FLOAT32_RGBA`
is to ensure that when the `Image` is created it reserves a buffer of the
Expand Down