Instructor: Dominic Jud, Martin Wermelinger, Marco Hutter Title: Programming for Robotics - Introduction to ROS Refererences
I'm going to study and summarize this course. Every picture and content belong to lectures.
Date: May 18, 2020
Tool for keeping track of coordinate frames over time
Maintains relationship between coordinate frames in a tree structure buffered in time
Lets the user transform points, vectors, etc. between coordinate frames at desired time
Implemented as publichser/subsrciber model on the topics /tf and /tf_static
rosrun tf tf_monitor
rosrun tf tf_echo source_frame target_frame
rosrun tf view_frames
#include <ros/ros.h>
#include <tf2_ros/transform_listener.h>
#include <geometry_msgs/TransformStamped.h>
int main(int argc, char** argv) {
ros::init(argc, argv, "tf2_listener");
ros::NodeHandle nodeHandle;
// Create a TF listener to fill up a buffer
tf2_ros::Buffer tfBuffer;
tf2_ros::TransformListener tfListener(tfBuffer);
ros::Rate rate(10.0);
while (nodeHandle.ok()) {
geometry_msgs::TransformStamped transformStamped;
try {
//To lookup transformations
// use ros::Time(0) to get the latest available transform
transformStamped = tfBuffer.lookupTransform("base", "odom", ros::Time(0));
} catch (tf2::TransformException &exception) {
ROS_WARN("%s", exception.what());
ros::Duration(1.0).sleep(); continue;
}
rate.sleep();
}
return 0;
}
rosrun rqt_gui rqt_gui rqt
### rqt_image_view
- Visualizing images
> rosrun rqt_image_view rqt_image_view
### rqt_multiplot
- Visualizing numeric values in 2D plots
> rosrun rqt_multiplot rqt_multiplot
### rqt_graph
- Visualizing the ROS computation graph
> rosrun rqt_graph rqt_graph
### rqt_console
- Displaying and filtering ROS messages
> rosrun rqt_console rqt_console
### rqt_logger_level
- Configuring the logger level of ROS nodes
> rosrun rqt_logger_level rqt_logger_level