PDA

View Full Version : ROS? And how can it help me?



SuperMiguel
10-15-2012, 11:30 AM
So im just getting stared into bipeds and hexapods robots , and just saw this Robot Operating system, i read the overview of it.. but still unclear, in the pass i used arduino and regular AVR chips to control my wheeled based robots.. But now im getting into bipeds may want to change that...

So it seems like a very famous controller in this forums is the arbotix... But i tough that it runs arduino code with the library they provide.. But i now see that arbotix is supported by ROS..

But what exactly is robot OS? I saw that i need to know python and C++ which i do... So again what is it? how is it better than arduino? does it support simulation or it is just a way to put code into your robot?

jwatte
10-15-2012, 01:57 PM
As far as I can tell (not being a user of it,) ROS is a way to structure the different processes and libraries that go together to make an integrated robot.
There are many different pieces (webcam recording, sensor readings, path planning, servo control, ...) that are all developed to an interface specific to ROS, so that, in theory, you can swap out any one piece and it will still work with the others.
For example, for servo control, there may be a sketch that can run on the ArbotiX that understands about the ROS servo control serial commands, but there might also be a Raspberry Pi or Arduino Mega variant that understands the same serial protocol and can also drive servos.

lnxfergy
10-16-2012, 01:19 PM
ROS is mainly about making it easier to build and share robot code, by having standard interfaces and a modular structure. It's targeted mainly at larger robots which are running a full linux computer as their main brain. It offers lots of code/libraries related to things like computer vision, object recognition, grasping and manipulation.

