Monday, January 26, 2015

Robie Jr: Moving on to T-Rex Chasis

Ok, Robie is not dead, but I do not want to rip him up to try and fit everything inside. I have a couple of adafruit trinket pro's to play with on the T'Rex project. I think I will work on getting Robie to run around with one of those sans Raspberry pi in the future. 

On the T'Rex project I have the raspberrypi camera finally working with decent latency. Here is a pic (not much but that is the camera image up on my mac on the screen, coming from the pi)




For those trying to do something similar the best solution I found was using netcat (nc.traditional on the pi and just nc on the mac shell commands) with nc and mplayer on the mac (had to get via macports, mplayerX is NOT a good option). Anyway basic idea is:

  • on the receiving computer you do 
    • nc -l [some port number] | mplayer -fps 60 -cache 1024 -
  • on the pi you do
    • raspivid [setup your video stream] -o - | nc [dest ip] [dest port]
This Guy had one of the clearer examples of this and gets a bit fancier with setting up a fifo dumping out to a port on the pi. It may be a bit more consistent than just doing the strait netcat to netcat setup. Haven't completely done his example yet. Found a couple of annoying things. ctrl-z doesn't cleanly exit the mplayer session when I stop the video and I have to clean up the nc -l and the mplayer pids before I can initiate a new video stream session. ctrl-d may be cleaner but I haven't tried it yet. You have to clean up the camera sessions on the pi as well. If using raspivid I just do a quick pgrep raspi to get the pid to kill. So far this makes cleaning up and reseting the sessions a bit of a pain.

Also,  it is important to remember to start the listening stream first on the PC you want to see the video.  

In playing around with all the options I ended up installing v4l2 libraries on the pi. I got an rtsp stream (example 6 on the page) up and running using VLC streaming out of the pi using those libraries and I am wondering if I can do a direct kick out to netcat skipping VLC (VLC server was causing 2-3 seconds delay on HTTP and RTSP examples). The reason I would like to try that is the v4l2 stream allows you to tweak some settings while the stream is live. If raspivid allows you do  that I haven't figured it out yet. Would help with tweaking the camera view when out roving around. 

Bandwidth in the netcat example using a 640x480 stream is ~380KBps. My initial run with full HD was a bit jumbled and laggy though I haven't tried it again since I got some of the settings tweaked. latency was pretty minimal when it was caught up but it was variable from a tenth or two up to a second or three at times. Seemed to be tied to when I hid the video window for a while and brought it back up on the pi got bogged down on something else.  

As you can see the camera is mounted to a pan tilt kit (micro server pan tilt kit from Adafruit). I have tested that with an RC controller but have not gotten it running from the arduino trinket. I also have a new basic wiring diagram for the project. Still pretty rough...


For now I am not sure about all of this. But it seems like the roboclaw can provide 5v at 3amps from the main battery supply, and the raspberrypi can pass through whatever it does not use. So I shuold be able to mangle a USB cable to run power from the BEC circuit into the pi USB input (much better protected than running it to the 5v and gnd GPIO pins directly). The question is if the power supply is clean enough to avoid resetting the pi (seems they are pretty sensitive). Worse case I will just run power to the pi from a USB battery backup I have. Then use the pass through to kick out to the two micro servos and trinket arduino. Hope to setup packet/serial communication from the trinket to gpio on the pi board. I got a series connector for two 7.4 lipo 5000mah packs I have. I have a couple of voltage monitors on the way to make sure I don't blow them up. Also found some projects for using some voltage dividers to use analog arduino ports to provide the same function.

I am a bit concerned about the two packs as they are kicking out over 20v fully charged which is more than I was expecting. Need to read up on these motors, they should take over voltage fairly well if I run it lightly, but that is a lot more than I expected to be dealing with. I still have a smaller 11.1 3s pack to run with if need be. 

A word of caution for anyone looking to use this platform... I ran it around in RC mode and found that it is relatively easy to get this thing to turtle if you run it up to something it can't climb. The treads will grab and roll it over onto its back pretty easily. I may be building in some roll bars to protect the electronics and to get it back up right in the event of a spill. 

Tuesday, January 06, 2015

Review: Interstellar - McConaughey in SPAAAAACE



Spoiler alert. As always if you haven't seen the movie then this review probably isn't for you. I like to run through elements of the story and do not dance around major plot points. You have been warned. 

I am of two minds about this movie. There is the analytical side of me that is screaming bloody murder at some of the crap they had in there. Then there is the romantic space nut side of me that desperately craves stories about us getting out there... details be damned. As a result the movie had a lot of WOW moments. Some were good, some not so much. 

