Skip to content

Commit

Permalink
added content
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwildersmith committed Jul 29, 2024
1 parent c5dbddf commit b347e6f
Show file tree
Hide file tree
Showing 22 changed files with 2,908 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Nerf models
outputs/

# Nerf exports
exports/

# Data
data/

# vscode
.vscode/

# Build artifacts
build/
devel/

# Compiled binaries
bin/
lib/

# ROS workspace
install/

# ROS logs
log/

# ROS generated files
build_isolated/
install_isolated/

# Python
*.pyc
__pycache__/
venv/
env/
dist/
build/
*.egg-info/
10 changes: 10 additions & 0 deletions nerf_teleoperation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.0.2)
project(nerf_teleoperation)


find_package(catkin REQUIRED COMPONENTS nerf_teleoperation_msgs nerf_view_controller)

catkin_package(
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS nerf_teleoperation_msgs nerf_view_controller
)
17 changes: 17 additions & 0 deletions nerf_teleoperation/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<package format="2">
<name>nerf_teleoperation</name>
<version>0.1.0</version>
<description>The Nerf teleoperation meta package to compile both msg and RViz plugin plus hold launch files</description>

<license>MIT</license>
<author email="[email protected]">Maximum Wilder-Smith</author>
<maintainer email="[email protected]">Maximum Wilder-Smith</maintainer>

<buildtool_depend>catkin</buildtool_depend>

<depend>std_msgs</depend>
<depend>nerf_teleoperation_msgs</depend>
<depend>nerf_view_controller</depend>

</package>
14 changes: 14 additions & 0 deletions nerf_teleoperation/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD

from distutils.core import setup
if __name__ == "__main__":
setup()
exit()

from catkin_pkg.python_setup import generate_distutils_setup

d = generate_distutils_setup(
package_dir={'': 'src'}
)

setup(**d)
34 changes: 34 additions & 0 deletions nerf_teleoperation_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Minimum cmake version
cmake_minimum_required(VERSION 2.8.3)

# Create the project
project(nerf_teleoperation_msgs)

#
find_package(catkin REQUIRED COMPONENTS
message_generation
std_msgs
geometry_msgs
sensor_msgs
actionlib_msgs
)

add_action_files(
DIRECTORY action
FILES
NerfRenderRequest.action
)

generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
sensor_msgs
actionlib_msgs
)

catkin_package(
CATKIN_DEPENDS
geometry_msgs
sensor_msgs
)
36 changes: 36 additions & 0 deletions nerf_teleoperation_msgs/action/NerfRenderRequest.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Goal
int16 width
int16 height
uint8 mode
float32 resolution
float32 fov_factor
float32 focal_length_x
float32 focal_length_y
float32 principal_point_x
float32 principal_point_y
float32 k1
float32 k2
float32 p1
float32 p2
float32 box_size
geometry_msgs/Pose pose
string frame_id
int32 client_id

---
# Result
sensor_msgs/CompressedImage rgb_image
sensor_msgs/Image depth_image
float32 resolution
float32 render_time
int32 client_id
uint16 seq

---
# Feedback
sensor_msgs/CompressedImage rgb_image
sensor_msgs/Image depth_image
float32 resolution
float32 render_time
int32 client_id
uint16 seq
20 changes: 20 additions & 0 deletions nerf_teleoperation_msgs/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>

<package format="2">
<name>nerf_teleoperation_msgs</name>
<version>0.1.0</version>
<description>Messages and services for Nerf ROS Package</description>

<license>MIT</license>
<author email="[email protected]">Maximum Wilder-Smith</author>
<maintainer email="[email protected]">Maximum Wilder-Smith</maintainer>

<buildtool_depend>catkin</buildtool_depend>

<depend>std_msgs</depend>
<depend>message_generation</depend>
<depend>geometry_msgs</depend>
<depend>sensor_msgs</depend>
<depend>actionlib_msgs</depend>

</package>
104 changes: 104 additions & 0 deletions nerf_view_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Minimum cmake version
cmake_minimum_required(VERSION 3.0.2)

# Create the project
project(nerf_view_controller)

# Load RViz and check version compile options
find_package(catkin REQUIRED
COMPONENTS
jsk_rviz_plugins
rviz
nerf_teleoperation_msgs
)

set(CMAKE_AUTOMOC ON)

find_package(OpenCV REQUIRED)

include_directories(${catkin_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS})

if(rviz_QT_VERSION VERSION_LESS "5")
message(STATUS "Using Qt4 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt4 ${rviz_QT_VERSION} EXACT REQUIRED QtCore QtGui)
include(${QT_USE_FILE})
else()
message(STATUS "Using Qt5 based on the rviz_QT_VERSION: ${rviz_QT_VERSION}")
find_package(Qt5 ${rviz_QT_VERSION} EXACT REQUIRED Core Widgets)
set(QT_LIBRARIES Qt5::Widgets)
endif()

include_directories(${QT_INCLUDE_DIR})
add_definitions(-DQT_NO_KEYWORDS)


set(${PROJECT_NAME}_SRCS
src/${PROJECT_NAME}/nerf_cam.cpp
)

set(${PROJECT_NAME}_HDRS
include/${PROJECT_NAME}/nerf_cam.hpp
)

set(${PROJECT_NAME}_INCLUDE_DIRECTORIES
include
${CMAKE_CURRENT_BINARY_DIR}
)

catkin_package(
INCLUDE_DIRS
include
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
rviz
nerf_teleoperation_msgs
)

add_definitions("-D${PROJECT_NAME}_VERSION=\"${${PROJECT_NAME}_VERSION}\"")

include_directories(
${${PROJECT_NAME}_INCLUDE_DIRECTORIES}
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
include
)

add_library(
${PROJECT_NAME}
${${PROJECT_NAME}_SRCS}
${${PROJECT_NAME}_HDRS}
)


add_dependencies(
${PROJECT_NAME}
${catkin_EXPORTED_TARGETS}
)

target_link_libraries(
${PROJECT_NAME}
${QT_LIBRARIES}
${catkin_LIBRARIES}
)

install(
FILES
plugin_description.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

install(
TARGETS
${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)

install(
DIRECTORY
include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
Loading

0 comments on commit b347e6f

Please sign in to comment.