This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:ros:turtlesim [2021/03/29 10:45] – [Command line] momala | en:ros:turtlesim [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== ROS Tools ====== | ====== ROS Tools ====== | ||
- | Using simulations is a good way to learn ROS without having to own a physical robot. In this chapter we just use a 2D simulation called Turtlesim.This tutorial will give you a good idea of what ROS tools can do for you. | + | Using simulations is a good way to learn ROS without having to own a physical robot. In this chapter we just use a 2D simulation called Turtlesim. This tutorial will give you a good idea of what ROS tools can do for you. |
First, run // | First, run // | ||
$ roscore | $ roscore | ||
- | Run the launch file demo for turtlesim: | + | Run the launch file demo for Turtlesim: |
$ roslaunch turtle_tf turtle_tf_demo.launch | $ roslaunch turtle_tf turtle_tf_demo.launch | ||
Line 12: | Line 12: | ||
When the launch file is running, a simulation with a graphical user interface opens. | When the launch file is running, a simulation with a graphical user interface opens. | ||
- | The launch file also contains a node that can be used to send keyboard movement messages to the robot. you need to click on the terminal that you opened the launch file and use arrow keys to move the turtlebot1. Then you can see that the second | + | The launch file also contains a node that can be used to send keyboard movement messages to the robot. you need to click on the terminal that you opened the launch file and use arrow keys to move the turtlebot1. Then you can see that the second |
- | {{ : | + | {{ : |
===== RViz ===== | ===== RViz ===== | ||
- | Short for ROS Visualization. It’s a 3-dimensional visualization tool for ROS that helps to visualize what the robot seeing and doing. To run the RViz for the the turtlebot simulation there is a predefined configuration file that you can run it with the following command: | + | Short for ROS Visualization. It’s a 3-dimensional visualization tool for ROS that helps to visualize what the robot seeing and doing. To run the RViz for the turtlebot simulation there is a predefined configuration file that you can run with the following command: |
$ rosrun rviz rviz -d `rospack find turtle_tf`/ | $ rosrun rviz rviz -d `rospack find turtle_tf`/ | ||
- | As you can see there are three different transformation | + | As you can see there are three different transformation |
{{ : | {{ : | ||
===== Rqt_graph ===== | ===== Rqt_graph ===== | ||
+ | |||
+ | ROS also comes with some graphical tools. // | ||
- | Let's see how it works using the // | + | run // |
$ rqt_graph | $ rqt_graph | ||
- | + | ||
+ | When the command is executed, the graphical user interface opens. Robots with complex tasks usually have many different nodes working on them that interact with a variety of topics. It is difficult to see the big picture from the command line and this is done using the // | ||
+ | | ||
{{ : | {{ : | ||
Launching the command opens a graphical user interface. We see that the ///teleop// node reads the arrow keys and turns them into a robot motion. It is sent to /// | Launching the command opens a graphical user interface. We see that the ///teleop// node reads the arrow keys and turns them into a robot motion. It is sent to /// | ||
+ | |||
+ | Example of a graph on a more complex robot: | ||
+ | |||
+ | {{ : | ||
+ | |||
===== Rqt_tf_tree ===== | ===== Rqt_tf_tree ===== | ||
Line 41: | Line 50: | ||
{{ : | {{ : | ||
- | As can be seen in the gui, two //turtle1// and //turtle2// frames are connected to the world tf. There are two broadcasters for them that calculate their transformation and publish them relative to the world. | + | As can be seen in the GUI, two //turtle1// and //turtle2// frames are connected to the world tf. There are two broadcasters for them that calculate their transformation and publish them relative to the world. |
===== Command line ===== | ===== Command line ===== | ||
Line 61: | Line 70: | ||
===== Rqt_plot ===== | ===== Rqt_plot ===== | ||
- | The // | + | The // |
Run // | Run // |