Cleaned up packages and added new launch file

This commit is contained in:
2017-12-30 15:30:09 -08:00
parent da77c67454
commit ecb825bf7e
13 changed files with 146 additions and 320 deletions

View File

@@ -12,4 +12,4 @@ KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{idVendor}=="046d", ATTRS{
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="082d", ATTRS{serial}=="A98AA5FF", SYMLINK+="rover/camera_gimbal"
# The special main nav cam
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{idVendor}=="05a3", ATTRS{idProduct}=="9422", ATTRS{serial}=="SN0001", SYMLINK+="rover/camera_main_navigation"
KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", ATTRS{idVendor}=="05a3", ATTRS{idProduct}=="9422", ATTRS{serial}=="SN0001", ATTR{index}=="0", SYMLINK+="rover/camera_main_navigation"

View File

@@ -2,6 +2,6 @@ SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ATTRS{seria
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ATTRS{serial}=="FTU9EU0I", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="rover/ttyDEV1"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ATTRS{serial}=="FTU9EU0I", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="rover/ttyDEV2"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ATTRS{serial}=="FTU9EU0I", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="rover/ttyCompass"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ATTRS{serial}=="FTU9EU0I", ENV{ID_USB_INTERFACE_NUM}=="03", SYMLINK+="rover/ttyDEV3"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", ATTRS{serial}=="FTU9EU0I", ENV{ID_USB_INTERFACE_NUM}=="03", SYMLINK+="rover/ttyGPS"

View File

@@ -0,0 +1,86 @@
[LEFT_CAM_2K]
cx = 1103.74
cy = 663.956
fx = 1389.02
fy = 1389.02
k1 = -0.175403
k2 = 0.0278335
[LEFT_CAM_FHD]
cx = 959.74
cy = 582.956
fx = 1389.02
fy = 1389.02
k1 = -0.175403
k2 = 0.0278335
[LEFT_CAM_HD]
cx = 638.37
cy = 379.978
fx = 694.512
fy = 694.512
k1 = -0.175403
k2 = 0.0278335
[LEFT_CAM_VGA]
cx = 334.185
cy = 196.989
fx = 347.256
fy = 347.256
k1 = -0.175403
k2 = 0.0278335
[RIGHT_CAM_2K]
cx = 1152.59
cy = 667.942
fx = 1393.95
fy = 1393.95
k1 = -0.175501
k2 = 0.0279378
[RIGHT_CAM_FHD]
cx = 1008.59
cy = 586.942
fx = 1393.95
fy = 1393.95
k1 = -0.175501
k2 = 0.0279378
[RIGHT_CAM_HD]
cx = 662.797
cy = 381.971
fx = 696.977
fy = 696.977
k1 = -0.175501
k2 = 0.0279378
[RIGHT_CAM_VGA]
cx = 346.399
cy = 197.985
fx = 348.489
fy = 348.489
k1 = -0.175501
k2 = 0.0279378
[STEREO]
BaseLine = 120.098
CV_2K = 4.66838e-06
CV_FHD = 4.66838e-06
CV_HD = 4.66838e-06
CV_VGA = 4.66838e-06
RX_2K = 0.000518746
RX_FHD = 0.000518746
RX_HD = 0.000518746
RX_VGA = 0.000518746
RZ_2K = -0.00147751
RZ_FHD = -0.00147751
RZ_HD = -0.00147751
RZ_VGA = -0.00147751

View File

@@ -56,7 +56,7 @@ int main(int argc, char** argv)
ros::Rate loop_rate(fps + 5);
while (node_handle.ok()) {
while (ros::ok()) {
cap.read(image);
@@ -73,4 +73,6 @@ int main(int argc, char** argv)
ros::spinOnce();
loop_rate.sleep();
}
cap.release();
}

View File

@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.8.3)
project(rover)
project(rover_main)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

View File

@@ -1,19 +1,52 @@
<launch>
<group ns="cameras">
<node name="undercarriage" pkg="image_transport_tutorial" type="my_publisher" output="screen" >
<param name="device_path" value="/dev/rover/camera_undercarriage" />
<!-- ########## Start Hardware Interface Nodes ########## -->
<!-- ### Start Drive Interfaces ### -->
<!-- Start Left Bogie Interface -->
<!-- Start Right Bogie Interface -->
<!-- Start Rear Bogie Interface -->
<!-- ### Start Arm Interfaces ### -->
<!-- Start Arm Base Interface -->
<!-- Start Arm End Effector Interface -->
<!-- ### Start Miscellaneous Interfaces ### -->
<!-- Start Sample Containment Interface -->
<!-- Start Tower Interface -->
<!-- Start Chassis Pan/Tilt Interface -->
<!-- Start Iris Interface -->
<!-- ########## Start All Rover Camera Nodes ########## -->
<!-- ### Start 2D Cameras ### -->
<group ns="cameras">
<!-- Start Undercarriage Camera -->
<node name="camera_undercarriage" pkg="rover_camera" type="rover_camera" launch-prefix="taskset -c 1" respawn="true" output="screen">
<param name="device_path" value="/dev/rover/camera_undercarriage"/>
</node>
<node name="main_navigation" pkg="image_transport_tutorial" type="my_publisher" output="screen" >
<!-- Start Main Navigation Camera -->
<node name="main_navigation" pkg="rover_camera" type="rover_camera" launch-prefix="taskset -c 2" respawn="true" output="screen" >
<param name="device_path" value="/dev/rover/camera_main_navigation" />
</node>
<node name="gimbal" pkg="image_transport_tutorial" type="my_publisher" output="screen" >
<!-- Start Gimbal Camera -->
<node name="gimbal" pkg="rover_camera" type="rover_camera" launch-prefix="taskset -c 3" respawn="true" output="screen" >
<param name="device_path" value="/dev/rover/camera_gimbal" />
</node>
<!-- ### Start 3D Cameras ### -->
<!-- Start ZED Camera -->
<group ns="zed">
<include file="$(find zed_wrapper)/launch/zed_camera.launch">
<!-- compliant mode for rviz -->
<arg name="odometry_frame" value="map" />
</include>
</group>
</group>
<!-- ########## Start System Status Monitoring Nodes ########## -->
<!-- Start System CPU / RAM / Filesystem Monitor -->
<!-- Start System Temperature Monitor -->
</launch>

View File

@@ -0,0 +1,6 @@
<launch>
<node name="navsat" pkg="nmea_navsat_driver" type="nmea_serial_driver" respawn="true">
<param name="port" value="/dev/rover/ttyGPS"/>
<param name="baud" value="9600"/>
</node>
</launch>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<package format="2">
<name>rover</name>
<name>rover_main</name>
<version>0.0.0</version>
<description>The rover package</description>

View File

@@ -1,198 +0,0 @@
cmake_minimum_required(VERSION 2.8.3)
project(uvc_capture)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()
################################################
## Declare ROS messages, services and actions ##
################################################
## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
## * add a build_depend tag for "message_generation"
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
## but can be declared for certainty nonetheless:
## * add a run_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
## * add "message_generation" and every package in MSG_DEP_SET to
## find_package(catkin REQUIRED COMPONENTS ...)
## * add "message_runtime" and every package in MSG_DEP_SET to
## catkin_package(CATKIN_DEPENDS ...)
## * uncomment the add_*_files sections below as needed
## and list every .msg/.srv/.action file to be processed
## * uncomment the generate_messages entry below
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
## Generate messages in the 'msg' folder
# add_message_files(
# FILES
# Message1.msg
# Message2.msg
# )
## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )
## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )
## Generate added messages and services with any dependencies listed here
# generate_messages(
# DEPENDENCIES
# std_msgs # Or other packages containing msgs
# )
################################################
## Declare ROS dynamic reconfigure parameters ##
################################################
## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file package.xml:
## * add a build_depend and a run_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
## * add "dynamic_reconfigure" to
## find_package(catkin REQUIRED COMPONENTS ...)
## * uncomment the "generate_dynamic_reconfigure_options" section below
## and list every .cfg file to be processed
## Generate dynamic reconfigure parameters in the 'cfg' folder
# generate_dynamic_reconfigure_options(
# cfg/DynReconf1.cfg
# cfg/DynReconf2.cfg
# )
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if your package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES uvc_capture
# CATKIN_DEPENDS roscpp rospy
# DEPENDS system_lib
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
${catkin_INCLUDE_DIRS}
)
## Declare a C++ library
# add_library(${PROJECT_NAME}
# src/${PROJECT_NAME}/uvc_capture.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}_node src/uvc_capture_node.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}_node
# ${catkin_LIBRARIES}
# )
#############
## 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
# install(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark executables and/or libraries for installation
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node
# 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}
# 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_uvc_capture.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)

