Skip to content

Commit

Permalink
removed redistribution of sdk + CI underway
Browse files Browse the repository at this point in the history
  • Loading branch information
aarsht7 committed Sep 21, 2022
1 parent 6ee79aa commit 09cf47e
Show file tree
Hide file tree
Showing 16 changed files with 166 additions and 4,867 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: main

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
humble-devel-ci:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ros_distribution:
- noetic
include:
- docker_image: ubuntu:focal
ros_distribution: noetic
ros_version: 1
container:
image: ${{ matrix.docker_image }}
steps:
- name: Setup directories
run: mkdir -p ros_ws/src
- name: checkout
uses: actions/checkout@v3
with:
path: ros_ws/src
- name: Setup ROS environment
uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: Build and Test
uses: ros-tooling/[email protected]
with:
package-name: natnet_ros_cpp
target-ros-distro: ${{ matrix.ros_distribution }}
skip-tests: true
109 changes: 105 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,23 @@ find_package(catkin REQUIRED COMPONENTS
geometry_msgs
roscpp
std_msgs
visualization_msgs
sensor_msgs
tf2
tf2_ros
)
#find_package(Boost 1.65 REQUIRED COMPONENTS system thread)
#find_package(Eigen3 REQUIRED)
find_package(Boost 1.65 REQUIRED COMPONENTS system thread)
find_package(Eigen3 REQUIRED)

#download Natnet SDK
execute_process(
COMMAND chmod "+x" "${CMAKE_CURRENT_SOURCE_DIR}/install_sdk.sh"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
execute_process(
COMMAND bash "-c" "${CMAKE_CURRENT_SOURCE_DIR}/install_sdk.sh"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

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

set(NATNET_SDK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/NatNetSDK/)
set(NATNET_LIBRARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/NatNetSDK/lib/libNatNet.so)
set(natnet_include_directories
set(my_include_directories
include/natnet_ros_cpp
${Boost_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${NATNET_SDK_DIR}/include
)
## Generate messages in the 'msg' folder
# add_message_files(
# FILES
# Message1.msg
# Message2.msg
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
# DEPENDENCIES
# geometry_msgs# std_msgs
# )

catkin_package(
# INCLUDE_DIRS include
Expand All @@ -34,16 +59,92 @@ catkin_package(

include_directories(
${catkin_INCLUDE_DIRS}
${natnet_include_directories}
${my_include_directories}
)


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

## Add cmake target dependencies of the library
## as an example, code may need to be generated before libraries
## either from message generation or dynamic reconfigure
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Declare a C++ executable
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(${PROJECT_NAME} src/natnet_ros.cpp src/internal.cpp src/nn_filter.cpp)

## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")

## Add cmake target dependencies of the executable
## same as for the library above
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
${NATNET_LIBRARY_DIR}
)

#############
## Install ##
#############

# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html

## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
# catkin_install_python(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

## Mark executables for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
# install(TARGETS ${PROJECT_NAME}_node
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

## Mark libraries for installation
## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
# install(TARGETS ${PROJECT_NAME}
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
# )

## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )

## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )

#############
## Testing ##
#############

## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_natnet_ros_cpp.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()

## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# NatNet 4 ROS driver



## Introduction
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.
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.

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.

Expand Down
30 changes: 0 additions & 30 deletions deps/NatNetSDK/CMakeLists.txt

This file was deleted.

55 changes: 0 additions & 55 deletions deps/NatNetSDK/README.md

This file was deleted.

Loading

0 comments on commit 09cf47e

Please sign in to comment.