Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

feedback_webclient

MadeInPierre edited this page Oct 25, 2018 · 1 revision

Description

The webclient is not a ROS package. It is a web app that can be accessed via a browser. This app provides an interface and tools to monitor and interact with the ROS system, running locally or on a robot.

It is forked from the ros-control-center.

Authors and versions

  • v1.0 (A17) : @milesial
    • Simple fork of the ros-control-center
    • Listens and publish on topics
    • Calls services
    • Changes parameters
  • v2.0 (A17) : @milesial
    • Topics in the diagnostic tab
    • Services in the control tab
    • Displays TF transforms
    • Able to display lidar points
    • Tab to tweak the PID and display graphs
    • Auto-detects dead and alive topics/services
    • More settings
    • Log level choice for the console output
  • v3.0 (in progress) : @milesial
    • Calls and monitor actions
    • Switch to CSS grid
    • Clean template system

Configuration

You can tell the webclient about the expected services and topics of the system so they will be displayed differently if they are offline, instead of just disappearing. To define them, you have to set the $rootScope.domains variable in the run function, in the app.js file.

Note that services and topics that are not defined in this variable will still be displayed on the webclient when alive.

This variable is a list of objects, each object defines a domain and has 3 elements :

  • name : the name of the domain
  • topics : a list of the expected topics for this domain
  • services : a list of the expected services for this domain

Example

For example, this is a valid configuration, with only one domain :

$rootScope.domains = [{
    name: 'drivers',
    topics: ['ard_asserv/pose2d',
             'ard_asserv/speed'],
    services: ['ard_asserv/emergency_stop',
               'ard_asserv/goto',
               'ard_asserv/set_pos',
               'ard_asserv/speed',
               'ard_asserv/pwm',
               'ard_asserv/management',
               'ard_asserv/parameters']
    }];

Communication

The app is a socket client that communicates with the socket server provided by rosbridge. To display tf transforms, it talks to tf2_web_republisher.

Running the package

First, make sure rosbridge and tf2_web_republisher are running where the ROS system is running:

roslaunch rosbridge_server rosbridge_websocket.launch
rosrun tf2_web_republisher tf2_web_republisher

Next, on your machine or on the robot, go into the webclient directory and run :

npm start

to start the HTTP server.

Note : If you haven't installed the dependencies, run npm install --only=prod before.

If you have started the HTTP server locally, go to http://localhost:8080. Else, go to http://<remote_ip>:8080.

You can finally go in the settings tab and check that the server IP matches the IP of the machine running rosbridge.

How it works