In this video, we’ll see how to use the turtlesim package (wiki.ros.org/turtlesim) for learning the basics of ROS. Get set to have some fun as you try out things for yourself!
Commands used:
* rostopic list
* rostopic pub
* rosmsg list
* rosmsg show
* rosservice list
* rosservice call
If you are a ROS beginner and want to learn ROS basics fast, we recommend you take any of the following courses on Robot Ignite Academy:
In today’s video we’re going to see what is ROS Namespace and how it works.
Step 0. Create a project in Robot Ignite Academy(RIA)
We have the best online ROS course available in RIA. It helps you learn ROS in the easiest way without setting up ROS environment locally. The only thing you need is a browser! Create an account here and start to browse the trial course for free now! We’ll use the ROS Basics in 5 Days course unit0 as an example today.
Step 1. Create a package for the code
At first, let’s create a ROS package with dependencies for our code and a source file called robot.py under the src folder in the pakcage with the following command
cd ~/catkin_ws/src
catkin_create_pkg tutorial rospy geometry_msgs
cd tutorial/src
touch robot.py
In robot.py, please create the following content
#! /usr/bin/env python
import rospy
from geometry_msgs.msg import Pose
rospy.init_node('robot', anonymous=True)
pub = rospy.Publisher('my_position', Pose, queue_size=1)
rate = rospy.Rate(1) # 1hz
while not rospy.is_shutdown():
pub.publish(Pose())
rate.sleep()
You can then give the permission and run the code with the following commands.
Hello ROS Developers! In this video post, we’ll see what rosbag is, what it does, and how to use it to record and playback ROS topics.
Key commands that you will learn: rosbag...
record
play
info
Let’s go!
Step 1: Create a project in Robot Ignite Academy (RIA)
We have the best online ROS courses available in RIA. It helps you learn ROS in the easiest way without setting up a ROS environment locally. The only thing you need is a browser! Create an account here and start to browse the trial course for free now! We’ll use the ROS Basics in 5 Days course as an example today.
Step 2: Record Bag file with rosbag
The ROS Bag is a powerful tool for you to record and playback your simulation. To start the recording all topic available, simply type the following command in the terminal.
rosbag record -a
As an example, we’ll move the turtlebot in the simulation with
roslaunch turtlebot_teleop keyboard_teleop.launch
You can now move around to generate the data. To finish recording, simply press CTRL+C to terminate the rosbag.
Step 3: Play the rosbag bag file
In the video, the recorded bag file is saved as 2018-10-06-05-04-57.bag (be sure to use your own name 🙂 ). To playback, type the following command in a terminal
rosbag play 2018-10-06-05-04-57.bag
You should see the robot moving around as how you did.
If you want to see more information about the .bag file. The following command will print all the topic available in the .bag file.
rosbag info 2018-10-06-05-04-57.bag
Video
See it happening live in this video, in case you are stuck or just want to sit back and watch a “movie” instead!
Want to learn more?
If you are a ROS beginner and want to learn ROS basics fast, we recommend you take any of the following courses on Robot Ignite Academy:
In this video, we’ll see what the ROS tf package is, and what it does, and how to use one of its tools (rqt_tf_tree), in just about 5 minutes!
Let’s go!
Step 0. Create a project in Robot Ignite Academy(RIA)
We have the best online ROS course available in RIA. It helps you learn ROS in the easiest way without setting up ROS environment locally. The only thing you need is a browser! Create an account here and start to browse the trial course for free now! We’ll use the TF ROS 101 as an example today.
Step 1. What is TF?
The TF
It’s a Ros Package
It lets the user keep tracking of multiple coordinate frames over time.
It allows making computations in one frame and then transforming to another.
You can see the available TF in ROS by typing the following command
rosrun rqt_tf_tree rqt_tf_tree
You can see that there are 3 coordinate frames in this simulation world, turtle 1 and turtle 2. The rqt_tf_tree will only show the relationship for a particular timestep.
Want to learn more?
If you are a ROS beginner and want to learn ROS basics fast, we recommend you take any of the following courses on Robot Ignite Academy: