1. Clone this repository and setup system variables
cd ~/
git clone https://github.com/weilunwc/Underwater.git
cd ~/Underwater
cat shell_config.txt >> ~/.bashrc
2. Install Arduino for linux system
Follow the instructions on https://www.arduino.cc/en/Guide/Linux
After running ./install.sh
, you should be able to find an Arduino icon on your desktop. Type cd ~/Underwater; cp -R Arduino ~/
to set up Arduino libraries
3. Install Arduino Makefile to operate in terminal
sudo apt-get update
sudo apt-get install arduino-mk
To check if this step is successful, let's try to compile a sample code.
cd ~/Underwater/underwater_ws/src/underwater_robot/underwater_arduino/arduino_nodes
make
If it compiles without error then its installed successfully
Note that there can only be one arduino code within the directory of the makefile
type make upload
to upload to the board after setting the configuration type
type make clean
to clean up the executables
4. Check the nano firmware
If make upload
for Arduino nano gives you a problem
Download nano firmware from here
**5. Setup C++ Eigen linear algebra library **
In order to run linear algebra opertations in C++, we use the Eigen opensource library
hg clone https://bitbucket.org/eigen/eigen/
cp -R eigen/Eigen /usr/local/include
6. Check ROS version
type rosversion -d
and remember the version of ros you are using
If ros is not installed, check out installation and tutorials
7. Install joystick package
Follow tutorials from here
sudo apt-get install ros-<version>-joy
for type in the results from previous step
8. Install Arduino serrial package to interface ROS with Ardunio
Follow the instructions on here
sudo apt-get install ros-kinetic-rosserial
sudo apt-get install ros-kinetic-rosserial-arduino`
9. Generate the ros arduino library
roscd underwater_robot/utilities
./build_arduino_msg
Whenever we build any custom message types in ros, make sure you do this again by build_ros_msg
10. Set up ros-usb-cam
Connect the computer to the usb-camera, and download the ros package sudo apt-get install ros-<version>-usb-cam
Test if it's working with roslaunch usb_cam usb_cam-test.launch
11. Connect to Blue robotics locator
Connect computer to the locator ethernet cable and follow the connection settings below
11. Install AR Markers
Download ar-track-alvar with $ sudo apt-get install ros-kinetic-ar-track-alvar
and then rospack profile
For more info, look at these links: Ar-track-alvar setup Working with Rviz
Now We're all set!