Skip to content

Commit

Permalink
Update ROS package configuration (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiryoh authored Dec 21, 2021
1 parent eb1daf4 commit cd516d4
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 9 deletions.
26 changes: 18 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ project(jetson_nano_cuda_csi_cam)

find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
sensor_msgs
)

Expand All @@ -16,7 +15,7 @@ message("-- CUDA version: ${CUDA_VERSION}")
###################################

catkin_package(
CATKIN_DEPENDS roscpp std_msgs sensor_msgs
CATKIN_DEPENDS roscpp sensor_msgs
)

###########
Expand All @@ -31,6 +30,7 @@ include_directories(

include_directories(${PROJECT_INCLUDE_DIR} ${PROJECT_INCLUDE_DIR}/jetson-utils)
include_directories(/usr/include/gstreamer-1.0 /usr/include/glib-2.0 /usr/include/libxml2 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/include /usr/lib/x86_64-linux-gnu/gstreamer-1.0/include/ /usr/lib/aarch64-linux-gnu/glib-2.0/include/ /usr/lib/x86_64-linux-gnu/glib-2.0/include/)
link_directories(/usr/lib/aarch64-linux-gnu/tegra)

add_executable(video_stream src/video_stream_node.cpp src/image_converter.cpp)
target_link_libraries(video_stream ${catkin_LIBRARIES} jetson-utils)
Expand All @@ -40,13 +40,23 @@ target_link_libraries(video_stream ${catkin_LIBRARIES} jetson-utils)
## Install ##
#############

foreach(dir launch config)
install(DIRECTORY ${dir}/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir}
)
endforeach(dir)
# Mark executables and/or libraries for installation
install(TARGETS video_stream
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

# Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)

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

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

26 changes: 26 additions & 0 deletions config/sainsmart-imx219-jetson-nano-160deg-fov-csi_cam_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
image_width: 480
image_height: 270
camera_name: csi_cam_1
camera_matrix:
rows: 3
cols: 3
data: [ 420.01343, 0. , 254.07253,
0. , 422.67127, 123.39681,
0. , 0. , 1. ]
distortion_model: plumb_bob
distortion_coefficients:
rows: 1
cols: 5
data: [-0.400270, 0.195073, 0.008603, -0.003068, 0.000000]
rectification_matrix:
rows: 3
cols: 3
data: [ 1., 0., 0.,
0., 1., 0.,
0., 0., 1.]
projection_matrix:
rows: 3
cols: 4
data: [ 362.20416, 0. , 256.10214, 0. ,
0. , 405.09357, 123.67604, 0. ,
0. , 0. , 1. , 0. ]
4 changes: 3 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
<url type="repository">https://github.com/rt-net/jetson_nano_cuda_csi_cam_ros</url>

<buildtool_depend>catkin</buildtool_depend>
<depend>camera_info_manager</depend>
<depend>image_transport</depend>
<depend>image_transport_plugins</depend>
<depend>roscpp</depend>
<depend>sensor_msgs</depend>
<depend>std_msgs</depend>

</package>

0 comments on commit cd516d4

Please sign in to comment.