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

Pr-add handeye calibration rviz plugin #4

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0971343
Add .gitignore
RoboticsYY Jun 6, 2020
f673c70
Add moveit_calibration_gui package.xml and CMakeLists.txt files
RoboticsYY Jun 6, 2020
fcaa1e1
Add handeye calibration rviz plugin export files
RoboticsYY Jun 6, 2020
fefb29d
Add handeye calibration rviz panel
RoboticsYY Jun 6, 2020
cdba876
Add handeye calibration target detection widget
RoboticsYY Jun 6, 2020
4b4a11c
Add handeye calibration context configuration widget
RoboticsYY Jun 6, 2020
5ddf1fa
Add handeye calibration control operation widget
RoboticsYY Jun 6, 2020
a7c4736
Enable this repo build with moveit in CI
RoboticsYY Jun 6, 2020
c698077
some suggested changes to GUI text
Jun 8, 2020
bfc5fe2
Merged rviz pr into charuco-board
Jun 10, 2020
4934340
updated gui to work with changing parameters
Jun 13, 2020
55ca5be
not sure--lots of repeats from charuco-board branch
Jun 18, 2020
80c4266
added rviz_visual_tools to CMakeLists and package.xml
Jun 24, 2020
774b4af
saving and loading config works
Jun 26, 2020
3109a10
check for OpenCV 3.(2+)
Jul 2, 2020
3c2fc4c
added default values to target parameters
Jul 2, 2020
127c1de
load default target parameter values in gui
Jul 2, 2020
df1bd19
load target parameter input widgets when panel is created
Jul 2, 2020
9998f36
actual fix to OpenCV version issue
Jul 2, 2020
4a86db6
trigger sensor mount update when loading panel
Jul 6, 2020
2c3a18c
reload saved solver option
Aug 5, 2020
dac9c5e
more comments from Felix
Aug 5, 2020
c256ca6
more comments
Aug 5, 2020
04a95e1
auto calibration interface changes
Aug 10, 2020
124cc07
more descriptive error messages
Aug 10, 2020
8ff0ee7
not sure why this wasn't generating an error
Aug 10, 2020
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
60 changes: 60 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
*~
~$
.swp$
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$

\.pcd$
.pyc$

# 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

*~$

# Emacs
.#*

# VSCode
.vscode

# Vim
*.swp

# Continous Integration
.moveit_ci

*.pyc

#gdb
*.gdb
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required
dist: xenial
services:
- docker
language: generic
language: cpp
cache: ccache
compiler: gcc

Expand All @@ -18,7 +18,8 @@ env:
- ROS_REPO=ros
matrix:
- TEST=catkin_lint
- ROS_DISTRO=melodic
- UPSTREAM_WORKSPACE=https://raw.githubusercontent.com/ros-planning/moveit/master/moveit.rosinstall
TEST_BLACKLIST=moveit_ros_perception

before_script:
- git clone -q --depth=1 https://github.com/ros-planning/moveit_ci.git .moveit_ci
Expand Down
83 changes: 83 additions & 0 deletions moveit_calibration_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
cmake_minimum_required(VERSION 3.1.3)
project(moveit_calibration_gui)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)

if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

find_package(catkin REQUIRED COMPONENTS
class_loader
geometric_shapes
moveit_calibration_plugins
moveit_ros_perception
moveit_ros_planning_interface
moveit_ros_visualization
moveit_visual_tools
image_geometry
pluginlib
rosconsole
roscpp
rviz
rviz_visual_tools
tf2_eigen
)

find_package(Eigen3 REQUIRED)

# Qt Stuff
if(rviz_QT_VERSION VERSION_LESS "5")
find_package(Qt4 ${rviz_QT_VERSION} REQUIRED QtCore QtGui)
include(${QT_USE_FILE})
macro(qt_wrap_ui)
qt4_wrap_ui(${ARGN})
endmacro()
else()
find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
macro(qt_wrap_ui)
qt5_wrap_ui(${ARGN})
endmacro()
endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
add_definitions(-DQT_NO_KEYWORDS)

