Giter VIP home page Giter VIP logo

vizanti's Introduction

Icon Vizanti - Web Visualizer & Mission Planner for ROS

License Build Status

Vizanti is a web-based visualization and control tool developed for more convenient operation of outdoor robots running the Robot Operating System (ROS). The application attempts to replicate RViz's orthographic 2D view as closely as possible with a smartphone friendly interface. The second goal is to allow planning and executing movement and mission commands, i.e. goals and waypoints, with custom buttons and parameter reconfigure.

Installation

As a field tool, Vizanti is designed to operate just as well without internet access, and as such the intended way is to host it on a robot, with rosbridge autoconnecting to the host IP.

cd ~/catkin_ws/src
git clone https://github.com/MoffKalast/vizanti.git
cd ..
rosdep install --from-paths src --ignore-src
catkin_make

Or if rosdep fails for some reason, these are the main two deps:

sudo apt install ros-noetic-rosbridge-suite python3-flask

Flask and Jinja2 are used for templating, rosbridge is required for socket communication.

Run

roslaunch vizanti server.launch

The web app can be accessed at http://<host_ip>:5000. Client settings are automatically saved in localStorage. The satelite imagery renderer also uses the indexedDB to store tiles for offline use (note that this is IP specific). By default the rosbridge instance also occupies port 5001.

If you're using a mobile device connected to a robot's hotspot that doesn't have internet access, make sure to turn off mobile data. This will prevent Android from sending packets to the wrong gateway.

If you are seeing unusually slow rendering in Chrome on Linux, set "Force color profile" to "sRGB" in chrome://flags/#force-color-profile. This should speed up canvas rendering.


Feature list

Aside from the required ones, custom widgets can be added to the navbar to customize functionality for a given robot and test setup.

Note: Some icons open setup modals instantly, while others use a single press to trigger actions and use a long press to open the modal.

General Tools & Configuration

Global Settings

Set the background color and the fixed TF frame. Also has a button to reset the camera view to zero and default zoom.

Grid

The adjustable metric grid. Currently renders only in the fixed frame.

TF

Renders TF frames, same options as in RViz for the most part.

Robot Model

Renders a 2D sprite to represent the robot model or any specific TF link.

Dynamic Reconfigure

Adjust configurations of all nodes supporting dynamic reconfigure params. Currently rather slow to load and update, but will make sure parameters are current. It treats ints as floats due to type autodetection problems.

Bag Recorder

Recording specified topics by calling rosbag record via proxy.

Node Manager

See info printouts of a specific node, kill nodes, launch nodes, that sort of thing.

Add new visualizer/widget

Self explanatory.

Mission Planning

Teleop Joystick

Joystick used for publishing Twist messages, can be positioned anywhere on the screen and switched into holonomic mode.

2D Pose Estimate

Send the /initialpose for navigation startup. Long press to open setup menu.

2D Nav Goal

Send a /move_base_simple/goal. Long press to open setup menu.

Waypoint Mission

Create missions with multiple waypoints, then send them as a Path message. Single tap to add a point, single tap to remove an existing one, hold and drag to move points. Adding a point on an existing line will add it between those two points. Long press to open setup menu.

Area Mission

Drag to select an area and publish it to a PolygonStamped topic. Since the area is a rectangle, the first polygon vertex will be at the cursor press, and the third vertex will be the press released point. Long press to open setup menu.

Button

A button with customizable text that displays the last message sent on a Bool topic and sends the inverse to toggle it when pressed. Also supports just sending messages to an Empty topic. Long press to open setup menu.

Data Visualization

Map

Display an OccupancyGrid. Also has some experimental map_server controls for saving and loading maps.

Satellite Tiles

Display satelite imagery, by default from OpenStreetMap. Requires a Fix origin with the correct frame in its header.

GridCells

Displays a grid of cells.

Battery

Display a BatteryState message.

Compressed Image

Display a CompressedImage message in a movable box anywhere on the screen. Heavily throttled by default.

Marker Array

Visualize a MarkerArray. Currently supported types are ARROW, CUBE, SPHERE, CYLIDER, LINE_STRIP and TEXT_VIEW_FACING. Since each of these widgets adds another canvas layer, it makes more sense to aggregate regular Marker messages into a Marker Array to avoid some of that overhead.

