Example code for Unit 1

126 views
Skip to first unread message

Conrado Miranda

unread,
Feb 24, 2012, 10:02:01 PM2/24/12
to Programming a robotic car in ROS
Hello, guys!

As promised, created the repository (https://bitbucket.org/
mirandaconrado/roboticcar_ros/overview) and uploaded some stuff there.

I implemented the simple 1D robot of the class and used most of the
features of ROS. The code is little messy and may be poor written, but
I did my best (I'm learning python for the class, never used before).
I chose to use python because I know that everyone knows at least a
little.

The code has 4 nodes:
- world_model: has the model for the world and is used by everybody!
- sensor: senses the world when it receives a message about the
position of the robot
- position_manager: the simulator itself.
- position_guesser: the code we implemented in class. It gets
information from movement and sensor and creates the probability for
each position.

I used services, topics and parameters, so I think it's a really
complete example for someone wanting to understand how to build a
system (some things I'd differently, but I found that way more
didactic).

It has a launcher (so you can use roslaunch) and I made a example
script named "run.sh". It creates an example world and plots the
probabilities. It started as an example of how to interact with the
system, but I ended liking it =]

I didn't make a script so that the user can interact with the system
directly, but anyways...

So, any question, just ask.

Conrado Miranda

unread,
Feb 24, 2012, 10:03:56 PM2/24/12
to Programming a robotic car in ROS
Almost forgot: when you create an account in bitbucket, please send me
(here or by direct e-mail) the user so that I can give write
permission.

Conrado Miranda

unread,
Feb 24, 2012, 10:06:48 PM2/24/12
to Programming a robotic car in ROS
One more thing (sorry about the spam. This is the last, I swear): if
someone doesn't understand something or wants me to make a tutorial
explaining the program, just ask. I've thought about that and I don't
know if it is necessary.

If you want to start playing with it, it's very modular and you should
follow the order I gave above, as that is the order I think is the
best one.

Gosign | Jan Heuer

unread,
Feb 25, 2012, 6:23:16 AM2/25/12
to robotic...@googlegroups.com
thx, works great.


--

Mit freundlichen Gr��en
Jan Heuer


** NEUE POSTADRESSE ** NEUE TELEFONNUMMER **

we web heroes: www.dkms.de
We web wwf: www.saveaswwf.com
We web afrika: www.operndorf-afrika.com
We web pink: www.bebegeneration.de
We web green: www.greenpeace-hamburg.de

Gosign media. GmbH | We web ideas.
Langenfelder Damm 67 Gewerbehof | 22525 Hamburg
Telefon (0 40) 609 40 79 - 21

Handelsregister AG HH HRB 112197 | Gesch�ftsf�hrung Bert Gogolin
Greenpeace energy: Gosign l�uft mit ehrlichem Strom.

MerseyViking

unread,
Feb 25, 2012, 6:24:47 AM2/25/12
to Programming a robotic car in ROS
Fantastic work Miranda! It's not spam at all, it's great that we're
all enthusiastic about it.

My bitbucket username is MerseyViking

-MV

gadolfvh

unread,
Feb 25, 2012, 10:01:23 AM2/25/12
to Programming a robotic car in ROS
Hi Miranda,

my username is gustavo_velascoh, I hope I could begin coding this
weekend.

Thanks a lot.

Gustavo.

Conrado Miranda

unread,
Feb 25, 2012, 11:03:15 AM2/25/12
to robotic...@googlegroups.com
I'll probably start playing with the simulator this weekend.
Message has been deleted

Conrado Miranda

unread,
Feb 25, 2012, 7:57:25 PM2/25/12
to robotic...@googlegroups.com
I prefer C/C++ than python, but I wasn't sure about everybody.

On 2/25/12, gadolfvh <gustavo....@gmail.com> wrote:
> Just a question for everyone...
>
> How are you with all C/C++?


>
>
> On 25 feb, 11:03, Conrado Miranda <miranda.conr...@gmail.com> wrote:
>> I'll probably start playing with the simulator this weekend.
>>
>>
>>
>>
>>
>>
>>

>> On Sat, Feb 25, 2012 at 1:01 PM, gadolfvh <gustavo.velas...@gmail.com>

Miguel Gómez Gonzalo

unread,
Feb 25, 2012, 9:17:17 PM2/25/12
to robotic...@googlegroups.com
Well, I wanted to learn python for a long time and I see the course as
a great opportunity to do it, so I'd say we use it here too, but I
really don't mind going with C/C++ if you want :)

Alternatively we could use both... (?)

--
Enviado desde mi cubo de la fregona.

Conrado Miranda

unread,
Feb 25, 2012, 9:21:06 PM2/25/12
to robotic...@googlegroups.com
I like the idea of using both. As the architecture is modular, we can
use one or the other depending on the available libraries and on how
fast the code needs to be.

