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

Remote cotrol works no lag, but Collision Avoidance didn't and lag #4

Open
RyanC1681 opened this issue Jun 29, 2019 · 6 comments
Open

Comments

@RyanC1681
Copy link

Hi, that is nice video. I tried to use separate USB power for motor as yours JetBot. Remote control did work with no lag, However, the live_demo for Collision Avoidance - Variable "prob_blocked" mostly > 0.9, camera output lag and my JetBot keep 360 spin, not forward. Any idea how to fix it?
Thanks,

@RyanC1681
Copy link
Author

mbot2 didn't show blue/yellow control, but Max Linear/Rotation Spd bar only. Anything missing?
Thanks,

@mayuanjason
Copy link
Owner

Hi RyanC1681,

KineticJs is no longer maintained and it doesn't work well on Chrome.
Please try following methods:

  1. Try other browsers.
  2. Forget mbot2 brother... I just update a new GUI named mbot3, try it, I think you will like it...

@mayuanjason
Copy link
Owner

Hi RyanC1681,

For the first questions.
Yes, I met the same issue weeks ago. I put Jetbot on the glass and prob_blocked always > 0.9, so I guess maybe the shadow reflected on the glass affected the camera, then I spread a sheet to the glass and Jetbot works well.
Also, you can raise a new issue to Nvidia official Websit for help.

@RyanC1681
Copy link
Author

Hi,
I tried mbot3 that did have better UI, but it got error as below: with known good camera.
How should I fix it?
Thanks,

Starting camera thread.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:521 No cameras available
192.168.100.175 - - [30/Jun/2019 22:12:12] "GET / HTTP/1.1" 200 -

@RyanC1681
Copy link
Author

Never mind, I figured out that was power issue.
Thanks,

@mayuanjason
Copy link
Owner

Hi RyanC1681,

Good news.
BTW, you can also run mbot programs on laptop or PC with USB camera on it, since camera_opencv.py supports most USB webcams and laptop cameras.
Just comments below lines:

diff --git a/mbot3/app.py b/mbot3/app.py
index 5febd45..51228f7 100644
--- a/mbot3/app.py
+++ b/mbot3/app.py
@@ -30,7 +30,7 @@ except FileExistsError:
 
 app = Flask(__name__)
 
-robot = Robot()
+# robot = Robot()
 
 
 @app.route('/')
@@ -43,17 +43,7 @@ def teleop():
     opcode = request.args.get('opcode', 'stop')
     speed = float(request.args.get('speed', 0.8))
 
-    if opcode == 'forward':
-        robot.forward(speed)
-    elif opcode == 'backward':
-        robot.backward(speed)
-    elif opcode == 'left':
-        robot.left(speed)
-    elif opcode == 'right':
-        robot.right(speed)
-    elif opcode == 'stop':
-        robot.stop()
-
+    
     return '', 204

and run # CAMERA=opencv python3 app.py

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

2 participants