diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..6697601 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,37 @@ +name: Run setup and colcon build for Dev +on: push +jobs: + setup_and_build_check: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: enviroment setupg + run: | + export ROVERFLAKE_ROOT="${GITHUB_WORKSPACE}" + yes | ./setup_scripts/setup_everything_common.sh + - name: build + run: | + cd $ROVERFLAKE_ROOT + echo $ROS_DISTRO + source /opt/ros/humble/setup.bash + echo $ROS_DISTRO + colcon build --symlink-install --packages-skip sweeppy + - name: Notify Discord (success) + if: ${{ success() }} + uses: appleboy/discord-action@v1.0.0 + with: + webhook_id: ${{ secrets.DISCORD_BOT_WEBHOOK_ID }} # it also accepts full URL + webhook_token: ${{ secrets.DISCORD_BOT_WEBHOOK_TOKEN }} # it also accepts full URL + message: | + *I'm happy now and I'll let you merge ${{ github.actor }}. _good job!_* || ${{ github.repository }} on `${{ github.ref_name }}` + ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + - name: Notify Discord (failure) + if: ${{ failure() }} + uses: appleboy/discord-action@v1.0.0 + with: + webhook_id: ${{ secrets.DISCORD_BOT_WEBHOOK_ID }} # it also accepts full URL + webhook_token: ${{ secrets.DISCORD_BOT_WEBHOOK_TOKEN }} # it also accepts full URL + message: | + _you have saddened me ${{ github.actor }}_ + ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + diff --git a/.gitignore b/.gitignore index 40a9511..37dd7c7 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,10 @@ build_isolated/ devel_isolated/ phidgetlog.log +# install files +random_install_files/* + + # Generated by dynamic reconfigure *.cfgc /cfg/cpp/ @@ -64,3 +68,4 @@ log/ **/TODO.md .vscode/settings.json + diff --git a/README.md b/README.md index 3f90652..0288d82 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,23 @@ _Obviously you are welcome to use HTTPS or another form of authentication (like Then cd in, and we can use setup scripts from here. +Before using setup scripts, you need to set your `ROVERFLAKE_ROOT` enviroment variable. Its best to throw this in your .bashrc file so that it sets permanently. +One liner to do that: +> `echo "export ROVERFLAKE_ROOT=" >> ~/.bashrc` + +If the repo is in your home directory, youd do: +> `echo "export ROVERFLAKE_ROOT=/home//Roverflake2" >> ~/.bashrc` + > `bash setup_scripts/setup_everything_common.sh` This script will install ros2, as well as other common dependencies. +After that script finishes, try to build! +From the root of RoverFlake2: +> `colcon build` +(it should automatically use --symlink-install as set in `colcon_defaults.yaml`) + +If you get an error... panic, scream, and hurl insults at your computer. Then look at common issues and ask for help in the discord. ### COMMON ISSUES & TROUBLESHOOTING arm_hardware_interface fails to build: diff --git a/colcon.defaults.yaml b/colcon.defaults.yaml new file mode 100644 index 0000000..1b5e9b3 --- /dev/null +++ b/colcon.defaults.yaml @@ -0,0 +1,4 @@ +build: + cmake-args: + - -DCMAKE_POLICY_DEFAULT_CMP0167=OLD + - -DCMAKE_POLICY_DEFAULT_CMP0148=OLD \ No newline at end of file diff --git a/drcp b/drcp deleted file mode 160000 index 1bbacb7..0000000 --- a/drcp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1bbacb79ab899fd773f59980b14c70dc423ebef1 diff --git a/rover_env/cbs_env_setup.sh b/rover_env/cbs_env_setup.sh deleted file mode 100644 index 8a23657..0000000 --- a/rover_env/cbs_env_setup.sh +++ /dev/null @@ -1,2 +0,0 @@ - -source ${ROVERFLAKE_PATH}/src/rover_manager/screenScripts/cb_env_variables.sh diff --git a/rover_env/rover_aliases_common.sh b/rover_env/rover_aliases_common.sh deleted file mode 100644 index d7cdaca..0000000 --- a/rover_env/rover_aliases_common.sh +++ /dev/null @@ -1,3 +0,0 @@ -alias rosbuild="colcon build --symlink-install" -alias colemak="setxkbmap us -variant colemak" -alias qwfpgj="setxkbmap us" diff --git a/rover_env/rover_env_common.sh b/rover_env/rover_env_common.sh deleted file mode 100644 index 38e8a2c..0000000 --- a/rover_env/rover_env_common.sh +++ /dev/null @@ -1,3 +0,0 @@ -export ROVERFLAKE_PATH="${HOME}/RoverFlake2" -source ${ROVERFLAKE_PATH}/rover_env/rover_aliases_common.sh -source ${ROVERFLAKE_PATH}/rover_env/cbs_env_setup.sh diff --git a/setup_scripts/install-ros2-humble.sh b/setup_scripts/install-ros2-humble.sh index 4726d9a..efbc425 100755 --- a/setup_scripts/install-ros2-humble.sh +++ b/setup_scripts/install-ros2-humble.sh @@ -1,4 +1,4 @@ -source $HOME/RoverFlake2/setup_scripts/utils/common.sh +source $ROVERFLAKE_ROOT/setup_scripts/utils/common.sh echo CHECKING FOR ROS2 DESKTOP if is_package_installed "ros-humble-desktop"; then @@ -23,14 +23,13 @@ else echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null sudo apt update - sudo apt upgrade sudo apt install ros-humble-desktop - sudo apt install ros-dev-tools echo source /opt/ros/humble/setup.bash >> ~/.bashrc + source ~/.bashrc fi echo install-ros2-humble.sh complete. diff --git a/setup_scripts/install_libsweepsdk.sh b/setup_scripts/install_libsweepsdk.sh new file mode 100755 index 0000000..76ec5a6 --- /dev/null +++ b/setup_scripts/install_libsweepsdk.sh @@ -0,0 +1,19 @@ +cd ${RANDOM_INSTALL_FILE_DIR} + +# clone the sweep-sdk repository +git clone https://github.com/scanse/sweep-sdk + +# enter the libsweep directory +cd sweep-sdk/libsweep + +# create and enter a build directory +mkdir -p build +cd build + +# build and install the libsweep library +cmake .. -DCMAKE_BUILD_TYPE=Release +cmake --build . +sudo cmake --build . --target install +sudo ldconfig + +cd ${ROVERFLAKE_ROOT} \ No newline at end of file diff --git a/setup_scripts/install_moveit_dependencies.sh b/setup_scripts/install_moveit_dependencies.sh index fa33ed1..6cd0ef8 100755 --- a/setup_scripts/install_moveit_dependencies.sh +++ b/setup_scripts/install_moveit_dependencies.sh @@ -1,5 +1,6 @@ source $HOME/RoverFlake2/setup_scripts/utils/common.sh -echo script not ready yet +echo script not ready yet && false + # apt_packages_to_install=( # "ros-humble-moveit-" diff --git a/setup_scripts/install_rosdeps.sh b/setup_scripts/install_rosdeps.sh index e0f9856..cafe51c 100755 --- a/setup_scripts/install_rosdeps.sh +++ b/setup_scripts/install_rosdeps.sh @@ -1,2 +1,2 @@ echo Run from RoverFlake2 root dir -rosdep install --from-paths src --ignore-src -r -y +rosdep install --from-paths src --ignore-src -r --skip-keys="serial moteus_msgs" -y \ No newline at end of file diff --git a/setup_scripts/moteus_install.sh b/setup_scripts/moteus_install.sh deleted file mode 100755 index 4998c4c..0000000 --- a/setup_scripts/moteus_install.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo "lol this script does nothing. Just update your submodules. Do: " -echo "git submoudule update --init --recursive" diff --git a/setup_scripts/rover_env/cbs_env_setup.sh b/setup_scripts/rover_env/cbs_env_setup.sh new file mode 100644 index 0000000..cfe5839 --- /dev/null +++ b/setup_scripts/rover_env/cbs_env_setup.sh @@ -0,0 +1,2 @@ +# this is only for the control base station. +source ${ROVERFLAKE_ROOT}/src/rover_manager/screenScripts/cb_env_variables.sh diff --git a/setup_scripts/rover_env/rover_aliases_common.sh b/setup_scripts/rover_env/rover_aliases_common.sh new file mode 100644 index 0000000..675202f --- /dev/null +++ b/setup_scripts/rover_env/rover_aliases_common.sh @@ -0,0 +1,9 @@ +# all our common aliases. +alias rosbuild="cd ${ROVERFLAKE_ROOT} && colcon build --symlink-install" +alias rosclean="cd ${ROVERFLAKE_ROOT} && rm -rf build/ install/ log/" + + + +# Keyboard layouts for the weirdos +alias colemak="setxkbmap us -variant colemak" +alias qwfpgj="setxkbmap us" \ No newline at end of file diff --git a/setup_scripts/rover_env/rover_env_common.sh b/setup_scripts/rover_env/rover_env_common.sh new file mode 100644 index 0000000..80689b7 --- /dev/null +++ b/setup_scripts/rover_env/rover_env_common.sh @@ -0,0 +1,4 @@ +# During setup, this file is added to your .bashrc via a single line (source rover_env_common.sh) similar to how /opt/ros/humble/setup.bash is added +source ${ROVERFLAKE_ROOT}/setup_scripts/rover_env/rover_aliases_common.sh #Aliases like rosbuild, rosclean etc +source ${ROVERFLAKE_ROOT}/setup_scripts/rover_env/rover_env_vars.sh +source ${ROVERFLAKE_ROOT}/install/setup.bash # Default to sourcing the repo (May mess up if you have multiple ROS2 or ROS repos) \ No newline at end of file diff --git a/setup_scripts/rover_env/rover_env_vars.sh b/setup_scripts/rover_env/rover_env_vars.sh new file mode 100644 index 0000000..982bc8e --- /dev/null +++ b/setup_scripts/rover_env/rover_env_vars.sh @@ -0,0 +1,4 @@ +# All our common enviroment variables +export COLCON_DEFAULTS_FILE="${ROVERFLAKE_ROOT}/colcon.defaults.yaml" + +export RANDOM_INSTALL_FILE_DIR="${ROVERFLAKE_ROOT}/random_install_files" \ No newline at end of file diff --git a/setup_scripts/setup_everything_common.sh b/setup_scripts/setup_everything_common.sh index 7ed5528..dbd9eb4 100755 --- a/setup_scripts/setup_everything_common.sh +++ b/setup_scripts/setup_everything_common.sh @@ -1,4 +1,18 @@ -source $HOME/RoverFlake2/setup_scripts/utils/common.sh + +# ? we can do a script dir, but easier and more explicit just to get the user to define their repo root +# SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +echo $ROVERFLAKE_ROOT + +# check if VAR is unset or empty +if [ -z "${ROVERFLAKE_ROOT}" ]; then + echo "ROVERFLAKE_ROOT is not set (or empty). That makes me really sad." + sleep 2 + echo "Please set the enviroment variable in your bashrc to the root of RoverFlake2/" + exit 1 +fi + + +source $ROVERFLAKE_ROOT/utils/common.sh clear @@ -20,11 +34,10 @@ sleep 1.0 echo starting with ros2... #sudo apt update -cd $HOME/RoverFlake2/setup_scripts/ +cd $ROVERFLAKE_ROOT/setup_scripts/ bash install_dependencies.sh bash install-ros2-humble.sh # also runs apt update, if ros2 is not installed - apt_packages_to_install=( "curl" "git" @@ -53,12 +66,29 @@ for package in "${apt_packages_to_install[@]}"; do fi fi done -cd $HOME/RoverFlake2/ +cd $ROVERFLAKE_ROOT + source /opt/ros/humble/setup.bash #install ros2 packages sudo rosdep init rosdep update -rosdep install --from-paths src -y --ignore-src +bash setup_scripts/install_rosdeps.sh + +# setup user enviroment +mkdir ${ROVERFLAKE_ROOT}/random_install_files +echo "source ${ROVERFLAKE_ROOT}/setup_scripts/rover_env/rover_env_common.sh " >> ~/.bashrc + + +# install libsweep +bash ${ROVERFLAKE_ROOT}/setup_scripts/install_libsweepsdk.sh + + +cd ${ROVERFLAKE_ROOT} +bash setup_scripts/submodule_update.sh + + + + # for package in "${ros_packages_to_install[@]}"; do # if is_package_installed "$package"; then # echo "Package '$package' is already installed." diff --git a/setup_scripts/submodule_update.sh b/setup_scripts/submodule_update.sh new file mode 100755 index 0000000..5b5110f --- /dev/null +++ b/setup_scripts/submodule_update.sh @@ -0,0 +1 @@ +git submodule update --init --recursive diff --git a/setup_scripts/utils/common.sh b/setup_scripts/utils/common.sh index 92502ce..2a9253d 100644 --- a/setup_scripts/utils/common.sh +++ b/setup_scripts/utils/common.sh @@ -1,5 +1,8 @@ - # export ROVERFLAKE_INSTALL_SCRIPTS_UTILS_SOURCED="true" +# Resolve repo root +COMMON_SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +REPO_ROOT="${COMMON_SCRIPT_DIR}/../../" is_package_installed(){ local package_name="$1" diff --git a/src/arm_control/CMakeLists.txt b/src/arm_control/CMakeLists.txt index e023c48..3522498 100644 --- a/src/arm_control/CMakeLists.txt +++ b/src/arm_control/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.10) project(arm_control) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/src/arm_control/package.xml b/src/arm_control/package.xml index 09b5367..24b921d 100644 --- a/src/arm_control/package.xml +++ b/src/arm_control/package.xml @@ -38,6 +38,10 @@ robot_state_publisher tf2_ros + rover_utils + moteus_msgs + + ament_cmake_gtest ament_lint_auto ament_lint_common diff --git a/src/arm_hardware_interface/package.xml b/src/arm_hardware_interface/package.xml index 385dfe5..d1925aa 100644 --- a/src/arm_hardware_interface/package.xml +++ b/src/arm_hardware_interface/package.xml @@ -15,10 +15,11 @@ rclcpp sensor_msgs - serial rover_msgs arm_control + + serial ament_cmake diff --git a/src/aruco_detector/package.xml b/src/aruco_detector/package.xml index 0985d5c..567f1ec 100644 --- a/src/aruco_detector/package.xml +++ b/src/aruco_detector/package.xml @@ -14,8 +14,9 @@ cv_bridge sensor_msgs std_msgs - OpenCV - cv2_aruco + + + ament_lint_auto ament_lint_common diff --git a/src/cameras_cpp/package.xml b/src/cameras_cpp/package.xml index 762e932..6061ca1 100644 --- a/src/cameras_cpp/package.xml +++ b/src/cameras_cpp/package.xml @@ -8,6 +8,8 @@ TODO: License declaration ament_cmake + + rover_utils ament_lint_auto ament_lint_common diff --git a/src/dev_arm_description/CMakeLists.txt b/src/dev_arm_description/CMakeLists.txt index a65c03e..7357197 100644 --- a/src/dev_arm_description/CMakeLists.txt +++ b/src/dev_arm_description/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(dev_arm_description) diff --git a/src/dev_arm_moveit_config_v2/package.xml b/src/dev_arm_moveit_config_v2/package.xml index 7c12560..88cae1d 100644 --- a/src/dev_arm_moveit_config_v2/package.xml +++ b/src/dev_arm_moveit_config_v2/package.xml @@ -42,9 +42,10 @@ rviz_common rviz_default_plugins tf2_ros - warehouse_ros_mongo xacro + + ament_cmake diff --git a/src/external_pkgs/axis_camera b/src/external_pkgs/axis_camera deleted file mode 160000 index a4f75e4..0000000 --- a/src/external_pkgs/axis_camera +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a4f75e4c00b9f71ede1c94f9f973696e7a454e0b diff --git a/src/external_pkgs/camera_info_manager b/src/external_pkgs/camera_info_manager deleted file mode 160000 index 3818203..0000000 --- a/src/external_pkgs/camera_info_manager +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3818203795925ad64619db8cd6171f5b8c19e449 diff --git a/src/external_pkgs/ipcam b/src/external_pkgs/ipcam deleted file mode 160000 index 58d2869..0000000 --- a/src/external_pkgs/ipcam +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 58d286920edaf87bdf7e5fec598f958331b7b6dd diff --git a/src/external_pkgs/ptz_action_server b/src/external_pkgs/ptz_action_server deleted file mode 160000 index 3b8fda3..0000000 --- a/src/external_pkgs/ptz_action_server +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3b8fda3bbcc49e53f37dde92cbe1b44b8b106540 diff --git a/src/ipcamerafeed/CMakeLists.txt b/src/ipcamerafeed/CMakeLists.txt deleted file mode 100644 index c0a2ba1..0000000 --- a/src/ipcamerafeed/CMakeLists.txt +++ /dev/null @@ -1,52 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(ipcamerafeed) - -# Default to C99 -if(NOT CMAKE_C_STANDARD) - set(CMAKE_C_STANDARD 99) -endif() - -# Default to C++14 -if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) -endif() - -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wall -Wextra -Wpedantic) -endif() - -# Find dependencies -find_package(ament_cmake REQUIRED) -find_package(ament_cmake_python REQUIRED) -find_package(rclpy REQUIRED) -find_package(rosidl_default_generators REQUIRED) -find_package(std_msgs REQUIRED) -find_package(std_srvs REQUIRED) -find_package(sensor_msgs REQUIRED) - -# Generate service interfaces -rosidl_generate_interfaces(${PROJECT_NAME} - "srv/SetFloat64.srv" - "srv/SetMovement.srv" - DEPENDENCIES std_msgs -) - -# Install Python modules -ament_python_install_package(${PROJECT_NAME}) - -# Install Python executables -install(PROGRAMS - scripts/ipcamera.py - scripts/ipcamerazoom.py - scripts/pitch_tilt_node.py - DESTINATION lib/${PROJECT_NAME} -) - -# Install launch files -install(DIRECTORY - launch - DESTINATION share/${PROJECT_NAME} -) - -ament_export_dependencies(rosidl_default_runtime) -ament_package() diff --git a/src/ipcamerafeed/LICENSE b/src/ipcamerafeed/LICENSE deleted file mode 100644 index d645695..0000000 --- a/src/ipcamerafeed/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/src/ipcamerafeed/launch/ipcam_launch.launch.py b/src/ipcamerafeed/launch/ipcam_launch.launch.py deleted file mode 100644 index bdb4afe..0000000 --- a/src/ipcamerafeed/launch/ipcam_launch.launch.py +++ /dev/null @@ -1,35 +0,0 @@ -from launch import LaunchDescription -from launch_ros.actions import Node - -def generate_launch_description(): - return LaunchDescription([ - Node( - package='ipcamerafeed', - executable='ipcamera', - name='ipcamera' - ), - Node( - package='ipcamerafeed', - executable='ipcamerazoom', - name='ipcamerazoom' - ), - Node( - package='ipcamerafeed', - executable='pitch_tilt_node', - name='pitch_tilt' - ), - Node( - package='image_publisher', - executable='image_publisher_node', - name='image_publisher', - parameters=[{'filename' : 'rtsp://192.168.0.95/stream0'}] - ), - Node( - package='image_view', - executable='image_view', - name='ipcamera_view', - remappings=[ - ('image', '/image_raw') # image raw ropic from the image publisher - ] - ) - ]) diff --git a/src/ipcamerafeed/package.xml b/src/ipcamerafeed/package.xml deleted file mode 100644 index 8e75113..0000000 --- a/src/ipcamerafeed/package.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - ipcamerafeed - 0.0.1 - ROS 2 package for IP camera RTSP streaming and PTZ control via ONVIF and Serial. - kingcammy - Apache-2.0 - - - ament_cmake - rosidl_default_generators - - - rclpy - sensor_msgs - std_msgs - std_srvs - - - rosidl_default_runtime - rclpy - sensor_msgs - cv_bridge - std_msgs - std_srvs - - - rosidl_interface_packages - - - ament_cmake - - diff --git a/src/ipcamerafeed/resource/ipcamerafeed b/src/ipcamerafeed/resource/ipcamerafeed deleted file mode 100644 index e69de29..0000000 diff --git a/src/ipcamerafeed/scripts/__init__.py b/src/ipcamerafeed/scripts/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/ipcamerafeed/scripts/ipcamera.py b/src/ipcamerafeed/scripts/ipcamera.py deleted file mode 100644 index 05d3dea..0000000 --- a/src/ipcamerafeed/scripts/ipcamera.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python3 - -import rclpy -from rclpy.node import Node -from sensor_msgs.msg import Image -from cv_bridge import CvBridge -import cv2 - - -class IPCameraNode(Node): - def __init__(self): - super().__init__('ip_camera_node') - - # Declare parameters for user, pass, IP, stream path, interface - self.declare_parameter('camera_user', 'admin') - self.declare_parameter('camera_pass', '123456') - self.declare_parameter('camera_ip', '192.168.0.95') - self.declare_parameter('stream_path', 'stream0') - self.declare_parameter('interface', 'eth0') - - self.user = self.get_parameter('camera_user').get_parameter_value().string_value - self.password = self.get_parameter('camera_pass').get_parameter_value().string_value - self.ip = self.get_parameter('camera_ip').get_parameter_value().string_value - self.stream_path = self.get_parameter('stream_path').get_parameter_value().string_value - self.interface = self.get_parameter('interface').get_parameter_value().string_value - - # Dynamically build the RTSP URL - self.camera_url = f'rtsp://{self.user}:{self.password}@{self.ip}/{self.stream_path}' - self.get_logger().info(f'Connecting to camera at: {self.camera_url}') - - # Create publisher - self.publisher_ = self.create_publisher(Image, 'ipcamera/image_raw', 10) - self.bridge = CvBridge() - - # Open video stream - self.cap = cv2.VideoCapture(self.camera_url) - if not self.cap.isOpened(): - self.get_logger().error('Could not open video stream') - - - # Create timer - timer_period = 0.1 # seconds - self.timer = self.create_timer(timer_period, self.timer_callback) - - - def timer_callback(self): - ret, frame = self.cap.read() - if ret: - msg = self.bridge.cv2_to_imgmsg(frame, encoding='bgr8') - self.publisher_.publish(msg) - else: - self.get_logger().warn('Failed to read frame') - -def main(args=None): - rclpy.init(args=args) - node = IPCameraNode() - rclpy.spin(node) - node.destroy_node() - rclpy.shutdown() - -if __name__ == '__main__': - main() diff --git a/src/ipcamerafeed/scripts/ipcamerazoom.py b/src/ipcamerafeed/scripts/ipcamerazoom.py deleted file mode 100644 index 1848bba..0000000 --- a/src/ipcamerafeed/scripts/ipcamerazoom.py +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env python3 - -from onvif import ONVIFCamera -import time -from std_srvs.srv import SetBool, Trigger -from ipcamerafeed.srv import SetFloat64 -import rclpy -from rclpy.node import Node - - -# Camera connection details -CAMERA_IP = '192.168.0.95' -PORT = 80 -USERNAME = 'admin' -PASSWORD = '123456' -ZOOM_DURATION = 1.5 -DEFAULT_SPEED = 0.5 -POLL_INTERVAL = 0.1 - - -# Connects to the cameras ONVIF services. -def get_ptz_service(): - cam = ONVIFCamera(CAMERA_IP, PORT, USERNAME, PASSWORD) - media = cam.create_media_service() - token = media.GetProfiles()[0].token # select the first camera profile - ptz = cam.create_ptz_service() - return ptz, token - - -# Get PTZ status -def get_ptz_status(ptz, token): - status = ptz.GetStatus({'ProfileToken': token}) - print(f"Current PTZ status: {status}") - - -# Sends a continuous zoom command to the camera. -# speed -1 to 1 -# duration: how many seconds to keep zooming -def zoom(ptz, token, speed, duration=ZOOM_DURATION): - """Zoom in or out for a given duration and speed.""" - req = ptz.create_type('ContinuousMove') - req.ProfileToken = token - req.Velocity = {'Zoom': {'x': speed}} - ptz.ContinuousMove(req) - time.sleep(duration) - ptz.Stop({'ProfileToken': token}) - -class PTZZoomNode(Node): - """ - To zoom in: - ros2 service call /zoom std_srvs/srv/SetBool "{data: true}" - To zoom in: - ros2 service call /zoom std_srvs/srv/SetBool "{data: false}" - To stop (to be honest I dont even know if this works lol ^ those work tho): - ros2 service call /stop_zoom std_srvs/srv/Trigger "{}" - To change zoom duration: - ros2 service call /zoom_duration ipcamerafeed/srv/SetFloat64 "{data: 6.9}" - """ - def __init__(self): - super().__init__('ptz_zoom_node') - self.ptz, self.token = get_ptz_service() - self.get_logger().info('PTZ Zoom node started. Use ← / → or ESC to exit.') - - # Asign service [type] to methods for zooming in/out and stopping - self.zoom_srvs = self.create_service(SetBool, 'zoom', self.zoom) - self.zoom_duration_srvs = self.create_service(SetFloat64, 'zoom_duration', self.zoom_duration) - self.stop_srvs = self.create_service(Trigger, 'stop_zoom', self.stop) - - def zoom(self, request, response): - # Service is bool, T for in, F for out - if request.data: - self.get_logger().info('Zooming in') - zoom(self.ptz, self.token, DEFAULT_SPEED) - else: - self.get_logger().info('Zooming out') - zoom(self.ptz, self.token, -DEFAULT_SPEED) - - # Service feedback - response.success = True - response.message = 'Zoom cmd complete' - return response - - def zoom_duration(self, request, response): - if request.data > 0: - ZOOM_DURATION = request.data - response.success = True - response.message = f'Zoom duration set to {ZOOM_DURATION}' - self.get_logger().info(response.message) - else: - response.success = False - response.message = "Duration > 0" - return response - - def stop(self, request, response): - self.get_logger().info('Stopping zoom...') - self.ptz.Stop({'ProfileToken': self.token}) - response.success = True - response.message = 'Zoom stopped' - return response - -def main(args=None): - rclpy.init(args=args) - node = PTZZoomNode() - try: - rclpy.spin(node) - except KeyboardInterrupt: - node.get_logger().info('Keyboard interrupt received, shutting down.') - finally: - node.destroy_node() - rclpy.shutdown() - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/src/ipcamerafeed/scripts/pitch_tilt_node.py b/src/ipcamerafeed/scripts/pitch_tilt_node.py deleted file mode 100644 index f33c849..0000000 --- a/src/ipcamerafeed/scripts/pitch_tilt_node.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python3 - -import rclpy -from rclpy.node import Node -from ipcamerafeed.srv import SetMovement -import serial - -class PTZPitchTiltNode(Node): - """ - To pitch (DATA IN DEGREES): - ros2 service call /pitch ipcamerafeed/srv/SetFloat64 "{data: 30.0}" - To tilt (DATA IN DEGREES): - ros2 service call /tilt ipcamerafeed/srv/SetFloat64 "{data: 30.0}" - """ - def __init__(self): - super().__init__('pitch_tilt_node') - - # Serial port stuff - self.declare_parameter('serial_port', '/dev/ttyUSB0') - self.declare_parameter('baud_rate', 115200) - - # Get parameter values - port = self.get_parameter('serial_port').get_parameter_value().string_value - baud = self.get_parameter('baud_rate').get_parameter_value().integer_value - - # Serial connection - try: - self.ser = serial.Serial(port, baudrate=baud, timeout=1) - self.get_logger().info('Serial conn for PT') - except serial.SerialException as e: - self.get_logger().error(f'Failed to open serial port: {e}') - self.ser = None - - # Assign service for tilting and zoom - self.pitch_srvs = self.create_service(SetMovement, 'pitch', self.pitch) - self.tilt_srvs = self.create_service(SetMovement , 'tilt', self.tilt) - - def pitch(self, request, response): - if self.ser is not None: - cmd = f'C {request.data}\r\n' - self.ser.write(cmd.encode()) - resp = self.ser.read_until(b'\n').decode('utf-8') # retrive positional msg - response.data = request.data - response.msg = resp - else: - response.data = -1.0 - response.msg = 'Null' - return response - - def tilt(self, request, response): - if self.ser is not None: - cmd = f'P {request.data}\r\n' - self.ser.write(cmd.encode()) - resp = self.ser.read_until(b'\n').decode('utf-8') # retrive positional msg - response.data = request.data - response.msg = resp - else: - response.data = -1.0 - response.msg = 'Null' - return response - -def main(args=None): - rclpy.init(args=args) - node = PTZPitchTiltNode() - try: - rclpy.spin(node) - except KeyboardInterrupt: - node.get_logger().info('Keyboard interrupt received, shutting down.') - finally: - if node.ser and node.ser.is_open: - node.ser.close() - node.get_logger().info("Serial connection closed.") - node.destroy_node() - rclpy.shutdown() - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/src/ipcamerafeed/setup.cfg b/src/ipcamerafeed/setup.cfg deleted file mode 100644 index e9d8a6d..0000000 --- a/src/ipcamerafeed/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script_dir=$base/lib/ipcamerafeed -[install] -install_scripts=$base/lib/ipcamerafeed diff --git a/src/ipcamerafeed/srv/SetFloat64.srv b/src/ipcamerafeed/srv/SetFloat64.srv deleted file mode 100644 index 7a332a2..0000000 --- a/src/ipcamerafeed/srv/SetFloat64.srv +++ /dev/null @@ -1,3 +0,0 @@ -float64 data ---- -float64 data diff --git a/src/ipcamerafeed/srv/SetMovement.srv b/src/ipcamerafeed/srv/SetMovement.srv deleted file mode 100644 index 121cca4..0000000 --- a/src/ipcamerafeed/srv/SetMovement.srv +++ /dev/null @@ -1,4 +0,0 @@ -float64 data ---- -float64 data -string msg \ No newline at end of file diff --git a/src/ipcamerafeed/srv/__init__.py b/src/ipcamerafeed/srv/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/ipcamerafeed/test/test_copyright.py b/src/ipcamerafeed/test/test_copyright.py deleted file mode 100644 index 97a3919..0000000 --- a/src/ipcamerafeed/test/test_copyright.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from ament_copyright.main import main -import pytest - - -# Remove the `skip` decorator once the source file(s) have a copyright header -@pytest.mark.skip(reason='No copyright header has been placed in the generated source file.') -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=['.', 'test']) - assert rc == 0, 'Found errors' diff --git a/src/ipcamerafeed/test/test_flake8.py b/src/ipcamerafeed/test/test_flake8.py deleted file mode 100644 index 27ee107..0000000 --- a/src/ipcamerafeed/test/test_flake8.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2017 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from ament_flake8.main import main_with_errors -import pytest - - -@pytest.mark.flake8 -@pytest.mark.linter -def test_flake8(): - rc, errors = main_with_errors(argv=[]) - assert rc == 0, \ - 'Found %d code style errors / warnings:\n' % len(errors) + \ - '\n'.join(errors) diff --git a/src/ipcamerafeed/test/test_pep257.py b/src/ipcamerafeed/test/test_pep257.py deleted file mode 100644 index b234a38..0000000 --- a/src/ipcamerafeed/test/test_pep257.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from ament_pep257.main import main -import pytest - - -@pytest.mark.linter -@pytest.mark.pep257 -def test_pep257(): - rc = main(argv=['.', 'test']) - assert rc == 0, 'Found code style errors / warnings' diff --git a/src/odom_to_tf_ros2 b/src/odom_to_tf_ros2 deleted file mode 160000 index 00f9f47..0000000 --- a/src/odom_to_tf_ros2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 00f9f477b0a3f157d0fbbb3c220d06169bf6c801 diff --git a/src/ptz_cam/package.xml b/src/ptz_cam/package.xml index 9889c4a..4ce869b 100644 --- a/src/ptz_cam/package.xml +++ b/src/ptz_cam/package.xml @@ -16,7 +16,10 @@ cv_bridge python3-opencv python3-serial - onvif-zeep + + + + ament_python diff --git a/src/ptz_camera/CMakeLists.txt b/src/ptz_camera/CMakeLists.txt deleted file mode 100644 index ad48934..0000000 --- a/src/ptz_camera/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(ptz_camera) - -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wall -Wextra -Wpedantic) -endif() - -# find dependencies -find_package(ament_cmake REQUIRED) -# uncomment the following section in order to fill in -# further dependencies manually. -# find_package( REQUIRED) -# Find dependencies -find_package(ament_cmake REQUIRED) -find_package(ament_cmake_python REQUIRED) -find_package(rclpy REQUIRED) -find_package(std_msgs REQUIRED) -find_package(sensor_msgs REQUIRED) -find_package(geometry_msgs REQUIRED) -# Install Python modules -ament_python_install_package(${PROJECT_NAME}) - -# Install Python executables -install(PROGRAMS - scripts/ipcamera.py - scripts/ipcamerazoom.py - scripts/pitch_tilt_node.py - DESTINATION lib/${PROJECT_NAME} -) - -# Install launch files -install(DIRECTORY - launch - DESTINATION share/${PROJECT_NAME} -) - - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - # the following line skips the linter which checks for copyrights - # comment the line when a copyright and license is added to all source files - set(ament_cmake_copyright_FOUND TRUE) - # the following line skips cpplint (only works in a git repo) - # comment the line when this package is in a git repo and when - # a copyright and license is added to all source files - set(ament_cmake_cpplint_FOUND TRUE) - ament_lint_auto_find_test_dependencies() -endif() - -ament_package() diff --git a/src/ptz_camera/launch/ipcam_launch.launch.py b/src/ptz_camera/launch/ipcam_launch.launch.py deleted file mode 100644 index ecfe682..0000000 --- a/src/ptz_camera/launch/ipcam_launch.launch.py +++ /dev/null @@ -1,35 +0,0 @@ -from launch import LaunchDescription -from launch_ros.actions import Node - -def generate_launch_description(): - return LaunchDescription([ - Node( - package='ptz_camera', - executable='ipcamera', - name='ipcamera' - ), - Node( - package='ptz_camera', - executable='ipcamerazoom', - name='ipcamerazoom' - ), - Node( - package='ptz_camera', - executable='pitch_tilt_node', - name='pitch_tilt' - ), - Node( - package='image_publisher', - executable='image_publisher_node', - name='image_publisher', - parameters=[{'filename' : 'rtsp://192.168.0.95/stream0'}] - ), - Node( - package='image_view', - executable='image_view', - name='ipcamera_view', - remappings=[ - ('image', '/image_raw') # image raw ropic from the image publisher - ] - ) - ]) diff --git a/src/ptz_camera/package.xml b/src/ptz_camera/package.xml deleted file mode 100644 index d296caa..0000000 --- a/src/ptz_camera/package.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - ptz_camera - 0.0.0 - TODO: Package description - rv - TODO: License declaration - - - ament_cmake - - - ament_cmake_python - rclpy - sensor_msgs - std_msgs - - - ament_cmake_python - rclpy - sensor_msgs - cv_bridge - std_msgs - geometry_msgs - - - ament_cmake - - diff --git a/src/ptz_camera/ptz_camera/__init__.py b/src/ptz_camera/ptz_camera/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/ptz_camera/scripts/__init__.py b/src/ptz_camera/scripts/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/ptz_camera/setup.py b/src/ptz_camera/setup.py deleted file mode 100644 index cc27466..0000000 --- a/src/ptz_camera/setup.py +++ /dev/null @@ -1,35 +0,0 @@ -from setuptools import setup -import os -from glob import glob - -package_name = 'ptz_camera' - -setup( - name=package_name, - version='0.1.0', - packages=[package_name], - py_modules=[ - 'ipcamera', - 'ipcamerazoom', - 'pitch_tilt_node', - ], - data_files=[ - ('share/ament_index/resource_index/packages', ['resource/' + package_name]), - ('share/' + package_name, ['package.xml']), - (os.path.join('share', package_name, 'launch'), glob('launch/*.launch.py')), - ], - install_requires=['setuptools'], - zip_safe=True, - maintainer='YOUR_NAME', - maintainer_email='your@email.com', - description='PTZ camera control node for ROS 2', - license='TODO: License declaration', - tests_require=['pytest'], - entry_points={ - 'console_scripts': [ - 'ipcamera = ipcamera:main', - 'ipcamerazoom = ipcamerazoom:main', - 'pitch_tilt_node = pitch_tilt_node:main', - ], - }, -) diff --git a/src/rover_gnss/package.xml b/src/rover_gnss/package.xml index 62b296c..1881230 100644 --- a/src/rover_gnss/package.xml +++ b/src/rover_gnss/package.xml @@ -8,8 +8,10 @@ TODO: License declaration rclpy - pyserial - pynmea2 + + + + ament_copyright ament_flake8 diff --git a/src/rover_hmi/CMakeLists.txt b/src/rover_hmi/CMakeLists.txt index d91d530..87c43ba 100644 --- a/src/rover_hmi/CMakeLists.txt +++ b/src/rover_hmi/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.10) project(rover_hmi) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/src/rover_launchers/CMakeLists.txt b/src/rover_launchers/CMakeLists.txt index c0582e5..be214b0 100644 --- a/src/rover_launchers/CMakeLists.txt +++ b/src/rover_launchers/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.10) project(rover_launchers) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/src/rover_manager/package.xml b/src/rover_manager/package.xml index c6ba4c9..32ccd33 100644 --- a/src/rover_manager/package.xml +++ b/src/rover_manager/package.xml @@ -14,10 +14,8 @@ rclcpp rover_msgs - serial - - - + serial + rover_utils ament_cmake diff --git a/src/rover_navigate/CMakeLists.txt b/src/rover_navigate/CMakeLists.txt index f00b034..b5c4f50 100644 --- a/src/rover_navigate/CMakeLists.txt +++ b/src/rover_navigate/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.10) project(rover_navigate) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/src/rover_samples/rv_sample_package/package.xml b/src/rover_samples/rv_sample_package/package.xml index 2167218..42aa5f8 100644 --- a/src/rover_samples/rv_sample_package/package.xml +++ b/src/rover_samples/rv_sample_package/package.xml @@ -12,6 +12,8 @@ ament_lint_auto ament_lint_common + rover_utils + rclcpp sensor_msgs diff --git a/src/rover_sounds/CMakeLists.txt b/src/rover_sounds/CMakeLists.txt index 11b36fd..21d2ad0 100644 --- a/src/rover_sounds/CMakeLists.txt +++ b/src/rover_sounds/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.10) project(rover_sounds) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/src/rover_sounds/package.xml b/src/rover_sounds/package.xml index 8769ace..01d936f 100644 --- a/src/rover_sounds/package.xml +++ b/src/rover_sounds/package.xml @@ -13,7 +13,9 @@ ament_lint_common rclcpp std_msgs - amment_index_cpp + + + ament_cmake diff --git a/src/rover_utils/CMakeLists.txt b/src/rover_utils/CMakeLists.txt index da51d22..cc0340f 100644 --- a/src/rover_utils/CMakeLists.txt +++ b/src/rover_utils/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.10) project(rover_utils) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/src/rover_utils/package.xml b/src/rover_utils/package.xml index e103b1f..c1530c1 100644 --- a/src/rover_utils/package.xml +++ b/src/rover_utils/package.xml @@ -8,6 +8,8 @@ TODO: License declaration ament_cmake + rclcpp + rclcpp ament_lint_auto ament_lint_common diff --git a/src/rover_vision/package.xml b/src/rover_vision/package.xml index 9916f2d..d32356f 100644 --- a/src/rover_vision/package.xml +++ b/src/rover_vision/package.xml @@ -24,7 +24,9 @@ python3-opencv python3-numpy librealsense2 - geopy + + + diff --git a/src/science_gsensor/package.xml b/src/science_gsensor/package.xml index 437004e..d7ae6f3 100644 --- a/src/science_gsensor/package.xml +++ b/src/science_gsensor/package.xml @@ -14,10 +14,13 @@ rclpy std_msgs - pyserial python3-matplotlib python3-serial + + + + ament_python