ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Suggestions to write my first application for ROS?

asked 2011-10-04 22:45:13 -0600

jlo gravatar image

updated 2011-10-04 22:51:53 -0600

Hi, Since I will have to do a project with ROS further down the road and I just finished the tutorials, I was wondering for any suggestions referring what could be a 'simple to implement' application I could write for a ROS package to get used to its environment. My project will be related to position, lasers and camera, so if it has something to do with it, even better. I will be only able to test it with stage/rviz (not a real robot, I mean).

Any suggestions are welcome, Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2011-10-04 23:26:19 -0600

updated 2011-10-05 21:48:39 -0600

I don't really have an idea for a simple application right now, but here is how you can set up a simulation environment that is "almost" like a real robot.

Instead of stage, you should also have a look at Gazebo (especially if you want to experiment with camera images). If you want to keep it simple, I would recommend looking at the Turtlebot; it is very well-supported in Gazebo, so it's almost like working with a real robot, and less daunting than the PR2.

You can use the turtlebot_empty_world.launch launch file from the turtlebot_gazebo package, or use the following modified launch file to give you a more interesting world:

  <param name="/use_sim_time" value="true" />

  <node name="gazebo" pkg="gazebo" type="gazebo" args="-u $(find gazebo_worlds)/worlds/" respawn="false" output="screen"/>

  <include file="$(find turtlebot_gazebo)/launch/robot.launch"/>

This gives you a fake laser scan(*) on the /scan topic ("fake" because it's computed from the Kinect data), camera data on the subtopics of /camera/, and position information via the /odom topic and via the tf transform from odom_combined to base_link.

(*) be aware of this bug, though.

Edit: Okay, so what about this simple application: Write a behavior that makes the robot randomly explore its environment while avoiding to run into obstacles. You would have to subscribe to the scan topic for obstacle detection and publish messages to the cmd_vel topic to make the robot move.

edit flag offensive delete link more


Hi Martin--I wanted to try your suggestion myself but when launching the above file I get the following error when running the latest Electric debian packages under Ubuntu 10.04: "loading model xml from ros parameter gazebo: /tmp/buildd/ros-electric-visualization-common-1.6.2/debian/ros-electric-visualization-common/opt/ros/electric/stacks/visualization_common/ogre/build/ogre_src_v1-7-3/RenderSystems/GL/src/OgreGLSupport.cpp:56: virtual void Ogre::GLSupport::initialiseExtensions(): Assertion `pcVer && "Problems getting GL version string using glGetString"' failed. [gazebo-1] process has died [pid 30131, exit code -6]." Any thoughts for a fix or should I submit a ticket?
Pi Robot gravatar image Pi Robot  ( 2011-10-06 00:50:33 -0600 )edit
When Gazebo refuses to start, I usually do a `rm -rf /tmp/gazebo-*` and try again. Does Gazebo work for you with other launch files? If this doesn't help, it's probably best to submit a ticket or ask a new question here, so that the Gazebo gurus become aware of it.
Martin Günther gravatar image Martin Günther  ( 2011-10-06 01:49:48 -0600 )edit
Yeah, I've used that trick in the past but in this case, no such directory gets created. Even "roslaunch gazebo_worlds empty_world.launch" generates the same error so I have submitted a ticket (
Pi Robot gravatar image Pi Robot  ( 2011-10-06 02:09:30 -0600 )edit
What about doing this with stage? Is it possible? (even if I wouldn't be able to experiment with camera capabilities) The reason being that currently my workstation its not powerful enough (once I tried with the pr2 model and it stutters really really badly).
jlo gravatar image jlo  ( 2011-10-10 22:22:02 -0600 )edit
Yes, the scenario I described is of course possible with stage, but I have no experience with that. If you have a specific question about setting up stage, it's probably best to ask a new question about that.
Martin Günther gravatar image Martin Günther  ( 2011-10-11 00:07:36 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-10-04 22:45:13 -0600

Seen: 414 times

Last updated: Oct 05 '11