On the other hand, Arduino is a development environment specifically for the AVR. Of course, the biggest difference between an AVR and PC is that the AVR has lots of IO, timers, etc and can easily run realtime control loops. When using an ArbotiX with ROS, the ArbotiX is basically a bridge between the sensors/servos and the PC. The PC-side code exposes standard interfaces which allow you to run some of the same programs that were designed for the $400k PR2 robot on a much lower cost robot (such as Maxwell (http://forums.trossenrobotics.com/showthread.php?4654-Maxwell-A-Mobile-Manipulator)).

-Fergs

Pi Robot
10-17-2012, 08:24 AM
The only thing I might add to what Fergs said is that ROS is a fairly big commitment. If you are starting from scratch, expect to spend a fair bit of time getting up to speed, especially if you're not already a Linux user. Having said that, the payoff is huge, so if you're into robotics for the long haul, it is definitely worth taking a good look at.

--patrick

SuperMiguel
10-17-2012, 05:53 PM
Any good way / guide on how to get started??

Edit: I'm ok with python and c++ and been using Linux for about 5 years

Gertlex
10-17-2012, 06:31 PM
Using my years of robotics experience, I googled "ROS tutorial" and voila, official: http://www.ros.org/wiki/ROS/Tutorials

SuperMiguel
10-17-2012, 07:44 PM
Using my years of robotics experience, I googled "ROS tutorial" and voila, official: http://www.ros.org/wiki/ROS/Tutorials

How about hardware im guessing to really learning i better do something with an actual robot... Do you guys recommend any specific hardware to get stared with ROS???

SuperMiguel
10-18-2012, 09:48 AM
So it seems like i misunderstood how ROS worked... So now i think i understand it better how it runs (hardware wise)

So basically you always need some kind of controller, that you send a signal to using ROS.. ROS can be installed on a mini computer installed in the robot or a PC and it will be sending the signal using something like xbee...

So basically all i need if i want to build lets says the Phantom X with ROS.. Is the Phantom X kit one that comes with everything, so it will have an arbotix, and install ROS on my laptop, then using the xbee send the signal from ROS to it... And then eventually if i want it to run with out my laptop i would need to buy either a mini pc like the fit-PC2i, or one of those Roboboards, connect my Arbotix to either my fit-PC2i/Roboboard, and do the programming directly into them...

Did i get any of this right??

jwatte
10-18-2012, 05:38 PM
Did i get any of this right??

More or less. There may be enough space left in the ArbotiX that you could put your logic there. All you need for a crude explorer is "move forward" and "if there's something blocking my ping sensor, turn left" for example.

Other small Linux systems you could consider instead of fitpc include the Raspberry Pi, the BeagleBone, the PandaBoard ES, or one of a phletora of cheap, rootable Android tablets...

SuperMiguel
10-18-2012, 11:12 PM
how would that work? just the Arbotix and install ROS on it?? i dont think thats possible

jwatte
10-18-2012, 11:41 PM
Just the Arbotix, and hand-coded behavior (using the Arduino IDE, or avr-gcc.) For simple behaviors and sensors, you don't need all of ROS.

SuperMiguel
10-19-2012, 12:14 AM
Well few guys recommended that its a prettygood platform, and i read online multiple people saying the same thing. So i guess ill give it a try i was just saying to get the phantom X kit, the one that comes with the arbotix, and AX12 and then use ROS to completelly program it.. Im sure ill learn how to use ROS that way

lnxfergy
10-19-2012, 12:49 AM
I think the principle of "one size does not fit all" applies here. This all really comes back to the guiding principle that embedded controllers (like Arduino/ArbotiX) are good at things that need to be real-time (like control loops), while PCs are good at really processing intensive things like vision, planning, etc.

If you want to build a robot that uses cameras, laser-range finders, or Kinect-like sensors then ROS is the way to go. You'll get essential drivers and software like OpenCV or the Point Cloud Library, possibly things like autonomous navigation.

If on the other hand, you are building a robot that has very little sensory (i.e. a Sharp IR sensor) and is basically a walking robot, then ROS has little to offer and you should probably continue with the AVR/Arduino environment for development. ROS really doesn't have much in the way of utilities for kinematics of walking robots (it does have lots of stuff for high DOF robot arms).

-Fergs

SuperMiguel
10-19-2012, 05:51 AM
Gotcha, thanks guys

SuperMiguel
10-19-2012, 06:22 AM
So i got this guy: http://www.dfrobot.com/index.php?route=product/product&path=37_111&product_id=361#.UIE3F2_A_ng havent done much to it lately, but you guys make it sound like ROS would be perfect for this bot... It has about 20 sensors all around it, and i wanted to add a camera to it... Before i had it avoiding obstacles, but i'll probably want to just create a map of the room that it is in... So if i wanted to do that i would need some kind of motor controller, and some kind of board to connect those sensors to... So how does it work when you buy like a fititpc? how do you connect sensors/cameras to it? do you need another board?

Th232
10-19-2012, 07:22 AM
You connect sensors to a fit-PC like you would any other computer. In the case of a camera, if it has a USB connection you just plug that in to one of the USB ports. Other sensors may or may not need something between the sensor and the fit-PC, depending on what the sensor output is.

Given that the robot you've linked to has mounting holes specifically for a mini-ITX motherboard, why not put together your own computer instead of putting a fit-PC on it?

SuperMiguel
10-19-2012, 07:36 AM
i guess i could, and same some money... also how do you connect sensors to a computer?

Th232
10-19-2012, 07:49 AM
Depends on the sensor, but generally involves some kind of microcontroller between the two. The closest to an off-the-shelf solution would be an Arduino/ArbotiX of some type, or you could go make your own board.

SuperMiguel
10-19-2012, 07:53 AM
Gotcha, So i could get something like this: http://www.newegg.com/Product/Product.aspx?Item=N82E16813186211 (http://www.newegg.com/Product/Product.aspx?Item=N82E16813186211&name=Intel-Motherboards) buy an arbotix/arduino/x connect it using USB and good to go..

Th232
10-19-2012, 08:00 AM
That board should fit. Just to be on the safe side though, don't forget all the other components of the PC (CPU, RAM, power supply...) and how much space/weight they'll take up.

SuperMiguel
10-19-2012, 08:11 AM
yup yup =) cool thanks ill post back in few minutes the configuration

SuperMiguel
10-19-2012, 08:28 AM
So i'll probably get: http://www.newegg.com/Product/Product.aspx?Item=N82E16813121442 i have the ram and the HD... And for the PSU i could use this: http://www.logicsupply.com/products/picopsu_80 Since i have this battery as my power source: http://www.batterymart.com/p-12v-7ah-sealed-lead-acid-battery.html

So thats about $110, i guess i could save some cash by buying a use mini itx in ebay.

tician
10-19-2012, 10:43 AM
The robot you linked to comes with an arduino-compatible control board with integrated motor drivers and all of the sensors already connected to it. You will use rosserial to interface the arduino board to roscore and other nodes running on the laptop. See here (http://www.ros.org/wiki/rosserial/Tutorials).


An example:
Damdeok is a DARwIn-OP. Damdeok has a fit-pc2-sbc for most gait control and processing, and a CM-730 for interfacing to the servos using the standard DARwIn-OP framework. Darsha is a heavily modified 4WD omni-wheeled robot from a company that will not be named. Darsha has an arduino and two laptops; the arduino controls the gearmotors, the first laptop is the hub/master (runs roscore and connects to the arduino using rosserial), and the second laptop is connected to a kinect (running windows for now) for all vision processing. The fit-pc2, hub laptop, and vision laptop are all linked together using an ethernet router (wired for laptops with potential for 802.11n to connect to Damdeok - although since there is already a power tether, why not use wired?). Damdeok has a barebones ros installation to allow him to interface to the hub laptop (and its ros nodes) seamlessly over ethernet. The vision laptop is running windows, so must use rosbridge to interface with roscore and nodes running on the hub laptop.


Darsha has four 64:1 gear motors with 12CPR quadrature wheel encoders on the motor shaft (768 counts/revolution of the wheel with directional sensing based on phase difference between the two input channels). She currently has an arduino-based controller with two 2-channel motor drivers (same make/model as those on the Romeo in your robot) and enough inputs for the quadrature encoders (two per motor). The arduino controls the motors using a poorly implemented PID controller (taking the encoder data and calculating an 8-bit PWM and direction output for each motor). The arduino uses rosserial packets to communicate with a rosserial node running on the hub laptop over the built in USB2UART connection (the FT232RL on the arduino). Darsha will hopefully get a rebuild sometime soon with new dynamixel-compatible gear motors+controllers (with quadrature encoders and internal PID control) and a CM-730 which will subscribe to the "/cmd_vel_darsha" topic ("geometry_msgs::TwistStamped" messages) via rosserial to calculate the desired velocity for each wheel and then blend the returned wheel velocities with its IMU data (gyro and accelerometer) to produce far more accurate odometry to be published to the "/odom_darsha" topic ("nav_msgs::Odometry" messages) via rosserial.

Damdeok is mostly autonomous at the moment, but will eventually be receiving motion trajectory (walk in some direction at some rate - subscribes to "/cmd_vel_damdeok" topic) and pose commands (wave, stand on one leg, etc. - likely implemented only as services) from the hub depending on human interactions with him (human poses/actions received from the vision laptop, voice commands from headsets or microphones, etc. all processed by nodes running on the hub laptop to determine the appropriate response by Damdeok) and publish its (currently rather poor) odometry to the "/odom_damdeok" topic.

SuperMiguel
10-19-2012, 11:02 AM
Wow nice =) thanks for that write out... I actually got the http://www.dfrobot.com/index.php?route=product/product&path=37_111&product_id=63#.UIF5J2_A_ng the non electronics version of it... but i do have an arduino romeo around my house..

SuperMiguel
12-12-2012, 09:06 PM
I kinda want to imitate this robot: http://forums.trossenrobotics.com/showthread.php?4654-Maxwell-A-Mobile-Manipulator

But i want my base to be this one: http://www.dfrobot.com/index.php?route=product/product&path=37_111&product_id=63#.UMlFRbT3BT5 (i got ram/HD and will use this PSU: http://www.logicsupply.com/products/picopsu_80 )

So i been thinking to add a computer to it.. Will something like this work: http://www.newegg.com/Product/Product.aspx?Item=N82E16813121442

T (http://www.newegg.com/Product/Product.aspx?Item=N82E16813186211)hen i have to find which board to use for sensors, eventually want to use a xbox kinetic sensor which connects use to that MB.


Should i worry about getting that MB, or just get a raspberry pi?

tician
12-12-2012, 09:48 PM
How do you plan to power it all?

The psu is good for ~80W continuous (100W with extra cooling), but that combination of parts will likely require a bit more when it finally has a processor added (35~95W is just the thermal power that can be dissipated by the CPU, not necessarily total power drawn).

jwatte
12-12-2012, 10:15 PM
Some things about the pico psus:

- For a 3S or 4S LiPo or 4S LiFe battery with wide voltage range, you will want the wide input version.
- most modern motherboards use 24 pin power, so a converter is needed. This adds bulk.
-Most cpus want a 4 pin cpu power connector. Buy a ata power to 4 pin converter.
-I run a core i5 2400 on 95w tdp but I haven't ever seen the entire system draw more than 60w sustained even when running 4-way parallel jobs. I don't use the gpu though, which probably helps.

SuperMiguel
12-13-2012, 04:12 AM
I have this battery on it at the moment: http://www.batterymart.com/p-12v-7ah-sealed-lead-acid-battery.html

SuperMiguel
12-13-2012, 07:24 AM
i was thinking to go with one of the board wih built in atom cpu but i read that they are not that great and could be under power for what i want to do.. So not sure which CPU ill use..

jwatte
12-13-2012, 11:41 AM
Yes, the non-WI versions are designed for lead/acid batteries, as found in cars. The only drawback there is the weight :-)

SuperMiguel
12-13-2012, 12:36 PM
but this thing can hold a fair amount of weight, and i have that battery already... Si besides weight is this better than a lipo or something that weights less? Like how long it will hold its charge, etc
?

SuperMiguel
12-13-2012, 12:42 PM
jwatte i know you got a I have a 120 Wh battery built from four 10 Ah LiFePO4 battery cells that wont run for over 1h... In my case i just need it to run for about 30 min

jwatte
12-13-2012, 04:01 PM
If the battery you have works, then keep it! I would still recommend the wide-range version of the PSU if you haven't already bought the other one, or can exchange it. It gives you more options down the line.

The runtime of my battery varies a lot with how hard I drive the motors of the rover. When just using the computer (motors are still) runtime is > 5h. At 10A load, yeah, it only runs for an hour!

SuperMiguel
12-13-2012, 08:18 PM
Yes I have the battery but not the psu. I don't have the mb either just trying to figure out which one to get :(

jwatte
12-13-2012, 08:46 PM
If you can find an acceptable motherboard with 20-pin power connector, that will save you the bulk and inconvenience of an adapter. I think that will be hard these days, though.

SuperMiguel
12-14-2012, 07:03 AM
Cool, well 2 things, the WIDE input one only comes with a 20-pin connector as you said, but it doesnt include a 4 pin cpu power cable which ill probably need if i get one of the new boards...

How necessary or what exactly does the wide input offers? I know it lets me use inputs range from 12-25v, where the no wide one only uses 12V but since my battery is 12V why would i need the wide input?

This http://www.logicsupply.com/products/picopsu_160 will work with the 24 pin and has cpu power cable but no wide input

SuperMiguel
12-14-2012, 07:11 AM
MB: www.newegg.com/Product/Product.aspx?Item=N82E16813186211
CPU: www.newegg.com/Product/Product.aspx?Item=N82E16819115078
PSU: www.logicsupply.com/products/picopsu_160
Battery: www.batterymart.com/p-12v-7ah-sealed-lead-acid-battery.html
Case: www.dfrobot.com/index.php?route=product/product&path=37_111&product_id=63#.UMlFRbT3BT5

jwatte
12-14-2012, 12:24 PM
When I looked, none of the picoPSUs came with 24-pin power, and none of them came with 4-pin CPU connectors. Thus, you always had to use the adapters.
This guy goes from the ATA power connector to 4-pin: http://www.amazon.com/CablesToBuy-Power-Supply-Connector-Adapter/dp/B0012SM2SC/ref=sr_1_4?s=pc&ie=UTF8&qid=1355509042&sr=1-4&keywords=4+pin+connector
That still leaves the SATA power for your disk.
This guy goes from 20-pin to 24-pin: http://www.amazon.com/StarTech-com-6-Inch-Motherboard-Adapter-ATX2024MF/dp/B0002GRTZQ/ref=sr_1_1?s=electronics&ie=UTF8&qid=1355509101&sr=1-1&keywords=20+to+24+pin+adapter
It's very stiff and bulky, though.

Wide input is useful if you think you'll ever use a different battery chemistry or power source. If not, then don't worry about it.

If the pico160 was wide input, it would be perfect :-) Note that something that requires "12V regulated" input probably shouldn't be run off a 12V battery, even if it's lead-acid, because the voltage range of that battery across charged vs discharged will be about 12.6V through 10.5V.

