ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
4

ROS Beginning

asked 2012-01-11 08:35:51 -0600

sen gravatar image

updated 2012-01-11 10:28:07 -0600

Eric Perko gravatar image

Hi All,

I am new to ROS. I have been programming Pioneer and Coroware robots using Player for a while now. But now I have to venture into ROS.

I went through more or less the whole ROS tutorials on ROS-Wiki, but could not find any convincing place where it explains how to write an application in ROS to run a robot.

Any help will be highly appreciated.

Thanks, Sen

edit retag flag offensive close merge delete

Comments

Do you have a specific robot in mind? Does it matter for you in what language is the program?
Dimitar Simeonov gravatar image Dimitar Simeonov  ( 2012-01-11 08:55:37 -0600 )edit
@sen Patience ! spend enough time before coming down to conclusions ! You may need 1 - 2 weeks to let it all absorb into you. ROS tutorials are the best resource known to me.
Arkapravo gravatar image Arkapravo  ( 2012-01-11 13:19:39 -0600 )edit
ROS is more powerful than Player, but not fundamenately different.
joq gravatar image joq  ( 2012-01-11 13:23:15 -0600 )edit
@Dimitar ...Yes Coroware Explorer is the robot and language C++ . I am trying to go through the suggested links. Thanks
sen gravatar image sen  ( 2012-01-12 07:58:05 -0600 )edit
Take a look at the ROS page for Corobot: http://ros.org/wiki/Robots/Corobot if you haven't already.
ahendrix gravatar image ahendrix  ( 2012-01-12 14:31:18 -0600 )edit
@ahendrix Have you used that Corobot package ? Does it have a stage/ gazebo model for the Corobot ?
Arkapravo gravatar image Arkapravo  ( 2012-01-12 18:36:29 -0600 )edit
@Arkapravo I haven't worked with that package or the corobot at all; I just spotted it on the wiki and thought it might be of interest.
ahendrix gravatar image ahendrix  ( 2012-01-13 03:23:46 -0600 )edit
@ahendrix : I did come across the coroware corobot package .Since I have no idea how to use ROS as of now, I could not play around with it much. But thanks.I have installed ROS diamondback and have gone through the publisher/ subscriber & Service/Client C++ codes bt still not able to figure out much
sen gravatar image sen  ( 2012-01-13 06:55:48 -0600 )edit

5 Answers

Sort by ยป oldest newest most voted
10

answered 2012-01-11 13:44:51 -0600

weiin gravatar image

Just like you, I was new to ROS just 3 months ago. So my idea of "programming a robot" was to write codes that will run on a microcontroller (that pretty much runs everything from the motor control to the sensors and communication).

How I finally got my two wheel robot running using ROS:

  1. The tutorials (the publishing/subscribing one that Dimitar pointed out was very useful)
  2. Looking at the codes for turtlebotsim and turtlebot
  3. Using the tutorials to see how the turtlebot codes are related (in particular what each node publishes, and which nodes subscribe to that topic)
  4. The easiest was the 'cmd_vel' topic where you can see the result in both turtlebotsim and turtlebot (if you have it). So this was the starting point to get my own robot working.
  5. With the turtlebot_teleop node/code already there, I started writing my own subscriber to printout what was on 'cmd_vel' while running the teleop program, and then progressing to pushing the 'cmd_vel' values out onto my robot motors.
  6. Once I got the basic idea of how the nodes run separately, yet are connected through ROS topics, I progressed to writing publishers/subscribers for sensor data.

I think the crucial step for me while learning ROS was the understanding that there is no longer a need for a central brain/control to tell the robot to 'do this at this time'. Instead, each robot module (sensors, motors) would just do what they do best when they see something published. Eg. motors subscribe to a robot velocity command and convert that into wheel velocity; sensors just keep reading and publishing their readings, without the need to know what the readings are used for.

edit flag offensive delete link more
2

answered 2012-01-17 02:13:54 -0600

Hi, using an Arduino would be great while beginning the actual hardware implementation of a robot running ROS. You can write a ROS node running in arduino, subscribing and publishing topics from and to the other nodes running on a computer.

The rosserial package helps a lot in accomplishing this. The arduino will be connected to a USB port of the computer and all the motors, sensors and such stuff can be interfaced with arduino. I am a beginner in ROS and presently working on a personal robot named chippu as a hobby project. More details, including all the codes can be had from my blog

edit flag offensive delete link more

Comments

@achuwilson It's great to find a Arduino support in ROS. Thanks
sen gravatar image sen  ( 2012-01-19 06:40:28 -0600 )edit
2

answered 2012-01-11 09:00:11 -0600

There is nothing special about "applications in ROS". Any program that you write can be a ROS application if it communicates via ROS with other processes.

This place provides some good examples of how to communicate with ROS topics which you can incorporate into your program: http://www.ros.org/wiki/ROS/Tutorials/WritingPublisherSubscriber(python)

edit flag offensive delete link more
1

answered 2012-01-16 06:20:05 -0600

sen gravatar image

@All ... So after going through all the ROS tutorials on their Wiki, now I wrote my own package which can run the turtle in the turtlesim the way I want.

Having that, can anyone tell me how can such a code be translated into a real working robot.Like running real wheels on a robot(forward / backwards / turn).

Thanks a lot.

Sen

edit flag offensive delete link more

Comments

Can you upload the code? It would help a lot.
jlo gravatar image jlo  ( 2012-01-27 03:11:36 -0600 )edit
1
I suggest that you ask more concrete questions in their own thread. There's lots of ways to do this on lots of robots. Until you have a specific application you're not going to get very concrete results. In particular you need to pick a robot first. take a look at http://ros.org/wiki/Robots
tfoote gravatar image tfoote  ( 2012-01-31 04:16:54 -0600 )edit
I just wanted to get ideas for writing the code on setting up the simulation on publishing and subscribing data with ROS (position information, for example).
jlo gravatar image jlo  ( 2012-01-31 19:34:04 -0600 )edit
1

answered 2012-01-12 07:56:30 -0600

sen gravatar image

Thanks a lot Dimitar & Welin. I am going through those tutorials now.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-01-11 08:35:51 -0600

Seen: 2,265 times

Last updated: Jan 17 '12