Skip to content

Commit

Permalink
Shorter file names, improved CMakeLists, remove entries in gitignore,…
Browse files Browse the repository at this point in the history
… update instructions for rosdoc-lite
  • Loading branch information
VictorLamoine committed Feb 14, 2019
1 parent dfdc4a8 commit ca63628
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 108 deletions.
50 changes: 1 addition & 49 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,50 +1,2 @@
build/
bin/
lib/
msg_gen/
srv_gen/
msg/*Action.msg
msg/*ActionFeedback.msg
msg/*ActionGoal.msg
msg/*ActionResult.msg
msg/*Feedback.msg
msg/*Goal.msg
msg/*Result.msg
msg/_*.py

# Generated by dynamic reconfigure
*.cfgc
/cfg/cpp/
/cfg/*.py

# Ignore generated docs
*.dox
*.wikidoc

# eclipse stuff
.project
.cproject

# qcreator stuff
CMakeLists.txt.user

srv/_*.py
*.pcd
*.pyc
qtcreator-*
*.user

/planning/cfg
/planning/docs
/planning/src

*~

# Emacs
.#*

# Catkin custom files
CATKIN_IGNORE

# Output meshes
bezier_library/meshes/*.stl
meshes/*.stl
31 changes: 20 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.2)
project(bezier)
add_definitions(-std=c++11 -Wall -Wextra)
add_compile_options(-Wall -Wextra)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
Expand All @@ -26,7 +28,6 @@ endif()
catkin_package(
INCLUDE_DIRS
include
${PCL_INCLUDE_DIRS}
LIBRARIES
${PROJECT_NAME}
${PROJECT_NAME}_painting
Expand Down Expand Up @@ -54,7 +55,7 @@ add_definitions(${PCL_DEFINITIONS})
# Bezier library
add_library(
${PROJECT_NAME}
src/${PROJECT_NAME}.cpp
src/${PROJECT_NAME}_library.cpp
)
target_link_libraries(
${PROJECT_NAME}
Expand All @@ -70,7 +71,7 @@ add_dependencies(
# Bezier surfacing
add_library(
${PROJECT_NAME}_surfacing
src/bezier_surfacing.cpp
src/surfacing.cpp
)
target_link_libraries(
${PROJECT_NAME}_surfacing
Expand All @@ -88,7 +89,7 @@ add_dependencies(
# Bezier painting
add_library(
${PROJECT_NAME}_painting
src/bezier_painting.cpp
src/painting.cpp
)
target_link_libraries(
${PROJECT_NAME}_painting
Expand All @@ -106,7 +107,7 @@ add_dependencies(
# Tire machining
add_library(
${PROJECT_NAME}_tire_machining
src/bezier_tire_machining.cpp
src/tire_machining.cpp
)
target_link_libraries(
${PROJECT_NAME}_tire_machining
Expand Down Expand Up @@ -137,14 +138,22 @@ install(TARGETS
)

## Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
install(
DIRECTORY
include/${PROJECT_NAME}/
DESTINATION
${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)

## Mark other files for installation (e.g. launch and bag files, etc.)
install(DIRECTORY meshes DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(
DIRECTORY
meshes
DESTINATION
${CATKIN_PACKAGE_SHARE_DESTINATION}
)

add_custom_target(
${PROJECT_NAME}_doc
rosdoc_lite -o ${CATKIN_DEVEL_PREFIX}/doc/${PROJECT_NAME} ${CATKIN_DEVEL_PREFIX}/../src/bezier/${PROJECT_NAME}
rosdoc_lite -o ${CATKIN_DEVEL_PREFIX}/doc/${PROJECT_NAME} ${CATKIN_DEVEL_PREFIX}/../src/${PROJECT_NAME}
)
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,28 @@ It is able to create rectilinear trajectories on complex surfaces (3D surfaces)
Click the image to see a video of a Fanuc robot grinding thanks to the Bezier library.

# Dependencies
This package has been tested with Ubuntu 16.04 and ROS Kinetic.
This package has been tested with Ubuntu 18.04 and ROS Melodic.

## VTK 7.1
## VTK
VTK 7.1 or higher is required in order to compile this project.

Here are quick steps to download, compile and install VTK 7.1:
Here are quick steps to download, compile and install VTK latest release:

```bash
mkdir -p $HOME/libraries/VTK-7.1/build_release
cd $HOME/libraries/VTK-7.1/
wget http://www.vtk.org/files/release/7.1/VTK-7.1.1.zip
unzip VTK-7.1.1.zip
mv VTK-7.1.1 src
sudo apt install -y cmake libglew-dev libxt-dev libqt5x11extras5-dev qttools5-dev
mkdir -p $HOME/libraries/VTK-8.2.0/build_release
cd $HOME/libraries/VTK-8.2.0
wget http://www.vtk.org/files/release/8.2/VTK-8.2.0.zip
unzip VTK-8.2.0.zip
mv VTK-8.2.0 src
cd build_release
cmake ../src -DCMAKE_BUILD_TYPE=Release
cmake ../src \
-DCMAKE_BUILD_TYPE=Release \
-DVTK_Group_Imaging=ON \
-DVTK_Group_Qt=ON \
-DVTK_QT_VERSION=5 \
-DVTK_Group_Rendering=ON \
-DVTK_Group_Views=ON
make -j4
```

Expand All @@ -42,26 +49,23 @@ sudo make -j4 install
sudo ldconfig
```

## wstool
Install [wstool](wiki.ros.org/wstool).

## rosdep
Install, initialize and update [rosdep](http://wiki.ros.org/rosdep).

# Compiling
Create a catkin workspace and clone the project:

```bash
mkdir -p catkin_workspace
cd catkin_workspace
mkdir -p catkin_workspace/src
cd catkin_workspace/src
git clone https://github.com/ros-industrial-consortium/bezier.git
wstool init src bezier/bezier.rosinstall
mv bezier src
cd ..

```

## Resolve ROS dependencies
```bash
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y
rosdep install --from-paths src --ignore-src --rosdistro melodic -y
```

## Compile
Expand Down
4 changes: 0 additions & 4 deletions bezier.rosinstall

This file was deleted.

17 changes: 10 additions & 7 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
How to build the API documentation
===
# How to build the API documentation

Install rosdoc_lite:
```
sudo apt install ros-$ROS_DISTRO-rosdoc-lite
```

Generate the API documentation:
```bash
cd $(catkin_workspace)/build
make bezier_library_doc
catkin_make bezier_doc
```
List of classes inside Bezier
===

# Documented classes of Bezier
- [bezier_grinding_surfacing](README_bezier_grinding_surfacing.md)

4 changes: 2 additions & 2 deletions doc/rosdoc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- builder: doxygen
name: bezier_library C++ API
output_dir: bezier_library_c++
name: bezier C++ API
output_dir: bezier_c++
file_patterns: '*.c *.cpp *.h *.hpp'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef APPEND_BEZIER_EXCEPTION
#define APPEND_BEZIER_EXCEPTION
#ifndef APPEND_BEZIER_EXCEPTION_HPP
#define APPEND_BEZIER_EXCEPTION_HPP

#include <iostream>
#include <exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <vtkPointData.h>
#include <vtkPolyDataConnectivityFilter.h>
#include <vtkAppendPolyData.h>
#include "error_observer.h"
#include <bezier/error_observer.hpp>

// PCL
#pragma GCC diagnostic push
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef ErrorObserver_h
#define ErrorObserver_h
#ifndef ERROR_OBSERVER_HPP
#define ERROR_OBSERVER_HPP

#include <string>
#include <vtkCommand.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef BEZIER_GRINDING_SURFACING_HPP
#define BEZIER_GRINDING_SURFACING_HPP

#include <bezier_library/bezier_library.hpp>
#include <bezier_library/bezier_params_observer.hpp>
#include <bezier/bezier_library.hpp>
#include <bezier/params_observer.hpp>
#include <ros/package.h>
#include <memory>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef BEZIER_PAINTING_HPP
#define BEZIER_PAINTING_HPP

#include <bezier_library/bezier_library.hpp>
#include <bezier/bezier_library.hpp>
#include <ros/package.h>
#include <memory>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef BEZIER_PARAMS_OBSERVER_HPP
#define BEZIER_PARAMS_OBSERVER_HPP

#include <bezier_library/bezier_library.hpp>
#include <bezier/bezier_library.hpp>

/**
* Bezier parameters observer class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef BEZIER_TIRE_MACHINING_HPP
#define BEZIER_TIRE_MACHINING_HPP

#include <bezier_library/bezier_library.hpp>
#include <bezier/bezier_library.hpp>
#include <ros/package.h>
#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>bezier</name>
<version>0.0.3</version>
<description>Robot path planner for complex 6 DOF surfacing trajectories</description>
<author>Francois Lasson, Kévin Bolloré, Papa Libasse Sow - Institut Maupertuis</author>
<author>Francois Lasson, Kévin Bolloré, Papa Libasse Sow, Victor Lamoine - Institut Maupertuis</author>
<maintainer email="[email protected]">Victor Lamoine</maintainer>
<license>BSD</license>

Expand Down
2 changes: 1 addition & 1 deletion src/bezier_library.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <bezier_library/bezier_library.hpp>
#include <bezier/bezier_library.hpp>

Bezier::Bezier()
{
Expand Down
2 changes: 1 addition & 1 deletion src/bezier_painting.cpp → src/painting.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "bezier_library/bezier_painting.hpp"
#include "bezier/painting.hpp"

BezierPainting::BezierPainting(const std::string input_mesh,
const double painting_cone_width,
Expand Down
8 changes: 4 additions & 4 deletions src/bezier_surfacing.cpp → src/surfacing.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "bezier_library/bezier_grinding_surfacing.hpp"
#include "bezier_library/bezier_params_observer.hpp"
#include "bezier/grinding_surfacing.hpp"
#include "bezier/params_observer.hpp"

BezierGrindingSurfacing::BezierGrindingSurfacing(const std::string input_mesh,
const double grinding_disk_machining_width,
Expand Down Expand Up @@ -93,7 +93,7 @@ std::string BezierGrindingSurfacing::generateTrajectory(EigenSTL::vector_Isometr

if (display_markers)
{
std::string mesh_path(ros::package::getPath("bezier_library") + "/meshes/dilated_mesh.stl");
std::string mesh_path(ros::package::getPath("bezier") + "/meshes/dilated_mesh.stl");

if (saveMesh(mesh_path, dilated_mesh))
{
Expand All @@ -107,7 +107,7 @@ std::string BezierGrindingSurfacing::generateTrajectory(EigenSTL::vector_Isometr

if (display_markers)
{
std::string mesh_path(ros::package::getPath("bezier_library") + "/meshes/extrication_mesh.stl");
std::string mesh_path(ros::package::getPath("bezier") + "/meshes/extrication_mesh.stl");

if (saveMesh(mesh_path, extrication_mesh))
{
Expand Down
2 changes: 1 addition & 1 deletion src/bezier_tire_machining.cpp → src/tire_machining.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "bezier_library/bezier_tire_machining.hpp"
#include "bezier/tire_machining.hpp"
#include <vtkCleanPolyData.h>
#include <vtkWarpVector.h>

Expand Down

0 comments on commit ca63628

Please sign in to comment.