-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Builds + basics seem to run - Tests need to be ported - CI needs to be integrated - Further tests especially for fiducial_slam are needed
- Loading branch information
Alexander Gutenkunst
committed
Apr 9, 2021
1 parent
7826435
commit 8d8bbd4
Showing
29 changed files
with
852 additions
and
615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,105 @@ | ||
|
||
cmake_minimum_required(VERSION 2.8.3) | ||
cmake_minimum_required(VERSION 3.5) | ||
project(aruco_detect) | ||
|
||
find_package(catkin REQUIRED COMPONENTS | ||
roscpp | ||
tf2_geometry_msgs | ||
tf2_ros | ||
tf2 | ||
visualization_msgs | ||
vision_msgs | ||
image_transport | ||
cv_bridge | ||
sensor_msgs | ||
std_msgs | ||
fiducial_msgs | ||
dynamic_reconfigure | ||
) | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 14) | ||
endif() | ||
|
||
|
||
find_package(rclcpp REQUIRED) | ||
find_package(tf2_geometry_msgs REQUIRED) | ||
find_package(tf2_ros REQUIRED) | ||
find_package(tf2 REQUIRED) | ||
find_package(visualization_msgs REQUIRED) | ||
find_package(vision_msgs REQUIRED) | ||
find_package(image_transport REQUIRED) | ||
find_package(cv_bridge REQUIRED) | ||
find_package(sensor_msgs REQUIRED) | ||
find_package(std_msgs REQUIRED) | ||
find_package(std_srvs REQUIRED) | ||
find_package(fiducial_msgs REQUIRED) | ||
find_package(geometry_msgs REQUIRED) | ||
#find_package(dynamic_reconfigure REQUIRED) | ||
|
||
find_package(OpenCV REQUIRED) | ||
|
||
generate_dynamic_reconfigure_options(cfg/DetectorParams.cfg) | ||
#generate_dynamic_reconfigure_options(cfg/DetectorParams.cfg) | ||
|
||
#catkin_package(INCLUDE_DIRS DEPENDS OpenCV) | ||
|
||
catkin_package(INCLUDE_DIRS DEPENDS OpenCV) | ||
|
||
set(DEPENDENCIES | ||
rclcpp | ||
sensor_msgs | ||
std_msgs | ||
std_srvs | ||
visualization_msgs | ||
vision_msgs | ||
fiducial_msgs | ||
geometry_msgs | ||
cv_bridge | ||
tf2_ros | ||
image_transport | ||
) | ||
|
||
########### | ||
## Build ## | ||
########### | ||
|
||
add_definitions(-std=c++11) | ||
|
||
include_directories(${catkin_INCLUDE_DIRS}) | ||
include_directories(${OpenCV_INCLUDE_DIRS}) | ||
#include_directories(${OpenCV_INCLUDE_DIRS}) | ||
|
||
add_executable(aruco_detect src/aruco_detect.cpp) | ||
|
||
add_dependencies(aruco_detect ${${PROJECT_NAME}_EXPORTED_TARGETS} | ||
${catkin_EXPORTED_TARGETS}) | ||
#add_dependencies(aruco_detect ${${PROJECT_NAME}_EXPORTED_TARGETS}) | ||
|
||
target_link_libraries(aruco_detect ${catkin_LIBRARIES} ${OpenCV_LIBS}) | ||
ament_target_dependencies(aruco_detect ${DEPENDENCIES} OpenCV) | ||
|
||
############# | ||
## Install ## | ||
############# | ||
|
||
## Mark executables and/or libraries for installation | ||
install(TARGETS aruco_detect | ||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
DESTINATION lib/${PROJECT_NAME} | ||
) | ||
|
||
catkin_install_python(PROGRAMS scripts/create_markers.py | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
install(DIRECTORY launch | ||
DESTINATION share/${PROJECT_NAME} | ||
) | ||
install(DIRECTORY launch/ | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch | ||
) | ||
|
||
## Mark executables and/or libraries for installation | ||
# install(TARGETS aruco_detect | ||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
# ) | ||
|
||
install(PROGRAMS scripts/create_markers.py | ||
DESTINATION lib/${PROJECT_NAME} | ||
) | ||
# install(DIRECTORY launch/ | ||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch | ||
# ) | ||
|
||
########### | ||
## Tests ## | ||
########### | ||
|
||
if(CATKIN_ENABLE_TESTING) | ||
find_package(rostest REQUIRED) | ||
# if(CATKIN_ENABLE_TESTING) | ||
# find_package(rostest REQUIRED) | ||
|
||
# Tests need c++11 | ||
add_definitions(-std=c++11) | ||
# # Tests need c++11 | ||
# add_definitions(-std=c++11) | ||
|
||
add_rostest_gtest(aruco_images_test | ||
test/aruco_images.test | ||
test/aruco_images_test.cpp) | ||
target_link_libraries(aruco_images_test ${catkin_LIBRARIES} ${OpenCV_LIBS}) | ||
endif() | ||
# add_rostest_gtest(aruco_images_test | ||
# test/aruco_images.test | ||
# test/aruco_images_test.cpp) | ||
# target_link_libraries(aruco_images_test ${catkin_LIBRARIES} ${OpenCV_LIBS}) | ||
# endif() | ||
|
||
################################################################################ | ||
# Macro for ament package | ||
################################################################################ | ||
ament_export_include_directories(include) | ||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument, LogInfo | ||
from launch_ros.actions import Node | ||
from launch.substitutions import LaunchConfiguration | ||
|
||
def generate_launch_description(): | ||
return LaunchDescription([ | ||
DeclareLaunchArgument('camera', default_value='camera'), | ||
DeclareLaunchArgument('image', default_value='image'), | ||
DeclareLaunchArgument('transport', default_value='compressed'), | ||
DeclareLaunchArgument('fiducial_len', default_value='0.14'), | ||
DeclareLaunchArgument('dictionary', default_value='7'), | ||
DeclareLaunchArgument('do_pose_estimation', default_value='True'), | ||
DeclareLaunchArgument('vis_msgs', default_value="False"), | ||
DeclareLaunchArgument('ignore_fiducials', default_value=""), | ||
DeclareLaunchArgument('fiducial_len_override', default_value=""), | ||
Node( | ||
package='aruco_detect', | ||
namespace='aruco_detect', | ||
executable='aruco_detect', | ||
name='aruco_detect', | ||
parameters=[ | ||
{"image_transport":LaunchConfiguration('transport')}, | ||
{"publish_images":True}, | ||
{"fiducial_len":LaunchConfiguration('fiducial_len')}, | ||
{"dictionary":LaunchConfiguration('dictionary')}, | ||
{"do_pose_estimation":LaunchConfiguration('do_pose_estimation')}, | ||
{"vis_msgs":LaunchConfiguration('vis_msgs')}, | ||
{"ignore_fiducials":LaunchConfiguration('ignore_fiducials')}, | ||
{"fiducial_len_override":LaunchConfiguration('fiducial_len_override')} | ||
], | ||
#Not sure if the remapping is working properly TODO | ||
remappings=[ | ||
('camera/compressed', [LaunchConfiguration('camera'), '/',LaunchConfiguration('image'), '/', LaunchConfiguration('transport')]), | ||
('camera_info', [LaunchConfiguration('camera'), '/camera_info']), | ||
] | ||
) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,7 @@ | |
|
||
<author email="[email protected]">Jim Vaughan</author> | ||
|
||
<buildtool_depend>catkin</buildtool_depend> | ||
|
||
<depend>roscpp</depend> | ||
<depend>rclcpp</depend> | ||
<depend>tf2_geometry_msgs</depend> | ||
<depend>tf2_ros</depend> | ||
<depend>tf2</depend> | ||
|
@@ -23,8 +21,15 @@ | |
<depend>sensor_msgs</depend> | ||
<depend>cv_bridge</depend> | ||
<depend>fiducial_msgs</depend> | ||
<depend>dynamic_reconfigure</depend> | ||
<depend>python-cairosvg</depend> | ||
<depend>python-joblib</depend> | ||
<depend>std_srvs</depend> | ||
<depend>geometry_msgs</depend> | ||
<!--<depend>dynamic_reconfigure</depend>--> | ||
|
||
<!-- <depend>python-cairosvg</depend> Installed via pip3 install cairosvg --> | ||
<depend>python-joblib</depend> <!-- TODO Manually needed to install apt python3-joblib --> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
|
||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.