Skip to content

Commit 4e3196c

Browse files
authored
Merge pull request ros-industrial-attic#165 from christian-rauch/rviz
RViz plugin
2 parents 302c5c6 + c7fed1a commit 4e3196c

File tree

6 files changed

+930
-0
lines changed

6 files changed

+930
-0
lines changed

robotiq_3f_rviz/CMakeLists.txt

+218
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(robotiq_3f_rviz)
3+
4+
## Compile as C++11, supported in ROS Kinetic and newer
5+
add_compile_options(-std=c++11)
6+
7+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
8+
set(CMAKE_AUTOMOC ON)
9+
set(CMAKE_AUTOUIC ON)
10+
11+
## Find catkin macros and libraries
12+
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
13+
## is used, also find other catkin packages
14+
find_package(catkin REQUIRED COMPONENTS
15+
robotiq_3f_gripper_control
16+
rviz
17+
)
18+
19+
## System dependencies are found with CMake's conventions
20+
# find_package(Boost REQUIRED COMPONENTS system)
21+
22+
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
23+
24+
## Uncomment this if the package has a setup.py. This macro ensures
25+
## modules and global scripts declared therein get installed
26+
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
27+
# catkin_python_setup()
28+
29+
################################################
30+
## Declare ROS messages, services and actions ##
31+
################################################
32+
33+
## To declare and build messages, services or actions from within this
34+
## package, follow these steps:
35+
## * Let MSG_DEP_SET be the set of packages whose message types you use in
36+
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
37+
## * In the file package.xml:
38+
## * add a build_depend tag for "message_generation"
39+
## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
40+
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
41+
## but can be declared for certainty nonetheless:
42+
## * add a exec_depend tag for "message_runtime"
43+
## * In this file (CMakeLists.txt):
44+
## * add "message_generation" and every package in MSG_DEP_SET to
45+
## find_package(catkin REQUIRED COMPONENTS ...)
46+
## * add "message_runtime" and every package in MSG_DEP_SET to
47+
## catkin_package(CATKIN_DEPENDS ...)
48+
## * uncomment the add_*_files sections below as needed
49+
## and list every .msg/.srv/.action file to be processed
50+
## * uncomment the generate_messages entry below
51+
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
52+
53+
## Generate messages in the 'msg' folder
54+
# add_message_files(
55+
# FILES
56+
# Message1.msg
57+
# Message2.msg
58+
# )
59+
60+
## Generate services in the 'srv' folder
61+
# add_service_files(
62+
# FILES
63+
# Service1.srv
64+
# Service2.srv
65+
# )
66+
67+
## Generate actions in the 'action' folder
68+
# add_action_files(
69+
# FILES
70+
# Action1.action
71+
# Action2.action
72+
# )
73+
74+
## Generate added messages and services with any dependencies listed here
75+
# generate_messages(
76+
# DEPENDENCIES
77+
# robotiq_s_model_articulated_msgs
78+
# )
79+
80+
################################################
81+
## Declare ROS dynamic reconfigure parameters ##
82+
################################################
83+
84+
## To declare and build dynamic reconfigure parameters within this
85+
## package, follow these steps:
86+
## * In the file package.xml:
87+
## * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
88+
## * In this file (CMakeLists.txt):
89+
## * add "dynamic_reconfigure" to
90+
## find_package(catkin REQUIRED COMPONENTS ...)
91+
## * uncomment the "generate_dynamic_reconfigure_options" section below
92+
## and list every .cfg file to be processed
93+
94+
## Generate dynamic reconfigure parameters in the 'cfg' folder
95+
# generate_dynamic_reconfigure_options(
96+
# cfg/DynReconf1.cfg
97+
# cfg/DynReconf2.cfg
98+
# )
99+
100+
###################################
101+
## catkin specific configuration ##
102+
###################################
103+
## The catkin_package macro generates cmake config files for your package
104+
## Declare things to be passed to dependent projects
105+
## INCLUDE_DIRS: uncomment this if your package contains header files
106+
## LIBRARIES: libraries you create in this project that dependent projects also need
107+
## CATKIN_DEPENDS: catkin_packages dependent projects also need
108+
## DEPENDS: system dependencies of this project that dependent projects also need
109+
catkin_package(
110+
# INCLUDE_DIRS include
111+
# LIBRARIES robotiq_3f_rviz
112+
# CATKIN_DEPENDS robotiq_s_model_articulated_msgs rviz
113+
# DEPENDS system_lib
114+
)
115+
116+
###########
117+
## Build ##
118+
###########
119+
120+
## Specify additional locations of header files
121+
## Your package locations should be listed before other locations
122+
include_directories(
123+
# include
124+
${catkin_INCLUDE_DIRS}
125+
)
126+
127+
## Declare a C++ library
128+
# add_library(${PROJECT_NAME}
129+
# src/${PROJECT_NAME}/robotiq_3f_rviz.cpp
130+
# )
131+
add_library(${PROJECT_NAME} src/robotiq_3f_rviz.cpp)
132+
133+
## Add cmake target dependencies of the library
134+
## as an example, code may need to be generated before libraries
135+
## either from message generation or dynamic reconfigure
136+
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
137+
138+
## Declare a C++ executable
139+
## With catkin_make all packages are built within a single CMake context
140+
## The recommended prefix ensures that target names across packages don't collide
141+
# add_executable(${PROJECT_NAME}_node src/robotiq_3f_rviz_node.cpp)
142+
143+
## Rename C++ executable without prefix
144+
## The above recommended prefix causes long target names, the following renames the
145+
## target back to the shorter version for ease of user use
146+
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
147+
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
148+
149+
## Add cmake target dependencies of the executable
150+
## same as for the library above
151+
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
152+
153+
## Specify libraries to link a library or executable target against
154+
# target_link_libraries(${PROJECT_NAME}_node
155+
# ${catkin_LIBRARIES}
156+
# )
157+
target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} Qt5::Widgets)
158+
159+
#############
160+
## Install ##
161+
#############
162+
163+
# all install targets should use catkin DESTINATION variables
164+
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
165+
166+
## Mark executable scripts (Python etc.) for installation
167+
## in contrast to setup.py, you can choose the destination
168+
# install(PROGRAMS
169+
# scripts/my_python_script
170+
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
171+
# )
172+
173+
## Mark executables and/or libraries for installation
174+
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node
175+
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
176+
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
177+
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
178+
# )
179+
180+
## Mark cpp header files for installation
181+
# install(DIRECTORY include/${PROJECT_NAME}/
182+
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
183+
# FILES_MATCHING PATTERN "*.h"
184+
# PATTERN ".svn" EXCLUDE
185+
# )
186+
187+
## Mark other files for installation (e.g. launch and bag files, etc.)
188+
# install(FILES
189+
# # myfile1
190+
# # myfile2
191+
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
192+
# )
193+
194+
install(TARGETS ${PROJECT_NAME}
195+
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
196+
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
197+
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
198+
)
199+
200+
install(FILES
201+
plugin_description.xml
202+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
203+
204+
install(DIRECTORY icons/
205+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/icons)
206+
207+
#############
208+
## Testing ##
209+
#############
210+
211+
## Add gtest based cpp test target and link libraries
212+
# catkin_add_gtest(${PROJECT_NAME}-test test/test_robotiq_3f_rviz.cpp)
213+
# if(TARGET ${PROJECT_NAME}-test)
214+
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
215+
# endif()
216+
217+
## Add folders to be run by python nosetests
218+
# catkin_add_nosetests(test)
Loading

robotiq_3f_rviz/package.xml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0"?>
2+
<package format="2">
3+
<name>robotiq_3f_rviz</name>
4+
<version>1.0.0</version>
5+
<description>RViz plugin for Robotiq 3-Finger Adaptive Robot Gripper</description>
6+
7+
<!-- One maintainer tag required, multiple allowed, one person per tag -->
8+
<!-- Example: -->
9+
<!-- <maintainer email="[email protected]">Jane Doe</maintainer> -->
10+
<maintainer email="[email protected]">Christian Rauch</maintainer>
11+
12+
13+
<!-- One license tag required, multiple allowed, one license per tag -->
14+
<!-- Commonly used license strings: -->
15+
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
16+
<license>MIT</license>
17+
18+
19+
<!-- Url tags are optional, but multiple are allowed, one per tag -->
20+
<!-- Optional attribute type can be: website, bugtracker, or repository -->
21+
<!-- Example: -->
22+
<!-- <url type="website">http://wiki.ros.org/robotiq_3f_rviz</url> -->
23+
24+
25+
<!-- Author tags are optional, multiple are allowed, one per tag -->
26+
<!-- Authors do not have to be maintainers, but could be -->
27+
<!-- Example: -->
28+
<!-- <author email="[email protected]">Jane Doe</author> -->
29+
30+
31+
<!-- The *depend tags are used to specify dependencies -->
32+
<!-- Dependencies can be catkin packages or system dependencies -->
33+
<!-- Examples: -->
34+
<!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
35+
<!-- <depend>roscpp</depend> -->
36+
<!-- Note that this is equivalent to the following: -->
37+
<!-- <build_depend>roscpp</build_depend> -->
38+
<!-- <exec_depend>roscpp</exec_depend> -->
39+
<!-- Use build_depend for packages you need at compile time: -->
40+
<!-- <build_depend>message_generation</build_depend> -->
41+
<!-- Use build_export_depend for packages you need in order to build against this package: -->
42+
<!-- <build_export_depend>message_generation</build_export_depend> -->
43+
<!-- Use buildtool_depend for build tool packages: -->
44+
<!-- <buildtool_depend>catkin</buildtool_depend> -->
45+
<!-- Use exec_depend for packages you need at runtime: -->
46+
<!-- <exec_depend>message_runtime</exec_depend> -->
47+
<!-- Use test_depend for packages you need only for testing: -->
48+
<!-- <test_depend>gtest</test_depend> -->
49+
<!-- Use doc_depend for packages you need only for building documentation: -->
50+
<!-- <doc_depend>doxygen</doc_depend> -->
51+
<buildtool_depend>catkin</buildtool_depend>
52+
53+
<build_depend>qtbase5-dev</build_depend>
54+
55+
<exec_depend>libqt5-core</exec_depend>
56+
<exec_depend>libqt5-gui</exec_depend>
57+
<exec_depend>libqt5-widgets</exec_depend>
58+
59+
<depend>rviz</depend>
60+
<depend>robotiq_3f_gripper_control</depend>
61+
62+
63+
<!-- The export tag contains other, unspecified, tags -->
64+
<export>
65+
<!-- Other tools can request additional information be placed here -->
66+
<rviz plugin="${prefix}/plugin_description.xml"/>
67+
</export>
68+
</package>
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<library path="lib/librobotiq_3f_rviz">
2+
<class name="robotiq/Robotiq3FingerPanel"
3+
type="robotiq_3f_rviz::Robotiq3FingerPanel"
4+
base_class_type="rviz::Panel">
5+
<description>
6+
Simple control of Robotiq 3-Finger Adaptive Robot Gripper
7+
</description>
8+
</class>
9+
</library>

0 commit comments

Comments
 (0)