Bottom line.... did I like it? Yes/NO/Yessssss/No No No/YES YES/No.... you get the idea. Conflicted would be mild way of putting it. I supposed it all comes down to how I classify it. As hard boild sci fi, which the lead up sort of seemed to try and cast this story as, I think it is large parts awful with a few gems. However, as a tale... possibly even fantasy? I like it.... a LOT. 

The Bad:

Ok lets get through the more egrigious stuff. 

First off the ships. We start with a Saturn Five type liftoff sequence.... Ok, no biggie. Known tech, plausible, nothing out of whack with reality, I'm good. I have no problem with the hand waved "someone put a worm hole around Saturn to help us" bit, thats the 'fiction' part of 'scince fiction' at work. Once they dock with Endurance it takes them 2 years to reach Saturn, again no problems, matches the tech they seem to be positing. Once there, they go through the wormhole to another solar system with three planets they plan on visiting. The first planet they visit, the massive wave one, is said to have 130% Earth Gravity. But, they go down in a shuttle and then blast back off into orbit in the same shuttle. Ummmm, first launch used a massive multistage rocket to get that shuttle into orbit out of a weaker gravity well. If the shuttle they used at the first planet was capable of landing and immediately lifting off out of a gravity well stronger than Earth's... why did they need the big Rocket stack to get off of Earth in the first place? Obviously, they do the whole big launch from Earth for dramatic effect, and tug at the Apollo heart strings. Even the two year trip out to Saturn is plausible with known tech that their ships appear to be based on. However, it is completely non-sensical after that. It seems like they have real tech before the worm hole and Star Trek tech after the wormhole. 

The problems start before this issue of getting to and from the planetary surfaces with the shuttles because the first planet is orbiting near a black hole (lets deal with the time dilation mumbo jumbo in a bit, for now just roll with it). A problem emerges in that due to the effects of time dilation an hour spent at the planet (planet surface in the dialog) will equate to 7 years of earth time. If we accept this as true then we have a major problem. Time dilation would only occur if the planet was traveling at a significant fraction of c (speed of light). This is actually plausible enough because the planet is posited to be in proximity to a black hole. A planet near the event horizon in a stable orbit would have to be traveling at a very high speed to maintain its orbit. The problem is, in order to reach said planet, the ship our intrepid voyagers are in would have to be capable of matching that speed in order to match orbits... IE first it has to match the orbit of the planet around the black hole before it can then go into an orbit around the planet itself.

So... if the ship is capable of reaching a high enough velocity of c that its relative frame of reference creates a time dilation effect of 1 hour = 7 years of Earth time.... why the heck did it take 2 years for the same ship to reach Saturn? Everyone in their best  McConaughey say it with me... "Riiiiiiigggghhht". Again, plausible tech before the wormhole, Star Trek tech after the worm hole. 

Back to the time dilation thing. So our crew reaches planet number one in the worm hole upgraded Endurance and they jaunt down to the surface in their worm hole udpated shuttle. Experience some hijinks (more on THAT in a second...) and return to find 20+ some odd years have passed to their shipmate left on the Endurance. This makes no sense. The ship and the planet are in the same frame of reference. The ship being in orbit around the planet would experience a small time dilation effect compared to those on the surface... and IT would be the one with the slower clock. Not the surface. Much less a 7 year per hour difference in the wrong direction depicted in the story. Again say it with me.... "Riiiiiiiggggghhhht".  

About those waves... so you are telling me there are massive cyclical waves and they couldn't detect them from orbit? They didn't scout the landing sight via telescope, or radar or something before attempting a landing? I suppose in the logic of the movie the waves would have appeared to be very slow... though they went down knowing there was a severe time dilation effect... oh nevermind *head explodes*. But hey, we got to watch McConaughey surf a space ship.... you with me? "Riiiiigggggghhhht".  

