Giter Site home page Giter Site logo

archive-sw / ros-web-image-view Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ghostsofhiroshima/ros-web-image-view

0.0 1.0 0.0 234 KB

๐Ÿ–ผ๏ธ The missing ROS client for web_video_server

License: GNU General Public License v2.0

JavaScript 75.07% HTML 3.66% CSS 2.57% CMake 18.70%

ros-web-image-view's Introduction

ROS Web Image Viewer

status

This is an Electron application client to interface with web_video_server the same way image_view does.

The point of this application is to have finer control over the bandwidth of your image stream in less ideal network environments.

Setting up

You must clone this repository as web_image_view into your catkin workspace:

git clone https://github.com/mcgill-robotics/ros-web-image-view.git web_image_view

Dependencies

Before proceeding, make sure to install all the dependencies by running:

rosdep update
rosdep install web_image_view

Compiling

You must compile this package before being able to run it. This will install all npm dependencies, so an internet connection is required the first time. You can do so by running:

catkin_make

from the root of your workspace.

On Ubuntu, you might also need to symlink nodejs to node for this to work. This can be done as follows:

sudo ln -s /usr/bin/nodejs /usr/bin/node

Running

To run simply launch the web_video_server on the remote machine as such:

rosrun web_video_server web_video_server

and run this application on your client as such:

rosrun web_image_view web_image_view <IMAGE_TOPIC_NAME> --server=<REMOTE_ADDRESS>

Arguments

The following command-line arguments can be set:

  • --server: Full address of web_video_server including port, default: http://localhost:8080
  • --type: Stream type (one of mjpeg, h264, ros_compressed, vp8, vp9), default: mjpeg.
  • -w, --width: Image width to stream, default: 400 pixels.
  • -h, --height: Image height to stream, default: 300 pixels.
  • -q, --quality: Image quality (between 0 and 100%), default: 30.
  • --help: Displays usage information and exists.

Note: If the type is set to ros_compressed, the topic name should not include the /compressed suffix. web_video_server appends that automatically.

Interaction

Resizing

Resizing the window changes the resolution of the stream. In other words, a larger window will use more bandwidth than a smaller one. Nevertheless, the window is resizable at run-time. Note that you may notice a small lag in the stream when resizing due to the stream being reset.

Screenshot

You can save a screenshot of the current frame by right-clicking on the image. This will pause the stream and prompt you for a file name and location to save the screenshot to.

Quality

The quality setting can be changed in real-time using the following keyboard shortcuts:

  • 1: Sets the quality to 10%.
  • 2: Sets the quality to 20%.
  • 3: Sets the quality to 30%.
  • 4: Sets the quality to 40%.
  • 5: Sets the quality to 50%.
  • 6: Sets the quality to 60%.
  • 7: Sets the quality to 70%.
  • 8: Sets the quality to 80%.
  • 9: Sets the quality to 90%.
  • 0: Sets the quality to 100%.
  • +: Increases the current quality setting by 5%.
  • -: Decreases the current quality setting by 5%.

Note: This has no effect when the type is ros_compressed. The quality of the compressed image message published is what you will be transmitted regardless of the quality set here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.