SuperMiguel
12-14-2012, 01:31 PM
So whats my best bet battery wise? you told me to keep it but that it may not work since those not input wide PSU may not work?

So what you are saying is keep my baterry, get one of those wide input picoPSU, and get both of those cables you listed? and done with it

jwatte
12-14-2012, 11:10 PM
So what you are saying is keep my baterry, get one of those wide input picoPSU, and get both of those cables you listed? and done with it

That would be the easiest!

If you already have a non-wide-input PSU, then keep the battery, get the adapter cables, try the battery with the PSU, and if the PSU doesn't complain, then you're good. If it does complain, you can fix it by getting the wide-input PSU.

SuperMiguel
12-15-2012, 12:43 AM
i dont have the psu just the battery

SuperMiguel
12-18-2012, 09:31 PM
Also how do i connect the picoPSU to a battery the connector in the picoPSU looks like a ac adapter connector

jwatte
12-18-2012, 11:23 PM
You either get the matching plug and solder it onto your battery connectors, or you cut the wires close to the female connector of the PSU, strip the wires, and use whatever connector you think is good. Screw terminals, alligator clips, banana plugs, Dean-style T connectors (my favorite,) etc.
If you're not yet comfortable cutting wires, stripping insulation, and soldering, those are probably skills you're going to have to practice while building robots :-)