Now we get a bit of a break from the head scratchers until we get to the black hole sling shot. For the most part I will just swallow it and envoke "the others" as does the movie. But, before we get to Space Ace's grand sacrifice lets talk about that whole 'Gotta Leave Something Behind" scenario. Do they? Yes. But they were in the form of propellant. Second... they didn't detach until after they were done thrusting. That would make a difference after the first shuttle as they still had some thrusting going on. Dropping the mass of the shuttle would help. However, there is no further boost after the second shuttle is jettisoned so I am not sure why that would have helped. I suppose if it was timed for the closest approach that would help. IE use all the mass going down the well, eject the mass before starting to leave the well. But even so, at that point both masses would have been on the same orbital trajectory. Newton's laws at work. They are both objects in motion subjected to the same forces. Thus, without further thrust events there is no outside force acting differently on them so they should behave the same at that point. IE the shuttle would have detached and just floated along with the station until it performed another maneuver. But hey, I am not an orbital mechanics expert, so perhaps I am missing something particular to the gravitational slingshot maneuver. In any case, why did he have to sacrifice himself (other than for the obvious dramatic effect)? They say the shuttle can't talk with the station... ok. You can't rig a count down on the shuttle computers for a separation event? Then exit?. This one bugs me because they could have covered this relatively easily by having a resource shortage issue. IE only enough left for Brand to make the last planet, not enough for the both of them. It is trite, it is cliche, but it works. TARS sacrifice had already been explained as a last ditch effort to get the needed data from inside the event horizon. Oh never-mind, the story needs our hero to take his magical mystery tour so everyone once again.... "Riiiiiiiggggggghhhhht". 

Lets just all nod our heads and accept that what happened in the black hole stays in the black hole. And really, I think the movie should have as well. He is his daughters ghost, 5 dimensional beings come up with a wacky funhouse depiction of time that lets Cooper play with gravity in his Daughters bedroom at any point in time (and then apparently her office back at the secret NASA base). You know. I really think this sequence may have worked better if it was told entirely from Murph's point of view. IE McConaughey jettisons into the black hole, fade to black. Pick the story up with Murph returning home and figuring out the ticking of the second hand was further communication from the Ghost and cue the montage of completing the work on understanding how to manipulate Gravity to make "Plan A" viable. Much less trippy. Potentially just as powerful if you ask me. The last bit of the message could have been "Love Dad" or some such for a nice reveal. In fact... that might have been a good way to end it. No explanations. No ghostly handshake. Not that I really minded the whole farmhouse on a space station around Saturn gag. It was a nice way to let Murph get some payback. Everyone ready? "Riiiiiigggghhhht"

Ok, ignoring the whole he was in a black hole thing, lets talk morse code and data transmission rates. Apparently high speed human morse signaling is at around 4 bits (on or off) of information per second (~250miliseconds per bit). That translates into something like 1MB of information in about 24 days of non-stop tapping. Gets pretty unwieldy for any real amount of data considering Cooper is in a space suit. But hey, timey wimey (as "The Dr." Might say)  and hand waving "Others helping" us and let us not forget he is inside the event horizon of a black hole so all bets are off. In light of where he is, quibbling about the signaling rate seems petty. Like I said, I think this segment may have worked a lot better without trying to show how Cooper survived. Just leave it a great mystery. But no, we got a nice spacey acid trip which leaves us with... yep, you guessed it... "Riiiiiiiigggggghhhhhhht". I will offer a tip of the hat to the effort to try and depict time as a physical dimension. Think on that mess to long and its easy to strip a gear. 

That brings me to the last couple of things I really had a problem with, and the only ones from a 'Story' standpoint. The first was Murph saying at the end that nobody believed her that Cooper had helped her solve the problem. Anyone observing the watch would know someone|something was communicating. Would have been pretty simple for him to have sent messages to her that it was him. Not to mention from the appearance of things he could have responded in real time to a question.  

Also, they seem to have goofed up the timeline of Murph's knoweldge. The first message is "Stay" and Murph says she thinks it is morse code early on. She had the morse table available so figuring out there was a message there was just a matter of looking up 4 letters. Yet, it is the last thing she reveals. Seemed an odd thing to miss. 

I also wasn't buying Cooper not remembering how the messages worked. I mean all his yelling was nice from an emotional scene standpoint, not terribly logical though. IE if he wanted to change things all he had to do was send different messages. If he really wanted himself to stay he shouldn't have sent the coordinates etc... But hey, paradox is another very very painful brain twister. By having him act illogically and cause the very thing he was seeming to be railing against they avoid the whole paradox discussion. 

Pretty surprised they didn't pursue the special effects extravaganza launching that massive facility based on the 'solved gravity eureka' should have made ok to do. The escape|abandonment of Earth by a saved population could have been pretty epic. Murph (Moses?) leading the people to the "Promised Land" and all that. 

The Good:

Thats right... no in-between SO SO stuff on this one. 

