Giter Site home page Giter Site logo

ros2_visualization_playground's Introduction

ros2_visualization_playground

Guidelines

Base project docker image with ros2 foxy full distribution and a few sample packages to show off the power of RQT and PlotJuggler.

Docker

  • NVIDIA GPU support - Skip this step if you don't have an NVIDIA graphics card

Make sure you have the drivers installed:

nvidia-smi

Install nvidia-container-toolkit in your host machine:

sudo apt-get install -y nvidia-container-toolkit
  • Build the docker image whose name is ros2_foxy:
./docker/build.sh

You can also try to set a specific image name:

./docker/build.sh -i my_fancy_image_name
  • Run a docker container from ros2_foxy called ros2_foxy_container:
./docker/run.sh

You can also try to set specific image and container names:

./docker/run.sh -i my_fancy_image_name -c my_fancy_container_name

And a prompt in the docker image should appear at the root of the workspace:

$ pwd
/home/username/ws
$ ls -lash src/
total 12K
4.0K drwxr-xr-x 3 root         root         4.0K Nov 25 20:53 .
4.0K drwxr-xr-x 1 root         root         4.0K Nov 25 20:53 ..
4.0K drwxrwxr-x 4 agalbachicar agalbachicar 4.0K Nov 25 19:20 ros2_visualization_playground

Prepare your workspace, build and test

  • To install dependencies via rosdep:
rosdep install -i -y --rosdistro foxy --from-paths src
  • To build:
colcon build

And if you want details of the run commands:

colcon build --event-handlers console_direct+
  • To test:
colcon test --event-handlers console_direct+
colcon test-result

Try the code!

After building, source your install space:

source install/setup.bash

Run a node to generate synthetic telemetry data:

ros2 run telemetry_data_generation telemetry_data_node

Run the quaternion to euler angles conversion

ros2 run telemetry_visualization quat2euler_node

Run the rqt_gui visualization:

ros2 run rqt_gui rqt_gui --perspective-file install/telemetry_visualization/config/perspectives/pose.perspective

And you should see the RQT visualization displaying something like:

rqt_perspective

Alternatively, you could use PlotJuggler:

ros2 run plotjuggler plotjuggler

Once the window is open, load the layout configuration by clicking on the button next to Layout and look for the layout.xml file that should be in install/telemetry_visualization/config/plotjuggler/layout.xml. Choose the ROS2 Topic Subscriber and click on Start. Select /pose and /euler_angles topics. Click on Start and you should see something like the following picture.

plot_juggler_layout

ros2_visualization_playground's People

Contributors

agalbachicar avatar

Watchers

 avatar

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.