Git repository for the Olin Aquatic Robotic Systems team. Learn how to do things in our wiki.
For information about our team, blog updates and more, visit our website at olinaquabots.com.
In order to run OARS code, you need the following things setup on your computer:
lsb_release -a
in a terminalrosversion -d
in a terminalecho $ROS_PACKAGE_PATH
in a terminal.
The result should include /home/yourname/catkin_ws/srcgit --version
in a terminala command that is yet to be determined
in a terminalroscd oars_pkg
in a terminalrosdep update
rosdep --ignore-src check --from-paths $(rospack find oars_pkg)/..
sudo apt-get update
rosdep --ignore-src install --from-paths $(rospack find oars_pkg)/..
roscore
roslaunch oars_pkg core.launch
rosrun oars_pkg course_tf_handler.py _config:=courses/sample_course.json
rosrun oars_pkg planner.py test1
roslaunch oars_pkg joystick.launch
Turn the tugboat on
Connect to the tugboat via SSH
Connect to the OLIN-ROBOTICS
WiFI network (password R0B0TS-RULE
)
Visit https://7a7b657d70.dataplicity.io/ and find the "inet addr" starting with 192.168.*.*
In Terminal, connect to the Raspberry Pi using the command
ssh pi@192.168.**.**
(with the IP address from above)
raspberry
Update the code on the tugboat to match what you want to test
in the ssh session
roscd oars_pkg
git checkout master
(or whatever branch you are working on)
git pull
Run the code on the boat computer (over SSH)
In one tab: roscore
In another tab, launch one of the launch files beginning with app_
. These correspond to different modes of operation (e.g. piloting Jankboat
1 around obstacle course A, piloting the tugboat in search of an underwater sound's source). For example, run roslaunch oars_pkg app_tugboat.launch
to pilot the tugboat.
(Optional) Use a joystick to manually control the boat. Note: All of these commands should be run on your computer, not on the boat (via SSH).
a) Plug in the controller to your computer via USB
b) Tell your computer that a ROS master is running on the tugboat:
export ROS_MASTER_URI=http://<tugboat_ip_address>:11311
c) Tell ROS what your IP address is: export ROS_IP=<your_ip_address>
d) Launch the necessary nodes: roslaunch oars_pkg joystick.launch
If you're running into trouble, make sure your computer can see the joystick by running ls /dev/input/js*
. (There may be multiple js#
devices
on your computer, so you might want to try disconnecting the joystick, running the aforementioned command, plugging the joystick back in, and running the command again to make sure a new device showed up.)
If the joystick isn’t js0
, run roslaunch oars_pkg joystick.launch dev:=/dev/input/js#
(where the #
is replaced by the correct number).
In a terminal type cd ~/catkin_ws/src
If it works, you have a catkin_ws folder already, continue to Step 2
If it doesn’t work, follow the instructions here, then continue to Step 2
In a terminal, type gedit ~/.bashrc
In the resulting text file, add the following two lines to the bottom of the file, if they aren’t there:
source /opt/ros/indigo/setup.bash source ~/catkin_ws/devel/setup.bash |
This file is loaded every time you open a terminal, so it stores the "default" location of your catkin workspace. Any code in the ~/catkin_ws/src directory will now be useable by ROS (once you close and reopen your terminal)