Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Go2 front camera support #10

Open
mspringer1 opened this issue Jul 12, 2024 · 5 comments
Open

Feature: Go2 front camera support #10

mspringer1 opened this issue Jul 12, 2024 · 5 comments

Comments

@mspringer1
Copy link

Hey,

based on the Go2 SDK Multimedia Service Interface (https://support.unitree.com/home/en/developer/Multimedia_Services) it would be possible to add video from the front camera to the go2_driver as sensor_msgs/CompressedImage.

A reference implementation is given under Video streaming

#include <opencv2/opencv.hpp>
using namespace cv;

#include <iostream>
using namespace std;

int main()
{

  VideoCapture cap("udpsrc address=230.1.1.1 port=1720 multicast-iface=<interface_name> ! application/x-rtp, media=video, encoding-name=H264 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! video/x-raw,width=1280,height=720,format=BGR ! appsink drop=1", 
            CAP_GSTREAMER);
    
  if (!cap.isOpened()) {
        cerr <<"VideoCapture not opened"<<endl;
        exit(-1);
    }
    
    while (true) {

        Mat frame;

        cap.read(frame);

        imshow("receiver", frame);

        if (waitKey(1) == 27) {
            break;
        }
    }

    return 0;
@Juancams
Copy link
Collaborator

Hello @mspringer1

Following the example shown by unitree, in a few weeks the video from the camera that is integrated into the go2_driver will be implemented.

Regarding how to publish it, we had planned to use image_transport.

@mspringer1
Copy link
Author

Hey @Juancams

there is also already a ros2 node written in rust for that: https://github.com/tfoldi/ros2_go2_video

@Juancams
Copy link
Collaborator

Yes, I know that code, but the idea is to reimplement it in c++ and not use anything from webrtc.

@tfoldi
Copy link

tfoldi commented Nov 5, 2024

you can use any gstreamer based ros2 node to add video feed without doing webrtc

@tfoldi
Copy link

tfoldi commented Dec 19, 2024

added native video support via #24

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

No branches or pull requests

3 participants