Path

Render a Path message for navigation debugging.

Range

Render a Range message on the main view. Supports grouping multiple messages onto the same topic, as long as the tf frames are different.

Laser Scan

Display a LaserScan message on the main view. Heavily throttled by default.

Point Cloud

Display a PointCloud2 message on the main view. Heavily throttled by default.

Pose with Covariance (Stamped)

Display a PoseWithCovarianceStamped message. The covariance rendering is currently experimental and will likely only display correctly for spherical covariance.

Pose Array

Display a PoseArray message. Throttled to 15 hz.

Temperature

Display a Temperature message. Only as a widget for now, not on the view itself.

Contributing

Please see Contributing.md for more information.

vizanti's People

Contributors

emir7 avatar moffkalast avatar tony2guo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vizanti's Issues

No /tf data stops rendering of all widgets

If there's only /tf_static available, it seems that all tf_update dependant widgets will stop rendering unless view_update is sent.

Conceptually visualizers with timestamped data that only need to get the single TF frame at their specific timestamp when they're received don't need to be re-rendered on tf updates anyway, so they should all be switched to updating only when there's new data available or the screen moves. Should be faster too, anyway.

Satelite tile view culling

The system for figuring out which tiles should be rendered on screen has some offset issues when moving away from the origin, not rendering all tiles in some cases.

Changing the Default Layout

Hello @MoffKalast

Vizanti has been a great tool for the project I'm working on. I have setup the layout the way I want with the widgets I need, but if I open Vizanti on a new browser, the layout goes back to the default one and I have to load my layout file or re-add the widgets.

How can I change the Default Layout to the one I want to use, so it loads automatically the widgets I want when I'm on a new browser?

Here's the layout I'm using now:
robot_config.json

Possible bug in get_public_dir

if os.path.isdir("../public"):

This would only work if server.py is run from vizanti/vizanti_server/vizanti_server:

~/ros2_ws/src/vizanti/vizanti_server/vizanti_server# ros2 launch vizanti_server vizanti_server.launch.py
[vizanti_flask_node]: Public directory set as ../public

~# ros2 launch vizanti_server vizanti_server.launch.py
[vizanti_flask_node]: Public directory set as /root/ros2_ws/install/vizanti_server/share/vizanti_server/public/

A possible solution:

from pathlib import Path
def get_public_dir():
    p = Path(__file__).resolve()
    path = p.parents[1] / 'public'
    if path.exists():
        return path #for --symlink-install
    return get_package_share_directory('vizanti_server')+ '/public/'

Transform timestamp interpolation

Currently TF transforms are treated as latest-is-correct for rendering visualizers since only one set of values is cached, but this while easy to implement is not quite correct, especially for delayed laserscans which can then be rotationally out of sync.

The idea is to instead keep a short history of received transforms and their timestamps, then recreating one that matches by interpolating between the two nearest entries.

ROS 2 Lifecycle Manager

The ROS 2 node manager should support interacting with the supposed life cycle architecture.

I.e. executing these sort of subprocess commands by proxy:

ros2 lifecycle set /nodename cleanup

ros2 lifecycle set /nodename shutdown

ros2 lifecycle set /nodename destroy

Add base URL option

Hi, thanks for the great work!
I would like to use Vizanti under some subfolder like this: http://<host_ip>/vizanti
Possible adding a base URL option or use relative URLs?

TF buffer timeout

Currently all TFs are stored perpetually in the consolidation node, which probably isn't best in cases like node restarts where the graph changes and frames should be cleared. Something like 10 seconds should be a good timeout for non-static frames.

Decay time

Add decay time and adjustable setting for:

  • range
  • marker array
  • laser scan
  • point cloud

Safari widget closing not working

When adding a new widget or configuring an existing widget in Safari on iOS, tapping on the background to close the setup modals does not work. The only way to get back to the default view is to reload the page, restart the web app or to remove the widget.

Tested under iOS 16.5.1 on an iPhone and iPad.

Map not rendered

Hi,
we use Vizanti alongside RTABMAP. The map is published on topic /rtabmap/map. The map is not published regularly, but can be triggered with the service. In rviz the map is shown, but it is not in vizanti. Costmaps work perfectly normal. It's strange, because the issue occured about 2-3 weeks ago, when from day to day it stopped working. TFs and other topics are correct, but map is not seen. Do you have any idea what we should change to diagnose what's wrong and how to repair it?

