← Back to search

[ROS in 5 mins] 047 - What is rqt plot

The Construct Robotics Institute 6:28

9,189 views · 52 likes Watch on YouTube ↗

Hello Everyone

In today's video we're going to see what is rqt_plot and how it works.

For that we're going to use Robot Ignite Academy, which is the best tool if you want Learn ROS Fast: http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/

Before we start, if you are new to ROS, I highly recommend you to take any of the following courses on Robot Ignite Academy:

▸ ROS Basics In 5 Days (Python) - http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/ros-basics-in-5-days/
▸ ROS Basics In 5 Days (C++) - http://www.theconstructsim.com/construct-learn-develop-robots-using-ros/robotigniteacademy_learnros/ros-courses-library/ros-courses-ros-basics-in-5-days-c/


The commands used during the video to create the package were the following:

cd ~/catkin_ws/src/
catkin_create_pkg tutorial rospy
cd tutorial/src/
touch learning.py
chmod +x learning.py
source ~/catkin_ws/devel/setup.bash

The content of learning.py is:

#! /usr/bin/env python
import rospy
from std_msgs.msg import Float32
from random import random

rospy.init_node('learning')
pub = rospy.Publisher('reward', Float32, queue_size=1)
rate = rospy.Rate(1)

while not rospy.is_shutdown():
pub.publish( random() * 50 )
rate.sleep()


And to see rqt_plot, the command was:

rqt_plot /reward

We love feedback, so, whether you like the video or not, please share your thoughts on the comments section below.

Thanks for watching.

Category (YouTube): Science & Technology

Playback is via YouTube's official embedded player. Data from YouTube; Exumo is not affiliated with YouTube.