Skip to content

Video poor quality fixes#92

Merged
ConnorNeed merged 4 commits intomainfrom
video-poor-quality-fixes
Apr 12, 2026
Merged

Video poor quality fixes#92
ConnorNeed merged 4 commits intomainfrom
video-poor-quality-fixes

Conversation

@ConnorNeed
Copy link
Copy Markdown
Member

Some fixes from today:

  1. Adds a debug tool built into gstreamer for easier access to the pipeline graphs
  2. Ensures that the videos remain a constant resolution unless explicitly scaled
  3. Fixes more FEC bugs in the video streaming
  4. Ensures Eileen doesn't drive away in the event of a network disruption

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets video streaming stability/quality by improving GStreamer pipeline configuration, adding a ROS2 service to export pipeline graphs for debugging, tightening RTP/FEC configuration, and adding a drivetrain command timeout to prevent runaway behavior during network disruptions.

Changes:

  • Added GraphDot ROS2 service and hooked it into BaseVideoNode to return a GStreamer DOT graph of the current pipeline.
  • Updated RTP sender/receiver GStreamer pipeline strings (payload types, encoder settings, and FEC-related elements).
  • Adjusted video compositor pipeline to keep a consistent output size and added per-camera caps overrides; added a chassis controller cmd_timeout.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/URDF/rover_urdf/config/ros2_controllers.yaml Sets non-zero cmd_timeout to stop motion on command loss.
src/interfaces/srv/GraphDot.srv Introduces new service definition for returning pipeline DOT graph text.
src/interfaces/CMakeLists.txt Registers the new service for ROSIDL generation.
src/Cameras/video_streaming/src/rtp_node.cpp Updates RTP sender pipeline: explicit PTs and encoder/FEC property tweaks; adjusts bitrate→resolution threshold.
src/Cameras/video_streaming/src/rtp_client_node.cpp Updates RTP receiver pipeline: adds demux/capsfilter and sets explicit FEC PT.
src/Cameras/video_streaming/src/input_node.cpp Forces a stable compositor sink_0 size via a black test source; adds per-camera width/height/framerate parameters; fixes sink pad indexing.
src/Cameras/video_streaming/src/base_video_node.cpp Adds ~/graph_dot service to export pipeline DOT graph.
src/Cameras/video_streaming/launch/video_streaming.launch.py Changes RTP destination IP in launch configuration.
src/Cameras/video_streaming/include/video_streaming/base_video_node.hpp Declares GraphDot service member and includes the generated interface header.
src/Cameras/video_streaming/config/cameras.yaml Adds explicit Drive camera caps (width/height/framerate) and encoded flag.
Comments suppressed due to low confidence (1)

src/Cameras/video_streaming/src/input_node.cpp:159

  • In the error path where the compositor pad can't be retrieved (see the subsequent if (!pad) block), the function returns without gst_object_unref(compositor), leaking the compositor reference. Ensure the compositor is unref'd on all early-return paths (e.g., unref before returning or use an RAII guard).
    std::string pad_name = "sink_" + std::to_string(i + 1);
    GstPad *pad = gst_element_get_static_pad(compositor, pad_name.c_str());
    if (!pad) {
      RCLCPP_ERROR(this->get_logger(), "Failed to get compositor pad: %s",
                   pad_name.c_str());

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Cameras/video_streaming/src/base_video_node.cpp
Comment thread src/Cameras/video_streaming/src/base_video_node.cpp
Comment thread src/Cameras/video_streaming/launch/video_streaming.launch.py
Comment thread src/interfaces/srv/GraphDot.srv Outdated
@ConnorNeed ConnorNeed force-pushed the video-poor-quality-fixes branch from d3e8d8b to f9e068e Compare April 12, 2026 21:07
@ConnorNeed ConnorNeed merged commit 5f716f1 into main Apr 12, 2026
@ConnorNeed ConnorNeed deleted the video-poor-quality-fixes branch April 12, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants