Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9b7f68d
The docker-compose builds, so that has to count for something?
Hermanoid Oct 2, 2024
50bb546
The Github CI fun begins
Hermanoid Oct 9, 2024
6a83d81
Oops basestation is wierd
Hermanoid Oct 9, 2024
1c21ca0
deleted raylib build and shifted apt packages
Sodapop465 Oct 9, 2024
bf5199a
Merge branch 'docker_compose' of https://github.com/Colorado-School-o…
Sodapop465 Oct 9, 2024
ad401b8
YEET RAYLIB (sorry nora)
Hermanoid Oct 9, 2024
575975c
Many yeeting changes, need to be tested :)
Hermanoid Oct 9, 2024
084526b
I do believe the CI is cooking
Hermanoid Oct 23, 2024
f32d07b
Oops
Hermanoid Oct 23, 2024
96a6b7b
Yeet driverstation_ui (deleting code to make build pass 👍)
Hermanoid Oct 23, 2024
66cb6b8
Why is git submodules being dumb
Hermanoid Oct 23, 2024
2705722
GAH NOTHING WORKS
yameatmeyourdead Feb 6, 2025
9894fe4
add amd64 target
yameatmeyourdead Feb 6, 2025
fb4f607
Merge branch 'main' into fix-ci
yameatmeyourdead Feb 6, 2025
d9b9d8b
it builds?
yameatmeyourdead Feb 13, 2025
b5b8812
create dummy stream
yameatmeyourdead Feb 13, 2025
e6ca59b
fix to make it build on hardware
yameatmeyourdead Feb 13, 2025
4cdd9a5
Merge branch 'camera-4.0' of https://github.com/CSMRobotics/MATE into…
yameatmeyourdead Feb 13, 2025
f71d5e4
actually make the test server work
yameatmeyourdead Feb 13, 2025
ba63605
Merge branch 'camera-4.0' of https://github.com/CSMRobotics/MATE into…
yameatmeyourdead Feb 13, 2025
63cdec6
cameras actually work now. MIPI pipelines untested atm
yameatmeyourdead Feb 13, 2025
563b942
Replace old rov_cameras with new; some other "cleaning"
Hermanoid Feb 20, 2025
30cdc1a
Shuffling some images (untested teehee)
Hermanoid Feb 20, 2025
51bd70f
Fixed the amd build
Hermanoid Feb 20, 2025
d78fdc6
Fix merge conflicts between fix-ci and main
Hermanoid Feb 20, 2025
1953d12
Merge branch 'fix-ci' into camera-4.0
Hermanoid Feb 20, 2025
5a19220
Add gstreamer dependencies and get building
Hermanoid Feb 20, 2025
004eaef
removed submodules permanently, should fix CI warning
yameatmeyourdead Feb 21, 2025
835ab7a
thanks vim for vomiting swap files in my directories i really appreci…
yameatmeyourdead Feb 21, 2025
3d6a03f
lower latency streams and less cpu usage
yameatmeyourdead Mar 6, 2025
8faee3f
ROS Parameter-afy the camera streams.
Hermanoid Mar 6, 2025
0b150d1
Print the name of the sensor stream in cameras.cpp
Hermanoid Mar 27, 2025
339c76e
Merge branch 'camera-4.0' of https://github.com/CSMRobotics/MATE into…
Hermanoid Mar 27, 2025
c554efb
Somebody forgot to add the config file to the launch file
Hermanoid Apr 17, 2025
9e41ce3
I'm sure we don't need these packages in the launch file
yameatmeyourdead May 1, 2025
abd8b37
Merge branch 'main' into camera-4.0
Hermanoid May 1, 2025
483cbca
I commented too close to the sun
Hermanoid May 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile.rov
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ RUN add-apt-repository universe && apt-get update && \
libgtk-3-dev \
libgtk2.0-dev \
gstreamer1.0-x && \
# install v4l2
apt-get install -y libv4l-dev v4l-utils && \
apt-get install -y libopenjp2-7 \
libopenjp2-7-dev \
Expand Down
3 changes: 2 additions & 1 deletion libraries.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
OpenCV4 >= 4.2
Eigen3 >= 3.3.7
Eigen3 >= 3.3.7
libi2c >= 4.3
Empty file removed src/rov/.run_docker.sh.swo
Empty file.
70 changes: 28 additions & 42 deletions src/rov/rov_cameras/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,66 +1,52 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.8)
project(rov_cameras)

# 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(DEBUG_OUTPUT)
add_compile_definitions(DEBUG_OUTPUT=true)
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(rov_interfaces REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(compressed_image_transport REQUIRED)
find_package(OpenCV REQUIRED)

add_executable(rov_cameras src/main.cpp src/mjpeg_camera.cpp src/h264_camera.cpp src/camera_to_file.cpp)
find_package(PkgConfig REQUIRED)
pkg_search_module(GST REQUIRED gstreamer-1.0>=1.4
gstreamer-sdp-1.0>=1.4
gstreamer-video-1.0>=1.4
gstreamer-app-1.0>=1.4)
pkg_search_module(GST_RTSP REQUIRED gstreamer-rtsp-server-1.0)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)