SuperMiguel
12-19-2012, 11:04 AM
Thanks for all your help jwatte

So i ordered the PicoPSU-120-WI-25 also ordered this board: http://www.newegg.com/Product/Product.aspx?Item=N82E16813128567

Will order next this CPU: http://www.newegg.com/Product/Product.aspx?Item=N82E16819116507 and this ram: http://www.newegg.com/Product/Product.aspx?Item=N82E16820148663

jwatte
12-19-2012, 02:19 PM
Very nice! Don't forget the 20-to-24-pin adapter plug, and the ATA-molex-to-ATX-12V adapter cable as well.

SuperMiguel
12-19-2012, 02:43 PM
What do you use for storage? Was thinking to get one small SSD drive, like this one: http://www.newegg.com/Product/Product.aspx?Item=N82E16820171667 but not sure how much storage i would need

tician
12-19-2012, 03:24 PM
What do you use for storage? Was thinking to get one small SSD drive, like this one: http://www.newegg.com/Product/Product.aspx?Item=N82E16820171667 but not sure how much storage i would need
From the newegg details page:

Simple plug & play caching device to boost overall PC system performance

Condusiv ExpressCache software + SanDisk ReadyCache SSD (32GB)

SanDisk ReadyCache is NOT a HDD replacement

Quick Installation: No need to reinstall OS or clone HDD

