-
Notifications
You must be signed in to change notification settings - Fork 27
07: ROS Web Tools
These instructions will prepare your TurtleBot 2i for web browser based control with mapping, navigation, video streaming, teleoperation and TTS capabilities.
To make this happen we utilize a few ROS packages, nodejs, grunt, apache web server and Robot Web Tools packages.
Prepare
sudo apt install nodejs npm apache2 ros-kinetic-sound-play ros-kinetic-rosbridge-server ros-kinetic-web-video-server
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g grunt-cli
sudo rm -rf ~/.npm ~/tmp
NAV2DJS
cd ~/turtlebot2i
git clone https://github.com/GT-RAIL/nav2djs.git
cd nav2djs/utils
npm install .
ROSLIBSJS
cd ~/turtlebot2i
git clone https://github.com/RobotWebTools/roslibjs.git
cd roslibjs
npm install
grunt build
****Requires firefox, X11 Fwd if necessary
If you cannot grunt build via the TurtleBot desktop (either locally or remote with VNC) you'll need a method of loading firefox via your terminal connection. Windows users can use MobaXterm with X11 server to complete the installation process.
Web Video Server ( with frame skipping )
cd ~/turtlebot2i/src
git clone https://github.com/Interbotix/web_video_server.git -b frame_skip
cd ..
catkin_make
Copy files to default apache web server directory
sudo cp -r nav2djs/ /var/www/html/
sudo cp -r roslibjs/ /var/www/html/
sudo cp ~/turtlebot2i/src/turtlebot2i_misc/turtlebot2i_webtools_local.html /var/www/html/
Depending on your machine and network configuration you may need to edit the communication address used in the web page. Near the top of the document change the communicationAddress variable to match the robot's network hostname or IP address.
To bringup the TurtleBot execute:
roslaunch turtlebot2i_bringup turtlebot2i_webtools.launch
Open a web browser and navigate to:
http://turtlebot.local/turtlebot2i_webtools_local.html
Change turtlebot.local in the HTML source to match the hostname or IP address of your robot if necessary.