View File

@@ -1,25 +0,0 @@
<launch>
<group ns="cam1">
<node name="usb_cam1" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/rover/cam_grasper" />
<param name="image_width" value="1280" />
<param name="image_height" value="720" />
<param name="pixel_format" value="mjpeg" />
<param name="camera_frame_id" value="usb_cam1" />
<param name="io_method" value="mmap"/>
</node>
</group>
<group ns="cam2">
<node name="usb_cam2" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/rover/cam_undercarriage" />
<param name="image_width" value="1280" />
<param name="image_height" value="720" />
<param name="pixel_format" value="mjpeg" />
<param name="camera_frame_id" value="usb_cam2" />
<param name="io_method" value="mmap"/>
</node>
</group>
</launch>

View File

@@ -1,13 +0,0 @@
<launch>
<group ns="cam1">
<node name="usb_cam1" pkg="usb_cam" type="usb_cam_node" output="screen" >
<param name="video_device" value="/dev/rover/cam_undercarriage" />
<param name="image_width" value="1280" />
<param name="image_height" value="720" />
<param name="pixel_format" value="mjpeg" />
<param name="camera_frame_id" value="usb_cam" />
<param name="io_method" value="mmap"/>
</node>
</group>
</launch>

View File

@@ -1,65 +0,0 @@
<?xml version="1.0"?>
<package format="2">
<name>uvc_capture</name>
<version>0.0.0</version>
<description>The uvc_capture package</description>
<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="caperren@todo.todo">caperren</maintainer>
<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>
<!-- Url tags are optional, but multiple are allowed, one per tag -->
<!-- Optional attribute type can be: website, bugtracker, or repository -->
<!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/uvc_capture</url> -->
<!-- Author tags are optional, multiple are allowed, one per tag -->
<!-- Authors do not have to be maintainers, but could be -->
<!-- Example: -->
<!-- <author email="jane.doe@example.com">Jane Doe</author> -->
<!-- The *depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
<!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
<!-- <depend>roscpp</depend> -->
<!-- Note that this is equivalent to the following: -->
<!-- <build_depend>roscpp</build_depend> -->
<!-- <exec_depend>roscpp</exec_depend> -->
<!-- Use build_depend for packages you need at compile time: -->
<!-- <build_depend>message_generation</build_depend> -->
<!-- Use build_export_depend for packages you need in order to build against this package: -->
<!-- <build_export_depend>message_generation</build_export_depend> -->
<!-- Use buildtool_depend for build tool packages: -->
<!-- <buildtool_depend>catkin</buildtool_depend> -->
<!-- Use exec_depend for packages you need at runtime: -->
<!-- <exec_depend>message_runtime</exec_depend> -->
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<!-- Use doc_depend for packages you need only for building documentation: -->
<!-- <doc_depend>doxygen</doc_depend> -->
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->
</export>
</package>

View File

@@ -23,7 +23,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<group ns="zed">
<include file="$(find zed_wrapper)/launch/zed_camera.launch">
<!-- compliant mode for rviz -->
<arg name="odometry_frame" value="$(arg odometry_frame)" />
<arg name="odometry_frame" value="map" />
</include>
</group>