add_executable(rov_cameras src/cameras.cpp src/main.cpp)
target_include_directories(rov_cameras PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
${OpenCV_INCLUDE_DIRS})
ament_target_dependencies(
rov_cameras
"rclcpp"
"sensor_msgs"
"std_msgs"
"cv_bridge"
"compressed_image_transport"
$<INSTALL_INTERFACE:include>)
target_compile_features(rov_cameras PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
target_include_directories(rov_cameras PRIVATE ${GST_INCLUDE_DIRS} ${GST_RTSP_INCLUDE_DIRS})
target_link_libraries(rov_cameras ${GST_LIBRARIES} ${GST_RTSP_LIBRARIES} gstrtsp-1.0 gstsdp-1.0 gstreamer-1.0 gio-2.0 gobject-2.0 glib-2.0)

ament_target_dependencies(rov_cameras
rclcpp
rov_interfaces
)

target_link_libraries(rov_cameras ${OpenCV_LIBS} udev pthread)

install(TARGETS rov_cameras
DESTINATION lib/${PROJECT_NAME})

install(DIRECTORY include/
DESTINATION include/)

install(DIRECTORY launch/
DESTINATION share/${PROJECT_NAME})
install(DIRECTORY config/
DESTINATION share/${PROJECT_NAME}/config)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights
# uncomment the line when a copyright and license is not present in all source files
#set(ament_cmake_copyright_FOUND TRUE)
# 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)
# uncomment the line when this package is not in a git repo
#set(ament_cmake_cpplint_FOUND TRUE)
# 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()

Expand Down
13 changes: 13 additions & 0 deletions src/rov/rov_cameras/config/params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
rov_cameras:
ros__parameters:
# cameras: ["test", "front", "transect"]
cameras: ["test"]
test:
port: "8809"
pipeline: videotestsrc is-live=true ! x264enc speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0 pt=96
front:
port: "8554"
pipeline: nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM),width=1920,height=1080 ! nvvidconv ! nvv4l2h264enc ! h264parse ! rtph264pay name=pay0 pt=96
transect:
port: "8555"
pipeline: nvarguscamerasrc sensor-id=1 ! video/x-raw(memory:NVMM),width=1920,height=1080 ! nvvidconv ! nvv4l2h264enc ! h264parse ! rtph264pay name=pay0 pt=96
19 changes: 0 additions & 19 deletions src/rov/rov_cameras/include/rov_cameras/camera_to_file.hpp

This file was deleted.

52 changes: 52 additions & 0 deletions src/rov/rov_cameras/include/rov_cameras/cameras.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#ifndef CAMERAS_HPP
#define CAMERAS_HPP

#include "gst/gst.h"

#include <cstdint>
#include <thread>
#include <unordered_map>

#include <rclcpp/rclcpp.hpp>

struct CameraConfig {
std::string id;
std::string port;
std::string pipeline;
};

class Camera {
public:
Camera() = default;
Camera(int argc, char **argv, CameraConfig sensorConfig);

private:
void run_rtsp_stream(int argc, char **argv, CameraConfig sensorConfig);

std::thread gst_rtsp_server_thread;
};

class CameraManager {
public:
static CameraManager *getInstance(int argc, char **argv);

bool addCamera(CameraConfig sensorConfig);

private:
CameraManager(int argc, char **argv);

int argc;
char **argv;

std::unordered_map<std::string, Camera> cameras;
};

class CameraNode : public rclcpp::Node {
public:
CameraNode(int argc, char **argv);

private:
CameraManager *manager;
};

#endif
100 changes: 0 additions & 100 deletions src/rov/rov_cameras/include/rov_cameras/enumerate_cameras.hpp

This file was deleted.

34 changes: 0 additions & 34 deletions src/rov/rov_cameras/include/rov_cameras/h264_camera.hpp

This file was deleted.

27 changes: 0 additions & 27 deletions src/rov/rov_cameras/include/rov_cameras/mjpeg_camera.hpp

This file was deleted.

8 changes: 0 additions & 8 deletions src/rov/rov_cameras/launch/rov_cameras_launch.py

This file was deleted.

12 changes: 3 additions & 9 deletions src/rov/rov_cameras/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rov_cameras</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<version>1.0.0</version>
<description>Configurable node which uses GStreamer and Nvidia Acceleration (targetting the Orin) to expose cameras over RTSP</description>
<maintainer email="zac71113@gmail.com">yameat</maintainer>
<license>TODO: License declaration</license>

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>rclcpp</depend>
<depend>sensor_msgs</depend>
<depend>std_msgs</depend>
<depend>cv_bridge</depend>
<depend>compressed_image_transport</depend>
<depend>h264_msgs</depend>
<depend>opencv2</depend>
<depend>rov_interfaces</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
Expand Down
Loading
Loading