-
Notifications
You must be signed in to change notification settings - Fork 0
TurtlesimExample
This page will show you how to run turtlesim_node and turtle_teleop_key in order to provide a basic usage example of piadda.
First of all you need to follow the steps provided in README, in order to install and run piadda in your local machine.
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):
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.
Please, make sure that you follow the README instructions and follow the next steps:
- Open a console and navigate to piadda folder.
- Source ROS distribution, using the following command:
$ source /opt/ros/DISTRO/setup.bash
- Source piadda_pyenv, created previously when installing piadda, using the following command:
$ source <PATH-TO>/piadda_pyenv/bin/activate
- Run piadda django-project, using the following command:
$ python3 manage.py runserver
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:
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.