You need a router or phone hotspot with your computer and robot connected to run this setup. The university network may not work.
- Install Arduino IDE.
- Follow first tutorial at wiki.ros.org/rosserial_arduino/Tutorials to set up ROS with Arduino.
- Load arduino/robot_controller.ino to arduino101 board. (You may need to modify the motor controller code for your robot)
- Connect Arduino code by USB to robot computer.
You need the usb_cam, web_video_server, rosbridge, and rosserial packages to run the robot controller code.
- Place the robot_controller folder (located in ros folder) in your catkin_ws/src folder on the robot.
-
cd ~/catkin_ws
-
catkin_make
-
source ~/catkin_ws/devel/setup.sh (note: do this for each new terminal)
- new terminal-> >> roscore
- new terminal-> >> rosrun usb_cam usb_cam_node
- new terminal-> >> rosrun web_video_server web_video_server
- new terminal-> >> rosrun rosbridge_server rosbridge_websocket
- new terminal-> >> rosrun rosserial_python serial_node.py /dev/ttyACM0 (may need to use a different port than /dev/ttyACM0 corresponding to your arduino)
- Modify the html to use your IP address in place of <ip_address> with the ip address of your robot.
- Open the html page in your browser. You should see the video stream and be able to control the robot.