Skip to content

Remove extension test #668

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

Open
wants to merge 12 commits 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
28 changes: 22 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,36 @@ notifications:
on_failure: always
jobs:
include:
- stage: build-shadow-fixed
- stage: build
env: ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
arch: amd64
- env: ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
arch: arm64
- env: ROS_DISTRO="melodic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
- stage: build-released
env: ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
arch: amd64
- env: ROS_DISTRO="melodic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros-shadow-fixed/ubuntu
arch: arm64
- env: ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
arch: amd64
- env: ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
arch: arm64
- env: ROS_DISTRO="melodic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
arch: amd64
- env: ROS_DISTRO="melodic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
- stage: lint
arch: arm64
- env: JOB="catkin_lint"
sudo: false
install: pip install --user -q catkin-lint
script: catkin_lint -W2 --explain .
env: JOB="catkin_lint"
allow_failures:
- env: ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
arch: amd64
- env: ROS_DISTRO="kinetic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
arch: arm64
- env: ROS_DISTRO="melodic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
arch: amd64
- env: ROS_DISTRO="melodic" ROS_REPOSITORY_PATH=http://packages.ros.org/ros/ubuntu
arch: arm64
- env: JOB="catkin_lint"
matrix:
allow_failures:
Expand All @@ -31,4 +47,4 @@ install:
- git clone https://github.com/ros-industrial/industrial_ci.git .ci_config
script:
- source .ci_config/travis.sh
# - source ./travis.sh # Enable this when you have a package-local script

9 changes: 9 additions & 0 deletions mapviz/include/mapviz/map_canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,18 @@

#include <mapviz/mapviz_plugin.h>

#ifdef __aarch64__
#include <QGLFunctions>
#include <GL/gl.h>
#endif