Setting the analytical aspect of myself aside, I really enjoyed taking in a fantastic tale. I see here an ode to exploration and a roving eye cast about aspects of human nature and existence at the core of this movie. Perhaps more importantly, I see a story that is not entirely derivative. It isn't a retelling of Columbus finding the new world set in space or something similar. It is a look at a potential new chapter in Human destiny. And, while it is certainly divorced from reality ( not to mention heavily reliant on some devine intervention) consider if you will the stories of man adventuring to the moon prior to our real understanding of the nature of space. There was nothing wrong with that dream and that is one which did eventually come to pass. It is ok to dream. Just because we cannot currently say HOW we can do this (travel to the stars), I think it is important to dream about it, as well as working to actually understand it and how we could do it.

The dust bowl stuff. I wonder how many people realize the cuts throughout the movie about the dust are by folks that survived the actual dustbowl of the 30's. The cuts are taken from a documentary that is out on Netflix and it is well worth a watch. Based on the historical clips I have seen, if anything they underplayed the aftermath of one of those storms. The modern dustbowl setting was a really well done aspect of the story. 

The overall LACK of explanation. We do not really get a whole lot of setup or exposition trying to explain what is going on. We kind of pick up along the way that the Earth experienced a massive food shortage and that a considerable number of people have died. A blight is taking out crops that is also a nitrogen breathing organism leading to a change in Earth's atmosphere that is going to lead to the extinction of the Human race. All of that from maybe 4 explicit lines of dialog and some imagery. By and large I think the unexplained elements of the story here are ok. For example compare "The Force" of the original Star Wars movies with the pseudo scientific crap pushed into the prequel movies. Explanations in fiction should follow one of two paths. The first is consistency. IE if you are going to hand wave an answer then make sure it makes sense in the fictional universe and stick with it. Being real helps because well... its real. So it is easy to be consistent. If fake... it is often preferable to take a complete "wave of the hands" approach because then it allows the audience to either ignore it, or fill in the information with whatever they want to. And trust me, people are GREAT at filling in blanks on their own. Makes for wonderful fan debates. Here we get little to no exposition on how the Earth got into such dire straights. We get no real attempt to explain "the others", just a reaction to what happens and how they let us help ourselves. About the closest we get is some mumbling about them depicting more dimensions in a way we can perceive and some musing that perhaps they are humans farther down the evolutionary line.  

Casting. Can't say I was thrilled with the notion of McConaughey in this role going into the movie. But man, has he turned it up a notch the past couple of years or what? He is becoming one of the few actors that can be just as powerful without speaking. Hathway's character was a bit thin. It would have been nice to see her given a role on par with Murph. Cain was Cain. Damon makes a good crazy guy. Everyone played their role well. 

Overall:

I liked the movie... but I have to admit the technical stuff gave me tourettes in a couple of places. Mostly regarding the deal with the magical upgrades to the ships abilities. I mean hell, just be consistent is all I ask. As for time dilation? Well that gives experts fits so it isn't really much of a surprise it gets mangled for story telling purposes. Black holes are just all kinds of messed up. I think the pseudo science elements were used in the right spirit and perhaps it will get some folks digging into the mysteries of relativity|quantum mechanics that might not have otherwise. These are a couple of topics that are even stranger and more fascinating in reality than anything Hollywood has come up with about them so far. Also, on a plus side, the explanation of the notion of a spherical presentation of a worm hole was rather nicely done. In terms of watching some entertainment, the problems here that stood out to me present less concern than say what was done in "Gravity". Mostly because in "Gravity" there seemed to be so little excuse for getting it wrong. That movie depicted a well known and understood sphere of technology. This one... not so much. I liked both for different reasons. 

Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.

