Skip to content

Commit

Permalink
Huge refactoring of aruco_pose
Browse files Browse the repository at this point in the history
  • Loading branch information
okalachev committed Oct 19, 2018
1 parent 163af20 commit e238032
Show file tree
Hide file tree
Showing 20 changed files with 965 additions and 566 deletions.
46 changes: 26 additions & 20 deletions aruco_pose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ find_package(catkin REQUIRED COMPONENTS
image_transport
cv_bridge
tf
#tf2
#tf2_ros
#aruco_msgs
tf2
tf2_ros
tf2_geometry_msgs
sensor_msgs
message_generation
)

find_package(OpenCV REQUIRED)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)

Expand Down Expand Up @@ -55,11 +59,12 @@ find_package(catkin REQUIRED COMPONENTS
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)

## Generate messages in the 'msg' folder
#add_message_files(
# FILES
# Marker.msg
# MarkerArray.msg
#)
add_message_files(
FILES
Point2D.msg
Marker.msg
MarkerArray.msg
)

## Generate services in the 'srv' folder
# add_service_files(
Expand All @@ -76,10 +81,11 @@ find_package(catkin REQUIRED COMPONENTS
# )

## Generate added messages and services with any dependencies listed here
#generate_messages(
# DEPENDENCIES
# std_msgs # Or other packages containing msgs
#)
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
)

################################################
## Declare ROS dynamic reconfigure parameters ##
Expand Down Expand Up @@ -111,9 +117,9 @@ find_package(catkin REQUIRED COMPONENTS
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
INCLUDE_DIRS DEPENDS OpenCV
LIBRARIES aruco_pose
# CATKIN_DEPENDS other_catkin_pkg
CATKIN_DEPENDS message_runtime
# DEPENDS system_lib
)

Expand All @@ -126,11 +132,13 @@ catkin_package(
include_directories(
# include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)

## Declare a C++ library
add_library(${PROJECT_NAME}
src/aruco_pose.cpp
add_library(aruco_pose
src/aruco_detect.cpp
src/aruco_map.cpp
)

## Add cmake target dependencies of the library
Expand All @@ -154,11 +162,9 @@ add_library(${PROJECT_NAME}
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Specify libraries to link a library or executable target against
link_directories(/opt/ros/kinetic/lib)

target_link_libraries(${PROJECT_NAME}
target_link_libraries(aruco_pose
${catkin_LIBRARIES}
"/opt/ros/kinetic/lib/libopencv_aruco3.so" # TODO: fix launch fails with .so loading
${OpenCV_LIBS}
)

#############
Expand Down
4 changes: 4 additions & 0 deletions aruco_pose/map/map.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1 0.33 0 0 0 0 0 0
2 0.33 1 0 0 0 0 0
3 0.33 0 1 0 0 0 0
4 0.33 1 1 0 0 0 0
6 changes: 6 additions & 0 deletions aruco_pose/msg/Marker.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
uint32 id
geometry_msgs/PoseWithCovariance pose
Point2D c1
Point2D c2
Point2D c3
Point2D c4
2 changes: 2 additions & 0 deletions aruco_pose/msg/MarkerArray.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Header header
Marker[] markers
2 changes: 2 additions & 0 deletions aruco_pose/msg/Point2D.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
float32 x
float32 y
5 changes: 4 additions & 1 deletion aruco_pose/nodelet_plugins.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<library path="lib/libaruco_pose">
<class name="aruco_pose/aruco_pose" type="ArucoPose" base_class_type="nodelet::Nodelet">
<class name="aruco_pose/aruco_detect" type="ArucoDetect" base_class_type="nodelet::Nodelet">
<description/>
</class>
<class name="aruco_pose/aruco_map" type="ArucoMap" base_class_type="nodelet::Nodelet">
<description/>
</class>
</library>
29 changes: 19 additions & 10 deletions aruco_pose/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package>
<name>aruco_pose</name>
<version>0.0.0</version>
<description>ArUco maps precise pose estimation nodelet</description>
<description>Positioning by ArUco markers</description>

<maintainer email="[email protected]">Oleg Kalachev</maintainer>
<license>MIT</license>
Expand All @@ -11,21 +11,30 @@
<author email="[email protected]">Oleg Kalachev</author>
<author email="[email protected]">Artem Smirnov</author>

<!-- Use build_depend for packages you need at compile time: -->
<buildtool_depend>catkin</buildtool_depend>

<build_depend>tf</build_depend>
<build_depend>tf2</build_depend>
<build_depend>tf2_ros</build_depend>
<build_depend>tf2_geometry_msgs</build_depend>
<build_depend>cv_bridge</build_depend>
<build_depend>dynamic_reconfigure</build_depend>
<build_depend>image_transport</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>message_runtime</build_depend>
<build_depend>nodelet</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>image_transport</build_depend>
<build_depend>cv_bridge</build_depend>
<build_depend>tf</build_depend>
<!-- Use buildtool_depend for build tool packages: -->
<buildtool_depend>catkin</buildtool_depend>
<!-- Use run_depend for packages you need at runtime: -->
<build_depend>std_msgs</build_depend>
<run_depend>nodelet</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>image_transport</run_depend>
<run_depend>cv_bridge</run_depend>
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<run_depend>message_runtime</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>tf</run_depend>
<run_depend>tf2</run_depend>
<run_depend>tf2_ros</run_depend>
<run_depend>tf2_geometry_msgs</run_depend>

<!-- The export tag contains other, unspecified, tags -->
<export>
Expand Down
Loading

0 comments on commit e238032

Please sign in to comment.