namespace mapviz
{
#ifdef __aarch64__
class MapCanvas : public QGLWidget, protected QGLFunctions
#else
class MapCanvas : public QGLWidget
#endif
{
Q_OBJECT

Expand Down
4 changes: 4 additions & 0 deletions mapviz/include/mapviz/mapviz_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@

#include "stopwatch.h"

#ifdef __aarch64__
#include <GL/gl.h>
#endif

namespace mapviz
{
class MapvizPlugin : public QObject
Expand Down
13 changes: 12 additions & 1 deletion mapviz/src/map_canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
//
// *****************************************************************************


#ifndef __aarch64__
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glu.h>
#endif

#include <mapviz/map_canvas.h>

Expand Down Expand Up @@ -94,10 +95,12 @@ MapCanvas::MapCanvas(QWidget* parent) :

MapCanvas::~MapCanvas()
{
#ifndef __aarch64__
if(pixel_buffer_size_ != 0)
{
glDeleteBuffersARB(2, pixel_buffer_ids_);
}
#endif
}

void MapCanvas::InitializeTf(boost::shared_ptr<tf::TransformListener> tf)
Expand All @@ -107,6 +110,7 @@ void MapCanvas::InitializeTf(boost::shared_ptr<tf::TransformListener> tf)

void MapCanvas::InitializePixelBuffers()
{
#ifndef __aarch64__
if(has_pixel_buffers_)
{
int32_t buffer_size = width() * height() * 4;
Expand All @@ -128,10 +132,12 @@ void MapCanvas::InitializePixelBuffers()
pixel_buffer_size_ = buffer_size;
}
}
#endif
}

void MapCanvas::initializeGL()
{
#ifndef __aarch64__
GLenum err = glewInit();
if (GLEW_OK != err)
{
Expand All @@ -143,6 +149,9 @@ void MapCanvas::initializeGL()
std::string extensions = (const char*)glGetString(GL_EXTENSIONS);
has_pixel_buffers_ = extensions.find("GL_ARB_pixel_buffer_object") != std::string::npos;
}
#else
has_pixel_buffers_ = false;
#endif

glClearColor(0.58f, 0.56f, 0.5f, 1);
if (enable_antialiasing_)
Expand Down Expand Up @@ -185,6 +194,7 @@ void MapCanvas::CaptureFrame(bool force)
// Ensure the pixel size is actually 4
glPixelStorei(GL_PACK_ALIGNMENT, 4);

#ifndef __aarch64__
if (has_pixel_buffers_ && !force)
{
InitializePixelBuffers();
Expand All @@ -207,6 +217,7 @@ void MapCanvas::CaptureFrame(bool force)
glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0);
}
else
#endif
{
int32_t buffer_size = width() * height() * 4;
capture_buffer_.clear();
Expand Down
3 changes: 2 additions & 1 deletion mapviz_plugins/include/mapviz_plugins/pointcloud2_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <mapviz/mapviz_plugin.h>

// QT libraries
#include <QGLFunctions>
#include <QGLWidget>
#include <QColor>
#include <QMutex>
Expand All @@ -51,7 +52,7 @@

namespace mapviz_plugins
{
class PointCloud2Plugin : public mapviz::MapvizPlugin
class PointCloud2Plugin : public mapviz::MapvizPlugin, protected QGLFunctions
{
Q_OBJECT

Expand Down
2 changes: 0 additions & 2 deletions mapviz_plugins/src/occupancy_grid_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
//
// *****************************************************************************

#include <GL/glew.h>

#include <mapviz_plugins/occupancy_grid_plugin.h>
#include <GL/glut.h>

Expand Down
1 change: 0 additions & 1 deletion mapviz_plugins/src/pointcloud2_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
//
// *****************************************************************************

#include <GL/glew.h>
#include <mapviz_plugins/pointcloud2_plugin.h>

// C++ standard libraries
Expand Down
1 change: 1 addition & 0 deletions multires_image/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${Qt_LIBRARIES}
${OPENGL_gl_LIBRARY}
${GLU_LIBRARY}
)

Expand Down
2 changes: 2 additions & 0 deletions multires_image/src/QGLMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

#include <multires_image/QGLMap.h>

#include <GL/gl.h>

// C++ standard libraries
#include <cmath>

Expand Down
2 changes: 2 additions & 0 deletions multires_image/src/multires_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include <cmath>
#include <iostream>

#include <GL/gl.h>

#include <ros/ros.h>
#include <swri_transform_util/transform_util.h>

Expand Down
1 change: 1 addition & 0 deletions multires_image/src/tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <iostream>

// QT libraries
#include <GL/gl.h>
#include <QGLWidget>
#include <QFile>

Expand Down
2 changes: 2 additions & 0 deletions multires_image/src/tile_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

#include <multires_image/tile_view.h>

#include <GL/gl.h>

// C++ standard libraries
#include <cmath>
#include <iostream>
Expand Down
4 changes: 3 additions & 1 deletion tile_map/include/tile_map/tile_map_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@

#include <swri_transform_util/transform.h>

#include <QGLFunctions>

namespace tile_map
{
class TileSource;
Expand All @@ -58,7 +60,7 @@ namespace tile_map
std::vector<tf::Vector3> points_t;
};

class TileMapView
class TileMapView: protected QGLFunctions
{
public:
TileMapView();
Expand Down
8 changes: 2 additions & 6 deletions tile_map/src/texture_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,9 @@

#include <boost/make_shared.hpp>

#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glu.h>

#include <ros/ros.h>

#include <QGLFunctions>
#include <QGLWidget>
#include <QImage>

Expand Down Expand Up @@ -109,8 +106,7 @@ namespace tile_map
ROS_ERROR("FAILED TO CREATE TEXTURE");

GLenum err = glGetError();
const GLubyte *errString = gluErrorString(err);
ROS_ERROR("GL ERROR(%u): %s", err, errString);
ROS_ERROR("GL ERROR(%u)", err);
return texture;
}

Expand Down
2 changes: 0 additions & 2 deletions tile_map/src/tile_map_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@

#include <boost/make_shared.hpp>

#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glu.h>

#include <ros/ros.h>

Expand Down