(- See more at: http://allpoetry.com/Do-Not-Go-Gentle-Into-That-Good-Night#sthash.8mXMN9D7.dpuf)





Thursday, January 01, 2015

Review: The Hobbit (Spoilers)

An Unexpected Journey, The Desolation of Smaug and of course the latest, The Battle of 5 Armies. 

As usual my movie reviews often have lots of spoilers so if that is something that bothers you then make sure you see it before you read this. 

Unlike many Tolkien die hard fans I was not first exposed through the books. My first experience with Tolkien's tale was the old animated Hobbit movie. To say it made an impression would be something of an understatement. I later got to the book and of course loved it as well and have read it many many times. I am still not sure exactly what I think of this three part orgy of Cinematography. Unlike The Lord of the Rings at least here the problem was the creation of to much content rather than the exclusion. If they had done the Ring Trillogy to the same level it would have taken 9 movies, possibly more instead of the 3 done. 

The Good: Man oh man the visuals. Love or hate the high frame rate, it is stunning. I think the problem with it is that there is not a lot of history with it. Filmakers have had decades to figure out how best to utilize lower frame rates. Hell these days the frame rate no longer means what it once did... there are no frames of film. Just bits on a hard drive. Movie magic has some catching up to do. However... where it works the audience has some catching up to do as well as the more realistic movement can catch you off guard. What cues us in subliminally via a life time of movie magic training to just go with the story is not there... as a result our comfort zone is broken and hence the wide ranging reactions to what is put on the screen. The 3d on the other hand.... well I didn't hate it. But they really need to figure out how to do that without the damn glasses.

The level of exposition. Where the Lord of the Rings skipped over the depth in places, here they were able to spend about equal time between telling the story and showing off holywood candy sequences. This was in some ways very frustrating because it is so odd that that after it is all said and done, The Hobbit ended up with a more serious telling of the tale on the big screen than the entire Ring Trillogy got. 

Martin Freeman as Bilbo. Seems he is popping up everywhere these days. Here is hoping he has continued success. His scenes with Thorin and Gandalf really did a great job capturing the heart of the tale.

I also enjoyed for the most part the expansion of Bard of Laketown, though I do wish they could have done so without the whole oppressive "Master" of the town bit. There was plenty to drive his character without the imprisonment etc...

Honorable mention to the expansion of Balin and the execution of Smaug. 

The So So:

I am not one of those super incensed by the fabricated characters and bits. On the whole I was ok with everything they did from the material based inTolkien's  extended lore for side elements (necromancer etc...) to the whole cloth creations like the forced love story element between Tauriel and Kili (Elf Dwarve love??? really????). Why does it not bug me to much? Well, there is no denying that Tolkien's tales were sausage fests, even with multiple species of characters. A bit of modernization and beefing up some female character involvement was not a horrible thing to do. In the final equation I think the character of Tauriel came off better in the whole than say the inclusion of Legolas, Galadriel and Sauruman. Yes, even with the elf dwarf love thing. I did have a bit more issue with the whole Azog thread... I will get to that.   

The over use of set piece action sequences. I also accept these as necesarry evils... and they were fun to an extent. But I think they were way to drawn out in several cases. The escape from the Goblin caves and the river ride out of mirkwood in particular stand out... as did the bunny sled warg chase in the first film.

The master and the wretch characters. Don't get me wrong... Stephen Fry played it to the hilt and the wretch was pretty wretched and provided a couple of good chuckles. That is why they make it to So-So vs the Bad section. However, one wonders why the wretch would have maintained any position of favor at all after the demise of the Master character. I just cringed everytime Bard continued to send him to do things. Made ZERO sense and went against the 'compentent no non-sense" nature of that character. 

The Bad:

Orlando Bloom. I didn't really object to the desire to include the Legolas character in the tale as the imortal nature of elves in Middle Earth lore certainly makes it plausible enough. One almost wonders why Tolkien himself didn't include him as a tie in to the greater Ring Trillogy much as was done here. Perhaps he forsaw the awkwardness of Orlando Bloom on screen and just couldn't bring himself to make it easy?  Bloom's performance was dogged by what seemed to be a mailed in performance combined with a very muddled story line trying to deal him as a third leg in a love triangle with Tauriel. Just for good measure they also had him be the cliche rebellious son to the wood elf king. It would have helped if there had been a bit more chemistry with the Tauriel character, but what chemistry there was went to the relationship between her and Kili. Overall it wasn't a bad idea, it was just poorly executed on multiple fronts. 

The whole thing with Azog and Thorin. Especially the culimation of that concoction in a one on one battle at the end. I mean for crying out loud, you have the spectacle of the battle of the five armies which drives the title of the movie and yet you instead choose to focus a good 1/3rd of so of the screen time of the actual battle to a mano a mano battle generated by a storyline thread completely concocted for the movie? Azog appears once in the book, as a refference to a goblin that killed Thorin's grandfather in the mines of Moria. It is this thread that winds its way through the entire trilogy that grates the most on my sensibilities as a long time lover of the story. If there was one element that just didn't need any sexing up it was the main thread of the story driving Thorin to the mountain. 

Conclusion:
I suppose in the end I enjoyed the movies overall more than I was irked by the poorly done bits. However, It probably should have been two movies instead of 3. As for why I had a real problem with Azog but not the rest of the storyline additions/modifications? The difference between most of these and the Azog thread is that they were subsidary elements that just attempted to add to the overall tale and perhaps make it a bit more ballanced. Azog, on the other hand, was inserted into the core of the story... and it just didn't fit in my opinion. That said, it was a much better integrated element than Legolas or even the side story of the necromancer battle.