Skip to content

Conversation

izivkov
Copy link
Contributor

@izivkov izivkov commented Dec 11, 2021

Adder Node.js based controller. Some minor fixes to main android app.

@izivkov
Copy link
Contributor Author

izivkov commented Dec 17, 2021

Sorry for the multiple commits. I was trying to squish all commits together.

@thias15
Copy link
Collaborator

thias15 commented Dec 17, 2021

@izivkov, is this ready for review or are you still working on it?

Copy link
Collaborator

@thias15 thias15 left a comment

Choose a reason for hiding this comment

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

Looks good, need to test.

If possible, it would be good to reduce the image size by saving as jpg.

I wonder if it makes sense to remove the RTSP connection in the controller app to reduce the apk size. Or do you see any benefit in using the RTSP connection over WebRTC?


private fun onDataReceived(data: String) {
setOnOffStateConditions(data)
// private fun onDataReceived(data: String) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this function commented out? Since it is not used, is there value in keeping it in the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved the handling and the "mute" and "mirror" button to the client side. Before that, we would send a message to the server (main Android app), and the server will disable sound. This has some advantages, but it is cumbersome, and less reliable. For RTSP, initially I could not figure out how to mute the sound on the client, so I removed the speaker icon completely. I later figured it out, so this function is no longer needed. I have removed the commented code.

@@ -0,0 +1,3 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this file needed?

@@ -0,0 +1,16 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this file needed? Wouldn't it be automatically generated by users that install eslint. Or are there specific settings different from the standard settings?

@@ -0,0 +1,17 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

See comments above.

@izivkov
Copy link
Contributor Author

izivkov commented Dec 17, 2021

@izivkov, is this ready for review or are you still working on it?

It was supposed to be ready for review, but I keep thinking and adding enhancements. One last thing I wanted to add is a full-screen video mode. I had some issues in mirroring in full screen, but I will attempt to resolve today, and will let you know.

@izivkov
Copy link
Contributor Author

izivkov commented Dec 17, 2021

Looks good, need to test.

If possible, it would be good to reduce the image size by saving as jpg.

I wonder if it makes sense to remove the RTSP connection in the controller app to reduce the apk size. Or do you see any benefit in using the RTSP connection over WebRTC?

About the JPG files, do you mean the images in the Readme file? Sure, I prob need to take another image again with the new buttons. I was using PNG because they are non-patented, and I thought would be preferred in a project like this.

We can remove RTSP from and android app, and this will reduce complexity, but we should also think if we need RTSP at all. Is is useful in the Python app. How about a separate PR for that?

@izivkov
Copy link
Contributor Author

izivkov commented Dec 17, 2021

I made some of the changes you recommended. Could not get full-screen to work well, so let us go with what we have. After making sure everything works OK for you, we may add video resizing.
I think the PNG files do not add a lot of extra size. My screenshot tool generate PNG's, but anybody can further improve the Docs and the code.

@izivkov
Copy link
Contributor Author

izivkov commented Dec 17, 2021

OK, I converted Screenshot.PNG to Screenshot.JPG, and it reduced the size somewhat.

@izivkov
Copy link
Contributor Author

izivkov commented Dec 17, 2021

I have not tried this remotely, because my ISP has locked down my modem, and cannot open ports in the firewall. I would be curious if we can access the robot from outside the network.

@thias15
Copy link
Collaborator

thias15 commented Dec 20, 2021

We can remove RTSP from and android app, and this will reduce complexity, but we should also think if we need RTSP at all. Is is useful in the Python app. How about a separate PR for that?separate PR for that?

Yes, as discussed separate PR. Let's remove RTSP from the controller app, but keep it for streaming via VLC or in the python app.

@thias15
Copy link
Collaborator

thias15 commented Dec 20, 2021

Did some testing and it works very nicely. I'm getting a latency of 190ms. What did you measure? I have a few comments:

  • The video window changes size as the quality/resolution of the stream adapts to network quality. Would be nice to keep the window size fixed (maybe allow the user to select size, e.g. small, large, full-screen)
  • Pressing ESC disconnects from the server and I can no longer send controls. But the video stream continues. Also when changing the controller in the app, the video stream persists. This is not necessarily wrong but unexpected.
  • For me the default setting show the video stream 'mirrored`. So it would make sense to change the default/convention. How is it on your phone?

@thias15
Copy link
Collaborator

thias15 commented Dec 20, 2021

Two more issue I encountered:

  • It seems the bot app cannot open the camera after WebRTC connection is established. For example, starting the stream in FreeRoam if I then go to Data Collection or Object Tracking I do not see the camera preview on the screen. WebRTC stream is still running though.
  • Toggling noise does not work. But this could be an issue in the robot app.

@thias15 thias15 merged commit 31039cc into ob-f:master Dec 21, 2021
lacykaltgr pushed a commit to satinavrobotics/SatiBot that referenced this pull request Jun 1, 2025
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