Skip to content

TurtlesimExample

Daniel Vaz edited this page Apr 2, 2023 · 4 revisions

Objectives

This page will show you how to run turtlesim_node and turtle_teleop_key in order to provide a basic usage example of piadda.

Installing piadda

First of all you need to follow the steps provided in README, in order to install and run piadda in your local machine.

Running turtlesim_node

Open a console, and source ROS distribution, below an example if you uses bash:

$ source /opt/ros/DISTRO/setup.bash

Run the turtlesim_node using the following command in the console:

$ ros2 run turtlesim turtlesim_node

If command was successful, it will open a GUI window like this (the turtle model may vary, since it's random):

image

Running turtle_teleop_key

Open another console, and source ROS distribution again:

$ source /opt/ros/DISTRO/setup.bash

Run the turtle_teleop_key, it's useful to send speed/goals commands to turtlesim_node, in order to control the simulated turtle:

$ ros2 run turtlesim turtle_teleop_key

If command was successful, it will show the following text output on console:

Reading from keyboard
---------------------------
Use arrow keys to move the turtle.
Use G|B|V|C|D|E|R|T keys to rotate to absolute orientations. 'F' to cancel a rotation.
'Q' to quit.

Running piadda

Please, make sure that you follow the README instructions and follow the next steps:

  1. Open a console and navigate to piadda folder.
  2. Source ROS distribution, using the following command: $ source /opt/ros/DISTRO/setup.bash
  3. Source piadda_pyenv, created previously when installing piadda, using the following command: $ source <PATH-TO>/piadda_pyenv/bin/activate
  4. Run piadda django-project, using the following command: $ python3 manage.py runserver

Accessing piadda dashboard

Open your preferred browser (firefox, chrome) and access the url http://127.0.0.1:8000

If everything was sucessfull you should see something like:

image

Visualizing a XY Map

teste

Visualizing Time Series variables

timeseries

Visualizing Meter Graphic variables

This kind of graphic should be useful in order to compare values, for example: desired vs current.

You also might find it useful in order to help visualizing variables that oscillate around zero value.

metergraphic