image

More widgets

TODO widgets:

For rviz parity:

  • laserscan
  • pointcloud 2
  • marker (single)
  • polygon
  • point stamped
  • axes
  • grid cells?

Other:

  • nav2_msgs/msg/ParticleCloud as an additional type for PoseArray, ROS2 only
  • string chat
  • configurable dial for all numerical types like byte, char, float32, float64, int16, int32, int64, int8, uint16, etc.
  • visualizer for odometry ?
  • inspecting/publishing to arbitrary topics

webkit blocks fetch over HTTP

Apparently Apple's ATS blocks fetch and XHR requests over HTTP, which is a bit of a problem if you're working offline without a way to access a root certificate authority. For macOS a known workaround is to modify the Info.plist file to add an exception.

The workaround for iOS mobile devices is something like this: create a self signed SSL cert, reconfigure rosbridge and the flask server to use it, get the key onto the device and install it, set the cert as a trusted root authority. Repeat every time the cert expires.

Working behind proxy

Hi, guys,

I've been exploring vizanti as a consolidated web interface for my aerial and ground platforms.

I've been having trouble running SITL instances behind a proxy on my cloud server using the ros2-feature branch.
The best I could get so far is a screen with background colors, but nothing else. It looks like I can reach the base html but none of the js stuff is reachable, maybe?

So far, I've tried to use all sorts of values for base_url to try and fix this with no success. I'm wondering if I there might a need to set the js files paths (although I thought that's what url_for did).

Any ideas would be super welcome, I'm at a loss now

Thanks!

Costmap rendering

Continuation of the discussion started here.
Short description: cost map rendering is broken and not consistent when using RWS or Rosbridge. Coloured costmap renders ok when using RWS but not ok when using Rosbridge, and vice versa.

Top image - RWS, bottom - Rosbridge:

Chrome 122.0.6261.94 (Mac), Non-Coloured image image
Firefox 123.0 (Ubuntu), Non-Coloured image image
Firefox 123.0 (Ubuntu), Coloured image image

Here is the bag I've recorded, I tried to strip non-relevant topics and keep it short to decrease size. I noticed that the robot model is stuck when playing from the bag, but it's consistent between RWS and Rosbridge.

Download rec.bag.7z from Google Drive (123 MB, too large for Github attachment)

Image transport improvements

Current transport for CompressedImage messages goes through rosbridge, which does not allow for much throughput before TCP socket congestion occurs.

Ideally this should be switched to aiortc for compact webrtc h264 streaming, given that browser support is solid now, or alternatively the web_video_server for slightly faster MJPEG streaming which would still be slow, but probably wouldn't affect other visualizers nearly as much as the current implementation.

#8 (comment)_

Install files in CMakeLists.txt

Some files are not installed.
Should install all Python scripts, public folder, and launch files.
The server.py is using ../public folder, so its install destination would need to consider this.

Thank you!

Parameter loading issue

Hi,

last time I encontered an issue. I launched some nodes right after booting the system, and they are perfectly fine to set parameters

image

imu presented above is only one if few examples.

But there are some nodes which are launched after startup by user and they are not able to load parameters
image

I don't know if I am doing something wrong, but some parameters are not loading and they are important for me. I can changed them with classic ros2 param set but I would prefer to do it through gui. I will be grateful for every hint for fixing this.

Inverted map rotation?

Hi, @MoffKalast,

I've playing some more with Vizanti. It's working very well for me!
One thing I've been trying to understand, though. It seems to me the satellite tiles rotation is inverted.

I've been digging to see if I had something weird going with my TFs,, but I'm pretty sure they are correct at this point.
Can you point me to how I would go about inverting the tile rotation?

Thanks!

vizanti over virtual network

This is an amazing work, bundle of thanks to the contributers.
Recently I faced an issue and I want to bring it to your attention.

Remote device is running a ros1 system in a virtual network and the intention is to monitor it remotely.

vizanti fails to get the tf data from the remote device and resultantly all tf related topics fail to get subscribed.

BUT

If the vizanti server is launched via ssh then all works fine.

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.