Right now I'm studying the urdf language to see if we can get a simple
car model working fast.

2012/2/25 Miguel Gómez Gonzalo <cape...@gmail.com>:

Gustavo Adolfo Velasco Hernández

unread,
Feb 25, 2012, 9:48:39 PM2/25/12
to robotic...@googlegroups.com
I like the idea too. I think that for learning purpose and for the course would be fine to use python. Also, using C++ let someone of us to develop faster and more comprehensible code.

Parallel coding in C++ and python sounds nice.

I'm in :D

Akshay Verma

unread,
Feb 26, 2012, 5:49:18 AM2/26/12
to robotic...@googlegroups.com
Sorry for the late entry into the discussion!

I agree with the parallel coding method too.

Regards,
Akshay Verma
Glasgow.


2012/2/26 Gustavo Adolfo Velasco Hernández <gustavo....@gmail.com>

Andy

unread,
Feb 26, 2012, 7:17:47 AM2/26/12
to robotic...@googlegroups.com
I vote parallel (because I don't know C/C++).

By the way, I just signed up to Bitbucket and my username there is AME123.

Andy

Miguel Gómez Gonzalo

unread,
Feb 26, 2012, 7:48:24 AM2/26/12
to robotic...@googlegroups.com
BTW, we should think too if we're going to use gazebo 1.0.0-RC2 (it will be released with ROS Fuerte) or the built-in gazebo that comes with ROS Electric...

I'd vote for 1.0.0 as that's the one I'm using for my own project, but again I leave it up to you :)

--
Enviado desde mi cubo de la fregona.

John Donovan

unread,
Feb 26, 2012, 9:13:50 AM2/26/12
to robotic...@googlegroups.com
I'm equally happy coding C/C++ and Python, choosing the right tool for
the job. A good model that's being used on the Quantum GIS project
(www.qgis.org), is that the core is in C++ and plugins are (usually)
written in Python. This doesn't translate precisely to a ROS project
because of its distributed nature, but it should definitely be worth
considering something similar.

-MV

2012/2/26 Miguel Gómez Gonzalo <cape...@gmail.com>:

--
One of the advantages of being disorderly is that one is constantly
making exciting discoveries. - AA Milne

Conrado Miranda

unread,
Feb 26, 2012, 11:41:21 AM2/26/12
to robotic...@googlegroups.com
I agree with John. Python is a great language to extend a intensive core.

About the version of gazebo, I prefer to use the one that comes with
Ubuntu 11.10. I'm usually in favor of using the newest version, but
that would require some hand compilation. I'm OK with that usually,
but the computer I will be developing is strictly for research and I
try to keep it as clean as possible to avoid problems.

I'll see what I can do (maybe install with some other directory as
root), but I'm not sure right now.

Opinions are welcome =]

aeroaks

unread,
Feb 26, 2012, 12:35:39 PM2/26/12
to Programming a robotic car in ROS
My id is aeroaks

Miguel Gómez Gonzalo

unread,
Feb 26, 2012, 1:02:10 PM2/26/12
to robotic...@googlegroups.com
What do you mean by "the one that comes with Ubuntu"? If you mean that
you can install it with apt-get you can install both that way.

sudo apt-get install ros-fuerte-simulator-gazebo

Or something like that. I'm not on my computer...

--
Enviado desde mi cubo de la fregona.

Miguel G.

unread,
Feb 26, 2012, 8:35:08 PM2/26/12
to robotic...@googlegroups.com
My username at bitbucket is Capelare, btw ;-)

Conrado Miranda

unread,
Feb 26, 2012, 9:48:06 PM2/26/12
to robotic...@googlegroups.com
Fuerte is the next version? I followed the tutorials to install and
got the Electric. I'll be able to install whatever I want when I get
my desktop development station running, but I don't have a estimate
yet =/

Klaus Raizer

unread,
Feb 27, 2012, 7:34:46 AM2/27/12
to robotic...@googlegroups.com
My bitbucket username is krprojects    :)

cheers


Klaus

jescasany

unread,
Jul 9, 2012, 1:02:36 PM7/9/12
to robotic...@googlegroups.com

Awesome work Conrado, my bitbucket is jescasany.

Thanks

agucaverzasi

unread,
Aug 28, 2012, 2:23:27 PM8/28/12
to robotic...@googlegroups.com
Hi miranda, i have a question, this work for Linux? 'cause i been working with C# in a project with Kinect in Windows, so I installed ROS for Windows to apply the concepts of the course plus ROS in my project..

Thanks!

(and also I say sorry for my english. If you find a mistake please leave a comment) 
Reply all
Reply to author
Forward
0 new messages