catkin_package(
LIBRARIES
moveit_handeye_calibration_rviz_plugin_core
INCLUDE_DIRS
handeye_calibration_rviz_plugin/include
CATKIN_DEPENDS
moveit_ros_perception
moveit_ros_planning_interface
moveit_visual_tools
moveit_calibration_plugins
roscpp
rviz
rviz_visual_tools
DEPENDS
EIGEN3
)

include_directories(
handeye_calibration_rviz_plugin/include
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS})

include_directories(SYSTEM
${EIGEN3_INCLUDE_DIRS}
${QT_INCLUDE_DIR})

add_subdirectory(handeye_calibration_rviz_plugin)

install(FILES
handeye_calibration_rviz_plugin_description.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

if (CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
endif()
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
find_package(OpenCV REQUIRED)

set(HEADERS
include/moveit/handeye_calibration_rviz_plugin/handeye_calibration_gui.h
include/moveit/handeye_calibration_rviz_plugin/handeye_target_widget.h
include/moveit/handeye_calibration_rviz_plugin/handeye_context_widget.h
include/moveit/handeye_calibration_rviz_plugin/handeye_control_widget.h
)

#catkin_lint: ignore_once missing_directory
include_directories(${CMAKE_CURRENT_BINARY_DIR})

# Plugin Source
set(SOURCE_FILES
src/handeye_calibration_gui.cpp
src/handeye_target_widget.cpp
src/handeye_context_widget.cpp
src/handeye_control_widget.cpp
)

set(MOVEIT_LIB_NAME moveit_handeye_calibration_rviz_plugin)
add_library(${MOVEIT_LIB_NAME}_core ${SOURCE_FILES} ${HEADERS})
set_target_properties(${MOVEIT_LIB_NAME}_core PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
target_link_libraries(${MOVEIT_LIB_NAME}_core
${catkin_LIBRARIES} ${OpenCV_LIBS} ${rviz_DEFAULT_PLUGIN_LIBRARIES} ${OGRE_LIBRARIES} ${QT_LIBRARIES} ${Boost_LIBRARIES})

add_library(${MOVEIT_LIB_NAME} src/plugin_init.cpp)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
target_link_libraries(${MOVEIT_LIB_NAME} ${MOVEIT_LIB_NAME}_core ${catkin_LIBRARIES} ${Boost_LIBRARIES})

install(DIRECTORY include/ DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION})

install(TARGETS ${MOVEIT_LIB_NAME} ${MOVEIT_LIB_NAME}_core
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2019, Intel Corporation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Willow Garage nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*********************************************************************/

/* Author: Yu Yan */

#ifndef MOVEIT_HANDEYE_CALIBRATION_RVIZ_PLUGIN_HANDEYE_CALIBRATION_GUI_
#define MOVEIT_HANDEYE_CALIBRATION_RVIZ_PLUGIN_HANDEYE_CALIBRATION_GUI_

// qt

// ros
#include <rviz_visual_tools/tf_visual_tools.h>

// local
#include <moveit/handeye_calibration_rviz_plugin/handeye_target_widget.h>
#include <moveit/handeye_calibration_rviz_plugin/handeye_context_widget.h>
#include <moveit/handeye_calibration_rviz_plugin/handeye_control_widget.h>

#ifndef Q_MOC_RUN
#include <ros/ros.h>
#include <rviz/panel.h>
#endif

namespace moveit_rviz_plugin
{
class HandEyeCalibrationGui : public rviz::Panel
{
Q_OBJECT
public:
explicit HandEyeCalibrationGui(QWidget* parent = 0);
~HandEyeCalibrationGui() override;

virtual void load(const rviz::Config& config);
virtual void save(rviz::Config config) const;

private:
// ******************************************************************************************
// Qt Components
// ******************************************************************************************

TargetTabWidget* tab_target_;
ContextTabWidget* tab_context_;
ControlTabWidget* tab_control_;

// ******************************************************************************************
// Ros Components
// ******************************************************************************************

rviz_visual_tools::TFVisualToolsPtr tf_tools_;
};

} // namedist moveit_rviz_plugin

#endif
Loading