Skip to content

Commit 09cf47e

Browse files
committed
removed redistribution of sdk + CI underway
1 parent 6ee79aa commit 09cf47e

16 files changed

Lines changed: 166 additions & 4867 deletions

File tree

.github/workflows/main.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: main
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
humble-devel-ci:
13+
runs-on: ubuntu-20.04
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
ros_distribution:
18+
- noetic
19+
include:
20+
- docker_image: ubuntu:focal
21+
ros_distribution: noetic
22+
ros_version: 1
23+
container:
24+
image: ${{ matrix.docker_image }}
25+
steps:
26+
- name: Setup directories
27+
run: mkdir -p ros_ws/src
28+
- name: checkout
29+
uses: actions/checkout@v3
30+
with:
31+
path: ros_ws/src
32+
- name: Setup ROS environment
33+
uses: ros-tooling/setup-ros@0.3.4
34+
with:
35+
required-ros-distributions: ${{ matrix.ros_distribution }}
36+
- name: Build and Test
37+
uses: ros-tooling/action-ros-ci@0.2.6
38+
with:
39+
package-name: natnet_ros_cpp
40+
target-ros-distro: ${{ matrix.ros_distribution }}
41+
skip-tests: true

CMakeLists.txt

Lines changed: 105 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,23 @@ find_package(catkin REQUIRED COMPONENTS
66
geometry_msgs
77
roscpp
88
std_msgs
9+
visualization_msgs
910
sensor_msgs
1011
tf2
1112
tf2_ros
1213
)
13-
#find_package(Boost 1.65 REQUIRED COMPONENTS system thread)
14-
#find_package(Eigen3 REQUIRED)
14+
find_package(Boost 1.65 REQUIRED COMPONENTS system thread)
15+
find_package(Eigen3 REQUIRED)
16+
17+
#download Natnet SDK
18+
execute_process(
19+
COMMAND chmod "+x" "${CMAKE_CURRENT_SOURCE_DIR}/install_sdk.sh"
20+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
21+
)
22+
execute_process(
23+
COMMAND bash "-c" "${CMAKE_CURRENT_SOURCE_DIR}/install_sdk.sh"
24+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
25+
)
1526

1627
# Enable C++14 and warnings
1728
#set(CMAKE_CXX_STANDARD 14)
@@ -20,10 +31,24 @@ find_package(catkin REQUIRED COMPONENTS
2031

2132
set(NATNET_SDK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/NatNetSDK/)
2233
set(NATNET_LIBRARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/NatNetSDK/lib/libNatNet.so)
23-
set(natnet_include_directories
34+
set(my_include_directories
2435
include/natnet_ros_cpp
36+
${Boost_INCLUDE_DIRS}
37+
${EIGEN3_INCLUDE_DIRS}
2538
${NATNET_SDK_DIR}/include
2639
)
40+
## Generate messages in the 'msg' folder
41+
# add_message_files(
42+
# FILES
43+
# Message1.msg
44+
# Message2.msg
45+
# )
46+
47+
## Generate added messages and services with any dependencies listed here
48+
# generate_messages(
49+
# DEPENDENCIES
50+
# geometry_msgs# std_msgs
51+
# )
2752

2853
catkin_package(
2954
# INCLUDE_DIRS include
@@ -34,16 +59,92 @@ catkin_package(
3459

3560
include_directories(
3661
${catkin_INCLUDE_DIRS}
37-
${natnet_include_directories}
62+
${my_include_directories}
3863
)
3964

65+
66+
## Declare a C++ library
67+
# add_library(${PROJECT_NAME}
68+
# src/${PROJECT_NAME}/natnet_ros_cpp.cpp
69+
# )
70+
71+
## Add cmake target dependencies of the library
72+
## as an example, code may need to be generated before libraries
73+
## either from message generation or dynamic reconfigure
74+
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
75+
4076
## Declare a C++ executable
4177
## With catkin_make all packages are built within a single CMake context
4278
## The recommended prefix ensures that target names across packages don't collide
4379
add_executable(${PROJECT_NAME} src/natnet_ros.cpp src/internal.cpp src/nn_filter.cpp)
4480

81+
## Rename C++ executable without prefix
82+
## The above recommended prefix causes long target names, the following renames the
83+
## target back to the shorter version for ease of user use
84+
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
85+
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
86+
87+
## Add cmake target dependencies of the executable
88+
## same as for the library above
89+
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
90+
4591
## Specify libraries to link a library or executable target against
4692
target_link_libraries(${PROJECT_NAME}
4793
${catkin_LIBRARIES}
4894
${NATNET_LIBRARY_DIR}
4995
)
96+
97+
#############
98+
## Install ##
99+
#############
100+
101+
# all install targets should use catkin DESTINATION variables
102+
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
103+
104+
## Mark executable scripts (Python etc.) for installation
105+
## in contrast to setup.py, you can choose the destination
106+
# catkin_install_python(PROGRAMS
107+
# scripts/my_python_script
108+
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
109+
# )
110+
111+
## Mark executables for installation
112+
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
113+
# install(TARGETS ${PROJECT_NAME}_node
114+
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
115+
# )
116+
117+
## Mark libraries for installation
118+
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
119+
# install(TARGETS ${PROJECT_NAME}
120+
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
121+
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
122+
# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
123+
# )
124+
125+
## Mark cpp header files for installation
126+
# install(DIRECTORY include/${PROJECT_NAME}/
127+
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
128+
# FILES_MATCHING PATTERN "*.h"
129+
# PATTERN ".svn" EXCLUDE
130+
# )
131+
132+
## Mark other files for installation (e.g. launch and bag files, etc.)
133+
# install(FILES
134+
# # myfile1
135+
# # myfile2
136+
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
137+
# )
138+
139+
#############
140+
## Testing ##
141+
#############
142+
143+
## Add gtest based cpp test target and link libraries
144+
# catkin_add_gtest(${PROJECT_NAME}-test test/test_natnet_ros_cpp.cpp)
145+
# if(TARGET ${PROJECT_NAME}-test)
146+
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
147+
# endif()
148+
149+
## Add folders to be run by python nosetests
150+
# catkin_add_nosetests(test)

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# NatNet 4 ROS driver
22

3+
4+
35
## Introduction
4-
This package contains a ROS driver for the NatNet protocol used by the OptiTrack motion capture system. It supports NatNet versions 4.0 (Motive 2.2 and higher). The NatNet SDK provided by the optitrack can be found [here](https://optitrack.com/support/downloads/developer-tools.html#natnet-sdk). It is already included in the package under `deps/`. NatNet protocol is used for streaming live motion capture data (rigid bodies, skeletons etc) across the shared network.
6+
This package contains a ROS driver for the NatNet protocol used by the OptiTrack motion capture system. It supports NatNet versions 4.0 (Motive 2.2 and higher). The NatNet SDK provided by the optitrack can be found [here](https://optitrack.com/support/downloads/developer-tools.html#natnet-sdk). It will be downloaded under `deps/NatnetSDK` while building it for the first time. NatNet protocol is used for streaming live motion capture data (rigid bodies, skeletons etc) across the shared network.
57

68
This package is only tested with the Natnet 4.0 and ROS noetic but probably will work with the older versions of both as well.
79

deps/NatNetSDK/CMakeLists.txt

Lines changed: 0 additions & 30 deletions
This file was deleted.

deps/NatNetSDK/README.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)