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

Compile in Ubuntu 22.04, 24.04 & C++17 #270

Draft
wants to merge 4 commits into
base: devel
Choose a base branch
from
Draft
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: 1 addition & 1 deletion fuse_optimizers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ catkin_package(
###########
## Build ##
###########
add_compile_options(-Wall -Werror)
add_compile_options(-Wall) # -Werror)
Copy link
Author

Choose a reason for hiding this comment

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

I haven't tried restoring Werror here since rebasing these commits on latest, maybe it's not needed now?


## fuse_optimizers library
add_library(${PROJECT_NAME}
Expand Down
3 changes: 2 additions & 1 deletion fuse_viz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ add_definitions(-DQT_NO_KEYWORDS)
###########
## Build ##
###########
add_compile_options(-Wall -Werror)
# add_compile_options(-Wall -Werror)
add_compile_options(-Wall)

catkin_package(
INCLUDE_DIRS include
Expand Down
2 changes: 1 addition & 1 deletion fuse_viz/include/fuse_viz/conversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#include <OgreColourValue.h>
#include <OgreQuaternion.h>
#include <OgreVector3.h>
#include <Ogre.h>

#include <boost/array.hpp>

Expand Down
2 changes: 1 addition & 1 deletion fuse_viz/include/fuse_viz/mapped_covariance_visual.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <Eigen/Dense>

#include <OgreColourValue.h>
#include <OgreVector3.h>
#include <Ogre.h>

namespace Ogre
{
Expand Down
2 changes: 1 addition & 1 deletion fuse_viz/include/fuse_viz/pose_2d_stamped_visual.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

#include <tf2/LinearMath/Transform.h>

#include <OgreVector3.h>
#include <Ogre.h>

#include <memory>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <rviz/ogre_helpers/object.h>

#include <OgreColourValue.h>
#include <OgreVector3.h>
#include <Ogre.h>

#include <memory>
#include <string>
Expand Down
7 changes: 7 additions & 0 deletions fuse_viz/src/relative_pose_2d_stamped_constraint_visual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include <tf2/utils.h>
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>

#include <OgrePrerequisites.h>
#include <OgreQuaternion.h>
#include <OgreSceneManager.h>
#include <OgreSceneNode.h>
Expand Down Expand Up @@ -343,7 +344,13 @@ Ogre::ColourValue RelativePose2DStampedConstraintVisual::computeLossErrorLineCol
// Get the error line color as HSB:
Ogre::ColourValue error_line_color(color.r, color.g, color.b);
Ogre::Real hue, saturation, brightness;
#if (OGRE_VERSION < ((1 << 16) | (11 << 8) | 0))
lucasw marked this conversation as resolved.
Show resolved Hide resolved
// 1.10 or earlier
error_line_color.getHSB(&hue, &saturation, &brightness);
# else
// 1.11 or later
error_line_color.getHSB(hue, saturation, brightness);
#endif

// We should correct the color brightness if it is smaller than minimum brightness. Otherwise, we would get an
// incorrect loss brightness.
Expand Down