Building a robot YOU can drive around MY shop Pt.6
You can now tilt the camera and use text-to-speech on the robot but streaming the robot’s view is a little hit and miss for now. And chat is figuring out how to use my Alexa speaker via the robot. Join me in this Christmas Eve adventure where a lot of the Robot’s core functionality was completed!
This was streamed on Twitch on Dec 24, 2020.
00:00:00 Stream Starts
Stream starts. Merry Christmas all!
Scotty interacts with chat, going over christmas plans.
Chat share the robot link to try driving
Talk about adding a tilt and pan bracket that @tigga1986 designed to the robot to improve camera experience and then move on to working on the Corne Chocolate on stream.
00:06:59 Picam to OBS
Scotty researches how to send the Pi HQ Cam feed to OBS so he can stream it on Twitch.
The thinking is to create a secondary twitch channel for the robot as a BTS channel that chat can control but it would also allow Scotty to share the video feed in his streams.
Scotty installs vlc packages on the robot’s raspberry and then troubleshoots himself through connecting to the camera over network.
00:32:22 Camera connection troubleshooting
Now he has a feed, Scotty troubleshoots why the connection kills itself.
He starts by looking at the remo.tv ffmpeg settings as that’s a different to what the vlc package was using, however, it appears the camera is now locked out of remo.tv’s config because it’s being used by vlc.
Scotty reminds himself on local RTMP server for streaming the drone video and starts to configure the robot to output 2 streams, one for remo.tv and one for rtmp so he can stream the rtmp source directly through OBS to twitch.
Meanwhile he rescues the robot again and incapacitates it on a box so it can’t run away.
Scotty has a working camera source for OBS!
Some very brief stream shenanigans happen
Robot cam seems to “flash” grey sometimes on stream – unclear why for now – appears to only affect twitch stream and not remo
A short interlude in the stream while the robot drives round, plays with Alexa and talks to chat
00:58:37 Preparing a tilt function for the camera
While Scotty lets the robot explore, he starts to look at adding pan&tilt functionality to the robot cam.
Using some brackets that were designed for him, Scotty proof fits everything together, trying to mentally put a picture together of things he has to prepare.
The robot starts saying ‘woof’ and ‘bark’ in the background while Scotty gathers the necessary bolts and nuts.
The robot asks for arms. Scotty replies saying he’s not sure that’s such a good plan.
With a plan in mind, Scotty sets to modifying the printed parts slightly.
The method used to print made the necessary bolt holes a little smaller than intended, these need to be drilled out.
Tigga helps by sharing how to mount servos to the brackets in “neutral” mode.
Interacting with chat, Scotty explains he’s loving the Twitch experience so far. He intends on making a YT announcement soon but is working on building out his resources a bit more.
01:28:03 Changing robot control type
“Alex, set a reminder for 5 minutes to kick Ferferite off”
Ferferite becomes the first user to redeem 5k channel points to solo control the robot for 5 minutes but forfeits his control to rudy4 as a thank you for giftsubbing Ferferite.
Sadly, Rudy appears to be gone so Ferferite takes control as intended.
Scotty continues with the servo mounts for the Robot Camera.
Ferferite is manually kicked once the timer goes off after which chat is told there’s a cooldown timer of 10 minutes on the reward so watch for it to become active!
Scotty has some minor issues with one of the mounts to sort. A sleeve or spacer is needed but for the purpose of this demonstration, glue is used.
Finishing up the mount, Scotty prepares to stick it to the robot while CollieCommander takes control of the robot.
Collie’s time eventually runs out, Scotty drives the robot back to himself and powers down the bot.
It’s noticed the lag is enough to be frustrating to deal with.
02:20:34 Installing the tilt bracket
After a brief break, Scotty grabs the robot, powers it down and begins the installation process of the pan&tilt
The intended placement of the servo’s doesn’t allow room for panning, a platform is needed but for now, let’s head off to the wood storage to look for some wood to quickly bodge something together.
Scotty cuts down an off cut he already had to size and starts to put the camera together but the camera flex cable is a little short.
This forces Scotty to ignore the pan servo for now and focus only on tilt.
The pan servo motor is removed to lower the tilt arm.
With Pan&Tilt physically installed, Scotty needs to solder a new header on to the PWM Hat.
“Mod a roomba” is mentioned as a next project (in joking)
Soldering done super quick! Scotty is able to connect the tilt servo to the PWM Hat.
Speaker and microphone are placed back on to the robot.
02:54:07 Programming Tilt control
With physical installation now complete, the robot is put back onto it’s incapacitation box and powered on.
Scotty makes a connection to the Pi with SSH and intends to configure Motor 4 on the Hat but there’s something up….
It appears the servo needs to be driven with 5Volts.
Scotty gets some cable sorted out to power the servo properly and powers on the robot again for configuration.
Through trial and error Scotty figures out the range of motion (230 – 450) and using that approximates motion limits per key press and sets boundary limits.
Configuring key presses in remo.tv lays bare some issues with the local config on the raspberry but it doesn’t take too long to solve these.
Scotty builds a quick home positioning trigger but decides he doesn’t like the home position so resets that.
03:29:24 Let’s fix the lag
Scotty would like to fix the lag but he doesn’t quite know what’s going on.
checking cpu load reveals quite high use due to ffmpeg
Changing ffmpeg stream preset to ultrafast seems to improve latency on remo but the OBS Stream is still lagged.
Scotty decides that as long as the driver has a good connection it doesn’t matter too much that the OBS stream to twitch lags by a couple of seconds.
03:43:17 Chat gets control back
@boxkid is given control of the robot but it takes a few mins before control is taken.
Scotty interacts with chat a little while boxkid drives around.
Some talk around rC3
This turns into other conferences Scotty has visited; Super Con, Hope, LTX, DEFCON, Vidcon, Vidsummit
03:49:39 Hanging out
As Boxkid is kicked off, Scotty investigates why the TTS isn’t working.
Chat is in favor of giving the robot it’s own twitch stream.
Scotty finds out the speaker was off but that battery is also low; he moves to check if he can charge the speaker off the main battery.
Success! It was simple enough; add a usbcable between the speaker and the pi.
TTS is confirmed to be working!
A small discussion happens on setting up remo and how the logistics of multipole channels may or may not work.
@SkaveRat redeems control of the robot and gets 5mins of fame
SkaveRat tries to use Alexa but when this doesn’t work resorts to immitating a cat.
Scotty would consider adding a manipulator.
The robot is opened up to the masses in closing as Scotty starts to tidy and clean the workshop to head home.
While chat talks to Alexa, Scotty is tipped that blocking the 3-6kHz audio range will stop the robot from talking to Alexa.
Scotty finishes up cleaning the workshop.
04:19:51 Winding down
As the robot interrupts him and he turns the volume down he signs off.
Have a merry Christmas or happy holidays!
Stay safe and have a wonderful evening.