ROS Cameras Controller uses streamed videos and helps to manage them.
The project consists of these ROS packages (more details in readme files of each package):
- commander - handles requests made by other packages.
- image_processing_filters - allows to apply image processing filter to ROS image topics.
- video_stream_to_topic - converts video stream (e.g. from IP camera) and converts it to ROS image topic.
- web_console - runs web consoles for managing cameras. It uses Flask for app back-end and AngularJS for front-end.
- Robot Operating System (ROS) (Middleware for Robotics).
- OpenCV (Computer Vision).
- Flask (Back-End App).
- AngularJS (Front-End App).
- npm (Front-End Package Manager).
To build, clone the latest version from this repository into your catkin workspace and compile the package using:
cd catkin_workspace/src
git clone https://github.com/ugnelis/ros_cameras_controller.git
cd ../
catkin_make
-
Install Ubuntu 16.04 LTS, ROS Kinetic and OpenCV 3.1+.
-
Install web_video_server:
sudo apt-get install ros-kinetic-web-video-server
- Install rosbridge-suite:
sudo apt-get install ros-kinetic-rosbridge-suite
- Install NodeJS and npm:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
- Install Flask:
sudo pip install Flask
- Create catkin workspace for storing ROS source projects:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
- Source catkin workspace:
source ~/catkin_ws/devel/setup.bash
(Recommended) It's convenient if catkin workspace environment variables are automatically added to your bash session every time a new shell is launched:
echo "source ~/catkin_ws/devel/setup.bash >> ~/.bashrc
source ~/.bashrc
- Clone this project to
~/catkin_ws/src
:
cd ~/catkin_ws/src
git clone https://github.com/ugnelis/ros_cameras_controller.git
cd ../
catkin_make
- (First build only) If
ros_cameras_controller
packages aren't found, reopen terminal or source catkin workspace again:
source ~/catkin_ws/devel/setup.bash
- Start the commander package:
roslaunch commander commander.launch
- Start the web_console package:
roslaunch web_console web_console.launch
- web_console is now running on http://localhost:9999.
- Build Docker image:
docker build -t ros-cam .
- Create a Docker network:
docker network create ros-cam-net
- Start commander:
docker run -dit --rm \
--net ros-cam-net \
--name commander \
ros-cam \
commander commander.launch
- Start web_console:
docker run -dit --rm \
--net ros-cam-net \
--name web_console \
--env ROS_MASTER_URI=http://commander:11311 \
-p 8888:8888 -p 9090:9090 -p 9999:9999 \
ros-cam \
web_console web_console.launch
- Open first terminal and run commander package:
roslaunch commander commander.launch
- Open second terminal and run rosbridge_server package:
roslaunch rosbridge_server rosbridge_websocket.launch
- Open third terminal and run web_video_server package:
rosrun web_video_server web_video_server _port:=8888
roscd web_console/src/front_end_app
npm start
The web_console package has been tested under ROS Kinetic and Ubuntu 16.04.
The source code is released under the BSD 3-Clause license.
Author: Ugnius Malūkas
Maintainer: Ugnius Malūkas, [email protected]