Git Product home page Git Product logo

rosshow's Introduction

rosshow: Visualize ROS topics in a terminal

Have you ever SSH'ed into a robot to debug whether sensors are outputting what they should, e.g. rostopic echo /camera/image_raw?

If so, rosshow is for you.

This displays various sensor messages in a useful fashion using Unicode Braille art in the terminal so you don't need to fire up port forwards, rviz, or any other shenanigans just to see if something is working. It currently only supports types from std_msgs and sensor_msgs but support for more types is coming. Contributions welcome!

Installation

Prerequisites:

sudo pip install numpy pillow requests

This package works with both ROS1 and ROS2. You can add it to either a catkin (ROS1) or colcon (ROS2) workspace and it should work.

Usage

If you installed it to the system:

rosshow <topicname>

If you're using it from a catkin or colcon workspace:

rosrun rosshow rosshow <topicname>      # ROS1
ros2 run rosshow rosshow <topicname>    # ROS2

Most visualizations use Unicode Braille characters to render visualizations. If your terminal supports only ASCII, you can use the -a option for a purely ASCII-art render:

rosshow -a <topicname>

You can also force 1-bit, 4-bit, or 24-bit color modes if your terminal type is not detected correctly. You may need these when using rosshow inside of a screen.

rosshow -c1 <topicname>
rosshow -c4 <topicname>
rosshow -c24 <topicname>

Screenshots

sensor_msgs/PointCloud2

You can rotate and tilt with the arrow keys, and zoom with the +/- keys. This has been tested with Velodyne data. PointClouds from devices that don't have "x", "y", and "z" fields are not supported.

screenshot

sensor_msgs/Image, sensor_msgs/CompressedImage

screenshot

sensor_msgs/LaserScan

You can zoom with the +/- keys.

screenshot

sensor_msgs/Imu

screenshot

sensor_msgs/NavSatFix

The NavSatFix visualization fetches map tiles from OpenStreetMaps, so your machine or robot needs to have internet access to be able to view those. Otherwise, you'll still be able to see a trace of points.

screenshot

The ASCII-only "-a" option works for all types. Here's what the NavSatFix message looks like on pure ASCII:

screenshot

std_msgs/Int32, std_msgs/Float32, etc.

For most std_msgs numeric types you will get a time series plot.

screenshot

Neat trick: You can reduce your terminal font size to get slightly higher resolution. Here's a nav_msgs/OccupancyGrid: screenshot

Full list of supported types

nav_msgs

  • nav_msgs/OccupancyGrid
  • nav_msgs/Odometry
  • nav_msgs/Path

std_msgs

  • std_msgs/Bool
  • std_msgs/Float32
  • std_msgs/Float64
  • std_msgs/Int8
  • std_msgs/Int16
  • std_msgs/Int32
  • std_msgs/Int64
  • std_msgs/UInt8
  • std_msgs/UInt16
  • std_msgs/UInt32
  • std_msgs/UInt64

sensor_msgs

  • sensor_msgs/CompressedImage
  • sensor_msgs/FluidPressure
  • sensor_msgs/Illuminance
  • sensor_msgs/Image
  • sensor_msgs/Imu
  • sensor_msgs/LaserScan
  • sensor_msgs/NavSatFix
  • sensor_msgs/PointCloud2
  • sensor_msgs/Range
  • sensor_msgs/RelativeHumidity
  • sensor_msgs/Temperature

rosshow's People

Contributors

artivis avatar cclauss avatar charlielito avatar cjds avatar csvance avatar dheera avatar miguelprada avatar niyawe avatar procopiostein 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rosshow's Issues

Issues installing

This package looks awesome, trying to get it working. The instructions were not as clear as I'd like for installation. I had the package.xml issue first so I realised I should copy the xml like this?
cp package.ros1.xml package.xml
and then I first I ran ./ros-install-this
and got this error:

-- +++ processing catkin package: 'rosshow'
-- ==> add_subdirectory(rosshow)
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_workspace.cmake:121 (add_subdirectory):
  The source directory

    /tmp/ros-install-this.ilUctk/src/rosshow

  does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
  CMakeLists.txt:69 (catkin_workspace)

what are the exact steps I should run to install this package?

text user interface for most rostopic/rosnode info functionality

I made ros_tui.py to more quickly do the equivalent of rostopic info or rosnode info and be able to for example follow a topic to a subscribing node to a topic published by that node and so on quicker than the cli equivalent so I could debug broken launch files where I've disconnected/renamed some topics. (It would be nice to color code topics by whether they publishers and no subscribers or the other way around, or if they have multiple publishers)

ros_tui.mp4

It uses asccimatics, but if there is interest maybe it could be adapted to use termgraphics here? It would be very nice to add a capability to select any topic and have the rosshow visualization pop up (or if no rosshow support it could just show the equivalent of rostopic echo).

Divide by zero when orientation norm is zero

Error Message:

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀  File "/opt/ros/melodic/lib/python2.7/site-packages/rospy/topics.py", line 750, in _invoke_callback⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀    cb(msg)⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀  File "/Users/carroll/test_ws/src/rosshow/rosshow/src/librosshow/viewers/sensor_msgs/ImuViewer.py", line 120, in update⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀    a = data.orientation.x / norm⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀0⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ZeroDivisionError: float division by zero⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Steps to reproduce:

rostopic pub -r 1 /imu sensor_msgs/Imu '{angular_velocity: {x: 0, y: 0, z: 0}, linear_acceleration: {x: 0, y: 0, z: 0}, orientation: {x: 0, y: 0, z: 0, w: 0}}'

rosshow /imu

License of project?

I'm compiling a set of tasks for migrating ROS2 and I think this is something good enough to think about moving into a core CLI repo after being converted to ROS2.

To start that work, I'd need to know what license this is available under. I dont see a license in the git repo

Make it a ROS package

Instead of a standalone-manually-installable package, why not make it a ROS package?

It is a very useful tool I think! I can help on that and releasing it if you want.

Ubuntu MATE arm7 Rpi

Hello,

Quite a nice package! I would be veeery nice to extract the info from Win10 through Putty.

Help a little bit a n00b in Ros and Linux.

1 - installation on Ros binaries din not worked, maybe there were some hidden steps?
2 - on a simple ros package installation, I get
Topic raspicam_node/camera_info does not appear to be published yet.

Cheers!

Add support of plotting individual variables inside a message

Hello, I'd like to say that this is a super awesome program!

There is one thing that I would love if you could support though: plotting individual variables from within messages.

For example:

~/catkin_ws/src$ rosshow /joint_states/effort[2] Topic /joint_states/effort[2] does not appear to be published yet.

Now, /joint_states message type is not supported, but the variable /joint_states/effort[2] points to an Int message, which should be supported right?

What do you think? :D

Error: ROS time moved backwards

I have received this error:
[ERROR] [1554129332.456079]: ROS time moved backwards: 196.454957049s

I think rate.sleep() in main causes this error. This sleep function must be independent from ROS time. Because if I set use_sim_time to "true" and then publish /clock with 1/10 speed of world clock I would get 1.5 FPS. This would be a problem for rosbag and gazebo users.

You can use system's sleep() function here. Also max_fps would be an optional parameter to execute rosshow.

Sorry for not creating a pull request. I will try to do in this week if I can.

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.