|
Project Information
|
Heriot-Watt University Ocean System Laboratory's ROS AUV PackageThis is a set of interface definitions and software modules for Autonomous Underwater Vehicles from Heriot-Watt University's Ocean Systems Laboratory (OSL). It is tested against the cturtle release of the Robotic Operating System (ROS) middleware. Some changes would be required to use it with the boxturtle release of ROS. This project is very much a work in progress, and is likely to change often. Getting startedInstalling ROSFirst, follow the ROS wiki instructions to install the cturtle release of ROS on your PC. Ubuntu release 9.10 or 10.04 is recommended. If installing from Ubuntu packages, the "Base" method (installing ros-cturtle-base) is easiest, as it includes all of the packages hwu-osl-ros-pkg depends on. If you opted for a more minimal 'ROS only' install, you should now use apt-get to install "ros-cturtle-visualization", to install the ROS packages required by hwu-osl-ros-pkg. Getting and building hwu-osl-ros-pkgChange to the directory you would like to download the hwu-osl-ros-pkg into, e.g.: # cd ~/ros Ensure this directory is in your ROS package path in .bashrc: # echo 'export ROS_PACKAGE_PATH="$ROS_PACKAGE_PATH:$HOME/ros"' >> ~/.bashrc Download the code: # svn checkout http://hwu-osl-ros-pkg.googlecode.com/svn/trunk/ hwu-osl-ros-pkg It's best to log out and back in again now, to ensure all terminals you open will have the correct environment set. However, to source your .bashrc file for one terminal without logging out: # source ~/.bashrc The code depends on the Common C++ library, so install that now. On Ubuntu: # sudo apt-get install libcommoncpp2-dev Make the auv_sim package, which causes all dependent packages to be built: # rosmake auv_sim Running the AUV simulatorNow try running the AUV sim, either with a (PS2/3-style) joystick connected: # roslaunch auv_sim nav_pilot_joy_rviz.launch Or without: # roslaunch auv_sim nav_pilot_rviz.launch After a short delay, rviz should load and show a yellow model of an AUV. If you are using a joystick, you should be able to control the AUV with the joystick. The rviz user guide is here. Commands can be sent to the AUV pilot like this: # rosrun auv_pilot pilot_world_req depth 5 4 3 -30 45 Which commands the pilot to move the vehicle relative to the origin, north 5 m, east 4 m, depth 3 m, pitch -30 degrees, yaw 45 degrees. If the joystick is used while that command is left running, the joystick forces will override those from the pilot. After releasing the joystick, the pilot command will be applied again. A simple tool can be used to iterate through waypoints from a file, like this: # rosrun auv_pilot waypoint_iterator < $(rospack find auv_pilot)/test/waypoints.txt or run in looping mode like this: # rosrun auv_pilot waypoint_iterator --loop < $(rospack find auv_pilot)/test/waypoints.txt Controlling timeThe node sim_clock publishes a simulated time source for the AUV simulation above. At any point during the AUV simulation, the speed of simulated time can be adjusted by changing the parameter time_scale like this: rosparam set time_scale 2.5 If set to zero, time is effectively paused for all nodes using ROS time sources. Instead of manually setting the parameter, the time_control utility may be used: # rosrun sim_clock time_control Usage information is printed by the utility. The enter key must be pressed after a command key for it to take effect. |