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:
<launch>
<param name="/use_sim_time" value="true" />
<node name="gazebo" pkg="gazebo" type="gazebo" args="-u $(find gazebo_worlds)/worlds/wg_collada.world" respawn="false" output="screen"/>
<include file="$(find turtlebot_gazebo)/launch/robot.launch"/>
</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.