ROS on Raspberry PI...
 
Notifications
Clear all

ROS on Raspberry PI 3B+ progress report.

97 Posts
10 Users
4 Likes
45.9 K Views
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 
Posted by: @robo-pi

Before too long you'll be an expert. ?

I suspect that will be quite awhile yet. I'm still at the "Holy cow, the last thing I tried actually worked" stage

Also, since I'm starting from scratch on the Nano, it did take quite a bit of work installing the individual prerequisites (known as "depends" in ROS lingo), which I'm going to have to figure out how to automate if anybody is actually going to try this after I'm done

It would seem like a simple "batch" script of some sort should suffice. I think I installed probably about 100 things or so, one command at a time, waiting for each to finish before executing the subsequent command

They were all linux apt commands, but, I know nothing about automating those commands, so, unless I get some assistance from somebody in that area, (or if google ends up being helpful) there will be a bit more homework for me

Example...

sudo apt install ros-melodic-usb-cam
sudo apt install ros-melodic-usb-cam-controllers
sudo apt install ros-melodic-usb-cam-controllers-dbgsym
sudo apt install ros-melodic-usb-cam-dbgsym
sudo apt install ros-melodic-usb-cam-hardware
sudo apt install ros-melodic-usb-cam-hardware-dbgsym
sudo apt install ros-melodic-uuid-msgs
sudo apt install ros-melodic-xv-11-laser-driver
sudo apt install ros-melodic-xv-11-laser-driver-dbgsym

And this goes on and on and on, and after looking at the line numbers (I pasted it all into notepad++ while I was typing it) there were, so far, 170 of them, which I did the hard way... one at a time

On the ubiquity image, since it was a preloaded image, all that was done for me, but the Nano was Tabula-Rasa, so, lots of typing. Plus, I'm not sure I even needed everything I loaded. I just installed the things that looked like they would be helpful to a typical robot, and some other things that I had no idea what they were, but I loaded them anyway cuz it seemed like a good idea at the time. Like the laser driver thing. I was hoping that was a weapon, but it turned out to be part of the navigation system, so I loaded it anyway, even tho I don't have an xv-11 laser thingy


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @spyder

It would seem like a simple "batch" script of some sort should suffice. I think I installed probably about 100 things or so, one command at a time, waiting for each to finish before executing the subsequent command

Sounds pretty labor intensive and time consuming.  There should be some sort of package you can just download in one fell swoop. 

I might assemble my new Jetson Nano tonight. ?  I'm anxious to see if I can use it with a standard VGA monitor.  I have an HDMI to VGA adaptor and some really nice (but HEAVY) VGA monitors here.   So we'll see how this goes.   Otherwise I'll need to fork out another $75 for another  22" HDMI display.  They are pretty darn nice though. ?  So I'll probably end up picking up another one somewhere along the way anyway.

But for now I'm going to see if I can use a old VGA monitor.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 
Posted by: @robo-pi

Sounds pretty labor intensive and time consuming. 

Yup, It was. But I found a procedure. I'll have to test it. It says to create a list of apps, save it to a file (which I already did anyway) and execute this command against that file...

cat example.list | xargs sudo apt-get -y install

and it should install all the packages named in that file. I'll try it and see what happens

Posted by: @robo-pi

There should be some sort of package you can just download in one fell swoop. 

I found a few. But they seemed very specific. Like this one, aimed at a specific camera...

https://www.stereolabs.com/blog/ros-and-nvidia-jetson-nano/

Or this one, that I don't know what it does...

https://www.jetsonhacks.com/2019/10/23/install-ros-on-jetson-nano/

Posted by: @robo-pi

$75 for another  22" HDMI display.

I also just came back from Best buy, and I found this black friday sale...

https://www.bestbuy.com/site/insignia-58-class-led-2160p-smart-4k-uhd-tv-with-hdr-fire-tv-edition/6355437.p?skuId=6355437

It's $479 today, but on black friday, which for some reason, starts on thursday, it will be $199

3 HDMI ports and a USB port. No clue if the echo dot will be included in the sale


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @spyder

also just came back from Best buy, and I found this black friday sale...

Good point. I'll have to keep an eye out for sales.   I'm in no hurry so I have time to find a deal.  In fact, the one I picked up for $75 was actually marked down from $99 as clearance at WalMart.   Lately I've been having pretty good luck.  I needed to buy a lightweight electric chainsaw that I could take up on the roof.  I looked them up online and the cheapest one I could find was $75.   I didn't really want to pay that much, but  when I drove over to Walmart they had it marked down to $35 on clearance.   My lucky day!

Same thing just happened with a  portable propane "Jet" heater.  I needed to get one for my garage and looked them up, they were about $149.  Way more than I wanted to spend.  But I really wanted the heat so I drove over to Tractor Supply and low and behold they had the same heater on SALE for $99. Yippee!

I must be a SALE magnet. ?

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 

Well I "built" the new Jetson Nano.   By that I mean that I installed the WiFi board, mounted the fan, and assembled it into the clear acrylic case.  I really like this case.  Some people have complained that it doesn't seem to fit together well and they end up smashing wires between the case and the Nano.  But that only happens if the wires aren't routed properly.   I found a way to run all the wires without having anything pinched.  And when done this way the case fits together "Perfectly".  No room for error, it's a perfect fit.

Anyway, after assembly I plugged in a system SD card and was very pleased to see it boot right up precisely as I had everything configured.    It already knows my password, my WiFi credentials, and it has my organized desktop with all my preloaded software.  So that's nice.

This is one reason I wanted to buy another one soon.  I wanted to get a second one that was fully compatible with the first one.  I didn't want to have to reconfigure everything from scratch. ? 

