Actions

Robotics Class 2011/Assignment 4: Difference between revisions

From HacDC Wiki

mNo edit summary
mNo edit summary
Line 25: Line 25:
Once you have the robot in the simulation, you can then start the ROS navigation stack.  There is a launch file that has been written that customizes the ROS navigation stack for our particular robot.  You can look at the launch file, named move_base.launch, for more info.  To start the navigation stack, type:
Once you have the robot in the simulation, you can then start the ROS navigation stack.  There is a launch file that has been written that customizes the ROS navigation stack for our particular robot.  You can look at the launch file, named move_base.launch, for more info.  To start the navigation stack, type:


roslaunch irobotron_description move_base.launch
'''roslaunch irobotron_description move_base.launch'''


You may see a few warnings when the navigation stack starts.  But if you do a rostopic list, you should see numerous topics in the "/move_base/" namespace.  These are topics related to the navigation stack.
You may see a few warnings when the navigation stack starts.  But if you do a rostopic list, you should see numerous topics in the "/move_base/" namespace.  These are topics related to the navigation stack.
Once the navigation stack is up and running, you can start rviz to start seeing what the robot sees.  Rviz is a powerful visualization tool useful for looking at TF frames, navigation stack products and all kinds of other stuff.  Anyway, you can start it by typing:
'''rosrun rviz rviz'''
Once rviz is up and running, follow [http://www.ros.org/wiki/navigation/Tutorials/Using%20rviz%20with%20the%20Navigation%20Stack this tutorial] to set it up to visualize all kinds of navigation stack related products.

Revision as of 20:48, 16 July 2011

The rumor is that something bad is going on in the secret underground HacDC antiquities warehouse. The security guards have written a memo describing recent sightings of artifacts in the warehouse "moving by themselves". They have come to us, the robotics experts, to see if we can't provide them with a robot that can make the rounds in the warehouse keeping an eye out for mysterious paranormal activities.

The last assignment illustrated the commands required to start up gazebo and also to check out the irobotron_description ROS package from the HacDC repository. However, we will make a slight adjustment to the command line for starting up gazebo. We do this to start up in a simulated world that happens to have the same rooms and structure of the secret underground HacDC antiquities warehouse. You can start gazebo in the following way:

roslaunch gazebo_worlds simple_office2.launch

Once gazebo is up and running and you next need to insert the robot into the simulation. If you have not checked out the irobotron_description ROS package, you can do so with the following command:

cd to where you store your downloaded ROS packages svn co http://hacdc-ros-pkg.googlecode.com/svn/trunk/irobotron_description rosmake irobotron_description

However, if you have already checked it out, follow these modified instructions to update the package as recent changes have been made to it:

cd to where you store your downloaded ROS packages svn update rosmake irobotron_description

Once you have successfully rosmake'ed the irobotron_description, you can then insert the robot into the simulation:

roslaunch irobotron_description create_mobile_base_in_office2.launch

This command will insert the robot into the starting location in the map. It may be hard to see the robot, but if you use the mouse to navigate in the gazebo window, you will find the robot 10 meters forward and one meter left of the initial gazebo starting coordinates.

Once you have the robot in the simulation, you can then start the ROS navigation stack. There is a launch file that has been written that customizes the ROS navigation stack for our particular robot. You can look at the launch file, named move_base.launch, for more info. To start the navigation stack, type:

roslaunch irobotron_description move_base.launch

You may see a few warnings when the navigation stack starts. But if you do a rostopic list, you should see numerous topics in the "/move_base/" namespace. These are topics related to the navigation stack.

Once the navigation stack is up and running, you can start rviz to start seeing what the robot sees. Rviz is a powerful visualization tool useful for looking at TF frames, navigation stack products and all kinds of other stuff. Anyway, you can start it by typing:

rosrun rviz rviz

Once rviz is up and running, follow this tutorial to set it up to visualize all kinds of navigation stack related products.