#robotics Logs
Apr 04 2020
#robotics Calendar
11:25 AM zhanx_ is now known as zhanx
11:33 AM marder is now known as cloudia
03:25 PM marder is now known as master_bunny
03:47 PM veverak: I am sad
03:48 PM veverak: I thought it should be doable to buy something: that communicats over usb with computer, controls RC servos, can be easily controlled by gampead connected to said computer
03:48 PM veverak: pololu maestro fits the HW part, but it does not samme there is software for the computer side :/
03:48 PM deshipu: veverak: it's just a serial communication
03:49 PM yaqwsx: veverak: Isn't Python computer app, serial line and Arduino to control servos sufficient?
03:49 PM veverak: yaqwsx: I need to deliver this to somebody that: I do not have time to educate, has windows
03:49 PM deshipu: veverak: I had a python program that used pygame to read the joysticks and pyserial to write to the maestro
03:49 PM veverak: I have zero experience with making sw for windows that is easy to use
03:49 PM yaqwsx: veverak: Pyserial works like charm on Windows
03:49 PM veverak: deshipu: have to make it BFU friendly windows app
03:49 PM veverak: yaqwsx: hmm
03:50 PM deshipu: py2exe works
03:50 PM veverak: yaqwsx: btw: which arduino do you mean? usually they have only 256 steps on RC servos
03:50 PM veverak: (pololu maestro has 1k)
03:50 PM veverak: deshipu: interesting
03:51 PM deshipu: I compiled my games with py2exe
03:52 PM veverak: with gui?
03:52 PM veverak: that may be necessary for port selection
03:52 PM deshipu: the games are graphical, one of them has an animated menu in it, I guess you could call that gui
03:53 PM deshipu: but at that point you are learning pygame
03:53 PM veverak: I am still suprased that nobody tried to do this before
03:53 PM deshipu: nobody?
03:54 PM deshipu: I did it, I'm sure others did it too
03:54 PM veverak: deshipu: do you ahve the code somewhere?
03:56 PM deshipu: here's one program that reads the joystick and sends commands over serial: https://bitbucket.org/thesheep/kubik/src/default/joy.py
03:56 PM deshipu: you would need to adapt it for the maestro commands
03:57 PM veverak: hmmm
03:57 PM deshipu: sorry, wrong project
03:57 PM deshipu: https://bitbucket.org/thesheep/ukubik/src/default/joy.py
03:57 PM deshipu: this is the one
03:58 PM deshipu: the first one is on an rpi and uses the commands directly to control servos on the rpi
03:58 PM veverak: idea now: USB cam in the robot on 60m long 'usb over ethernet' extension, with 60m extender for serial communication for frsky pwm generator/receiver combo and frsky controller
03:58 PM veverak: I realized, that if I have computer on the side of operator
03:58 PM veverak: and USB in the robot
03:58 PM veverak: (connected to said computer)
03:58 PM veverak: maybe I could drop the frsky receiver/serial extender
03:59 PM veverak: "for event in pygame.event.get():" interesting :D
04:02 PM veverak: potential problem: that requires usb hub in the robot
04:03 PM veverak: which could increase delay for the usb camera
04:03 PM veverak: anyway, I have usb camera ordered tday and got usb hub somewhere i hope
04:03 PM veverak: so I should be able to try it
04:04 PM deshipu: in the worst case, put a rpi in there
04:04 PM veverak: not sure that decreases delay
04:04 PM deshipu: or any microcontroller board, really
04:04 PM veverak: and I have strong opinion that it makes the stuff a bit less reliable
04:04 PM deshipu: they all have usb serial
04:05 PM veverak: but
04:05 PM veverak: https://www.amazon.co.uk/dp/B00T9RTT2U?linkCode=g12&tag=ezvid-21
04:05 PM veverak: this manufacturer has good ratings for their extenders and they act as hubs
04:05 PM deshipu: veverak: you know there are PAL/NTSC–USB adapters as well?
04:06 PM veverak: interesting
04:06 PM deshipu: you could just have analog video signal over the cable, and have it connected to the computer through the adapter that makes it seen as a webcam
04:06 PM veverak: I wonder if delay is actually any better
04:06 PM veverak: as this is how I imagine webcam works internally
04:06 PM veverak: ;)
04:07 PM veverak: https://www.arducam.com/product/b020201-arducam-1080p-low-light-wdr-usb-camera-module-with-metal-case-2mp-1-2-8-cmos-imx291-160-degree-ultra-wide-angle-mini-uvc-webcam-board-with-microphones/
04:07 PM veverak: deshipu: ^^
04:07 PM veverak: but without the enclosing
04:07 PM deshipu: the latency should be 1/24th of a second
04:07 PM deshipu: so one full TV frame
04:07 PM deshipu: they use it for flyinf drones
04:08 PM veverak: yeah
04:08 PM veverak: but I know there is problematic delay
04:08 PM veverak: deshipu: I scouted this as solution for my drone
04:08 PM veverak: adapter+phone has noticeable dleay compared to the FPV glasses which are analog
04:08 PM veverak: laptop had same problem
04:10 PM veverak: and in case of the usb cameras
04:10 PM veverak: as far as I am aware, it's about encoding settings
04:11 PM veverak: you want to select the encoding that is fastest for the camera to encode and laptop to decode
04:13 PM deshipu: veverak: what kind of latency do you need?
04:13 PM veverak: deshipu: actual goal is <300ms cam - operator
04:13 PM veverak: I but I suspect we can go up to 500ms
04:13 PM veverak: it's slow robot :)
04:16 PM mrdata_ is now known as mrdata
04:20 PM veverak: fu me
04:20 PM deshipu: analog should be ~40ms
04:20 PM veverak: it seems I do not have arduino with usb at home
04:22 PM veverak: kidding! got one
04:22 PM veverak: (I think it appeard after I wrote the message)
04:24 PM veverak: ok, I can use that for thetests
04:24 PM veverak: *the tests
04:59 PM mrdata_ is now known as mrdata