So I'm cool now. ?   Two identical Jetsons that can just swap SD cards at anytime.  That's what I wanted.   If I could afford it I'd buy a few more!    But I actually went out on a limb to get this second one.  So not likely I'll get another one anytime soon.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 
Posted by: @robo-pi

mounted the fan

Have ya tried this ?

https://github.com/Pyrestone/jetson-fan-ctl

It gives you more precise control over at which point your fan turns on and off

I've been using it, and I like it


   
ReplyQuote
(@freddie43)
Member
Joined: 4 years ago
Posts: 24
 

@robo-pi

Well you are a man of many parts (and processors)

When you said in another thread that you were working on Jetson Nano I  googled it and it said 'it is a small, powerful computer that lets you run multiple neural networks in parallel for applications like image classification, object detection, segmentation, and speech processing.' - all exciting stuff.

I thought you must have gone off into another universe, but I see it is ok - you are just in this thread!

😉

This post was modified 4 years ago by Freddie43

   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @spyder

Have ya tried this ?

I wonder if that would work with my current fan?  Probably not.   He says that you need a PWM fan.  I'm guessing that he's also using some GPIO pins to drive it?       It is true that my fan just comes on continually and runs the entire time.  It also remains running after shutdown.  The only thing that will stop it is to shut the power off to the Nano entirely.

I'm currently only using these Jetsons as desktop computers so having the fan run constantly is not a problem.  But yeah, when it gets employed in a robot that runs on batter power having the fan shut off when not needed would be paramount.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @freddie43

When you said in another thread that you were working on Jetson Nano I  googled it and it said 'it is a small, powerful computer that lets you run multiple neural networks in parallel for applications like image classification, object detection, segmentation, and speech processing.' - all exciting stuff.

Yep, that's exactly what I'm studying with one of them too.   In fact, I'm taking the course entitled "AI on the Jetson Nano" by Paul McWhorter.  We're just about to get into the image processing which include object detection, etc.  He's currently working at lesson #13.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 

@robo-pi

Where is your fan plugged in that it's staying on all the time ?

There's a 3 wire port on the Jetson that's specifically for a PWM fan. You'll find it right in front of the ethernet connector


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @spyder

There's a 3 wire port on the Jetson that's specifically for a PWM fan.

That's where mine is plugged in.   If that plug is PWM and can be controlled via software then I guess I'm all set.  I'll look into the GitHub page in more detail and see if I can implement this.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 

And it happened

The SSH windows from all my remotes all get bunched up into a blob on my taskbar, so occasionally, I might open the wrong one, and I did. I screwed up and loaded a kinetic package on the Jetson's melodic, and I didn't wanna take the chance that I didn't remove it all so I just nuked the whole thing and started again, which gave me the chance to test my little package loading script, which instantly failed, so I rewrote the whole thing as a single file rather than using a command to execute commands in a file

I used notepad++ to write the script, but, for some reason, it still seemed to retain some windows formatting, so I found a program called dos2unix which I installed on the Jetson, uploaded the file, and ran dos2unix on it, which removed any windows formatting, and created a linux compatible file, which I then ran, and was able to install over 170 ros items in a single command, which took somewhere around an hour to run, whereas when I did the process manually, one command at a time, it took all night

Now this script is not specific to the Jetson, but it is specific to the Melodic version of ROSv1

Since some packages don't share the same name, like teleop_key and teleop_keyboard, I'd rather not take the chance that they all aren't compatible, which is why I'm saying that this is specifically for Melodic. So if anybody wants to try ROS Melodic, here's the script...

https://github.com/Spyder19/ROS/blob/master/rosinstall.sh


   
ReplyQuote
(@zeferby)
Member
Joined: 5 years ago
Posts: 355
 

@spyder in case you don't know, you can have all control characters visible with this toggle button :

image

And the line endings can be changed by right-clicking at the bottom right of the screen :

image

Eric


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 

@zeferby

Ha haha

Nope. I didn't know

Thanks. I will remember that


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 

I was waiting for the Jetson to catch up to where I was with the Pi (as far as ROS goes). I also got my 2nd Pi4, and was trying to load ROS on it, and it's just not working on Buster, no matter which version of ROS I try

I'm sure that if I try it with Ubuntu, it will probably work, because ROS was built specifically for Ubuntu, as is evidenced by the fact that you can just type sudo apt-get install ros-melodic-desktop-full, and it will install. According to this article, Ubuntu has recently almost successfully supported the Pi4, although problematically on the 64bit version, which I wouldn't bother playing with anyway, cuz there's too many packages that would end up being "mixed"

The new heat sink case that I bought turned out to be fairly impressive, showing a temp of only 47C while doing updates and attempted ROS installs. I managed to bring it down to 38C after adding a fan, but, the header extenders aren't long enough once I put the fan on it, and at a temp of only 47C, I think I'll be okay without it

Anyway, on to the things I learned last night (while working on K-9's head, failing to install ROS on Buster, and designing a funnel for some speakers), and BTW, I'm loving this ssd1306. They're SO handy

So, once you've launched the turtle sim, you can launch the rqt-graph, which shows you a visualized link between publishers and subscribers, which, initially, may not seem very useful, until you start launching other things, like so...

rqt graph turtle key2

This is what you see when yer just running the turtle with the teleop-key sending signals to the turtle

And if you open up another window and run an echo of the teleop-key (kinda like spying on it) you'll see that the echo is also noticed

rqt graph echo

And if you run yer mouse over each of the circles, they will change colors to show you where they're connected to. And each new window you open will bring in a new circle with a new link

rqt graph pub

See ? Wasn't that fun ?


   
ReplyQuote
Page 6 / 7