-
Notifications
You must be signed in to change notification settings - Fork 539
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
Haoquan/rtp video stream control #308
base: master
Are you sure you want to change the base?
Conversation
I am trying to run the new branch. One thing I noticed running the main app:
D/AndroidRuntime: Shutting down VM |
Is the new python script called "joystick_controller.py"? I cannot test it since I do not have a joystick. Is it a particular joystick model that works with it? I am wondering if the RTP stream would still be useful with keyboard-only controller, since most people do not have joystick. |
In my opinion, having also a keyboard controller would be useful. |
} | ||
|
||
public String[] getVideoServerAddress() { | ||
String ip = get("ip", "172.217.22.14"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have some neutral IP as default or just something like N/A if no server is setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to "127.0.0.1"
@@ -80,6 +80,9 @@ dependencies { | |||
implementation 'com.github.pedroSG94:RTSP-Server:1.0.8' | |||
implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.0.2' | |||
|
|||
//RTP Client | |||
implementation 'com.github.ar-android:libstreaming:1.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use the original library.
https://github.com/fyhertz/libstreaming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the original library in the beginning. However, the official libstreaming published on jitpack is the very old version, and they didn't publish their latest version. I'm not sure if there is another way around. Do you have any idea?
|
||
Controller mapping | ||
``` | ||
▲: autodrive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the BT joystick, autopilot is on R1, data logging on X. Let's be consistent. Triangle, square and circle are for the indicators.
@haoquan on what OS did you test this? On Mac I'm unable to install
|
Also, what kind of latency are you getting with RTP for the video stream? |
@haoquan, after further testing I also encountered frequent app crashes.
Did you not face these app crashes? |
I have fixed this issue. Check out the latest commit |
I fixed the issue. Check out the latest commit |
Yes. It should work with major bluetooth joystick controllers like PS4, and xbox and etc. |
I developed and tested everything on a Linux computer. Unfortunately |
I tested it on a Linux computer. The latency is about 150ms on average. It could vary depending on your network condition. |
That is pretty good response time. I will check it out. Can I run the app and see the video without a Joystick? |
OK, the code works with RTP selected, but it crashes if we select WebRTC, and then select Free Roam fragment. RTSP does not crash. |
Fixed it. There was a type with webrtc. |
Yes. You can run |
This works at least in Linux. I'm not sure about Mac. Getting GStreamer, opencv and python to work together on Mac needs some work |
I compiled OpenCV with GStreamer support on Mac, but when I try to run the camera, I get the following error.
@izivkov did you manage to get this running under Linux? |
No, I got the same error. I never got video to work with the new Python
script. I thought it was something wrong with my configuration.
…On Wed., Dec. 28, 2022, 5:47 a.m. thias15, ***@***.***> wrote:
I compiled OpenCV with GStreamer support on Mac, but when I try to run the
camera, I get the following error.
Failed to open camera
Src opened, 0x0 @ 0 fps
@izivkov <https://github.com/izivkov> did you manage to get this running
under Linux?
—
Reply to this email directly, view it on GitHub
<#308 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7M37RZMKFEDBNHXTSFSO3WPQLDNANCNFSM6AAAAAASJLNUYQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@hq286 any idea what we are doing wrong? |
It's the problem of GStreamer pipeline configuration. This configuration works in Ubuntu 20.04. I need to investigate the configuration on MacBook |
How did you install OpenCV? Can you try the script I added to the repo? Make sure to install GStreamer before. |
@thias15 What is the name of your "install OpenCV" script and what branch is it in? |
I pushed it to this PR, it's called install_opencv.sh |
@izivkov any update on your end? |
By the way, I think we should also unify the port setting, at least for the controller across the different scripts. |
I installed GStreamer and OpenCV using your installation script on my Linux PC but did not see video. Basically, the Video Window never appears. I used the following command:
Maybe it is my PC - only a Celaron CPU. I'm not sure if it needs a more powerful GPU. Also, I'm not that familiar with GStreamer and OpenCV, so I may be doing some incorrectly. |
Built a new remote python controller with low latency RTP video stream for mobile network connection. New python controller supports autopilot, recording, without crashing remote video stream.