Frequently used data is cached on SSD while HDD maintains full copy of all data
I was extremely tempted to grab one until I read that. There are some reviews that do mention it being possible to use as a plain SSD, but I am still a bit hesitant. I like things that are exactly what they say on the tin, so to speak.

Size wise, that should work well enough. My netbook is using a full Xubuntu and ros install on a 54 GiB partition with 31GiB to spare. The ros-fuerte install, with quite a few extra packages, is only ~2.3GiB (not including non-ros components). A non-gui linux + barebones ros install can easily fit on a 4GB SSD on a fit-pc2i-sbc in a DARwIn-OP.

jwatte
12-19-2012, 08:20 PM
I'm using a $50 Corsair 30 GB SSD, that works fine for me. I run nilfs2 on it, using Arch Linux, FWIW.

tician
12-23-2012, 11:24 PM
Me want. (http://www.newegg.com/Product/Product.aspx?Item=N82E16820226246) It is probably an unnecessary replacement, but I still wants it. Plus, 60GB should be large enough for all my ROS/coding/gradschool needs while still small enough to keep my digital hording in check.

lnxfergy
12-23-2012, 11:31 PM
If you watch Amazon, the 60GB 2.5" SSDs from Intel (the 330 series) often hover around $60. Currently they are showing $70 from a third party vendor, but I know when I picked up one direct from Amazon itself a few weeks bag it was $62 and change.

-Fergs

tician
12-24-2012, 02:30 AM
If you watch Amazon, the 60GB 2.5" SSDs from Intel (the 330 series) often hover around $60. Currently they are showing $70 from a third party vendor, but I know when I picked up one direct from Amazon itself a few weeks bag it was $62 and change.

-FergsSince the netbook seems to be working fine after changing over to 12.04 on the second partition, I will probably not be able to convince myself that the new drive is a necessary expenditure for a little while longer. Regardless, I will definitely be watching amazon and newegg, and drooling.

SuperMiguel
12-24-2012, 01:10 PM
is there a big diffidence between a 65W compared with 77W CPU? Like will my battery be affected big time??? im getting a very good deal on a i5-3330 cpu

also isit worth it to get an i7 cpu? or i5 is more than enough?

jwatte
12-24-2012, 05:32 PM
An i5 is likely more than enough. There is not a big difference between different desktop CPUs when they are run at the same level of load. It's just that the faster CPUs can do more, and when they do, they use more energy.

SuperMiguel
01-02-2013, 07:13 AM
Finally finish my computer setup, installed ROS fuerte, But im having a bit of an issue understanding how to use ROS, i did some of the tutorials in here: http://www.ros.org/wiki/ROS/Tutorials but didnt quite get it.. Are there better tutorials out there? Or thats about it? Any books?

tician
01-02-2013, 09:37 AM
There are a few nice tutorials here (http://www.pirobot.org/), and even a book if you want more. Some of the sphinx install commands were a bit old, but there was another thread here not long ago that discussed how to get everything working for ros-fuerte (should be mostly up to date, though I have not checked recently).

SuperMiguel
01-03-2013, 02:52 PM
Thanks Tician thats actually what i was looking for.. Thanks :)